Skip to content
Jérémie Magnette edited this page Dec 21, 2015 · 2 revisions

picoTCP internal design follows the Petri net model to transfer the frames among modules using intermediate queues. All the frames though, are moved across modules by reference, to minimize the number of copies down to the strict necessary amount. A frame entering picoTCP from the socket interface or from a device driver, or being internally generated by one of the modules is in general placed into a queue where the next module can process it. Transitions are clocked by the single module activity, which is periodically scheduled by the stack.

Each module can keep a reference copy of the frame for later use. An example of this is the TCP socket queue, which needs to keep a copy of the segments it sends until the frame containing the segment is acknowledged by the remote endpoint. Usage count in the frame structure allows each module to discard the frames, facilitating the management of the lifetime of the frames throughout the stack.

More about the internal design:

Clone this wiki locally