mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-04-16 17:43:23 +00:00
Additional documentation on the subtle difference of a 'pbuf chain' and a 'packet queue'.
This commit is contained in:
parent
031a4cbdd8
commit
b306cab8be
@ -13,11 +13,18 @@
|
|||||||
* Multiple packets may be queued, also using this singly linked list.
|
* Multiple packets may be queued, also using this singly linked list.
|
||||||
* This is called a "packet queue". So, a packet queue consists of one
|
* This is called a "packet queue". So, a packet queue consists of one
|
||||||
* or more pbuf chains, each of which consist of one or more pbufs.
|
* or more pbuf chains, each of which consist of one or more pbufs.
|
||||||
|
* The differences between a pbuf chain and a packet queue are very
|
||||||
|
* subtle. Currently, queues are only supported in a limited section
|
||||||
|
* of lwIP, this is the etharp queueing code. Outside of this section
|
||||||
|
* no packet queues are supported as of yet.
|
||||||
*
|
*
|
||||||
* The last pbuf of a packet has a ->tot_len field that equals the
|
* The last pbuf of a packet has a ->tot_len field that equals the
|
||||||
* ->len field. It can be found by traversing the list. If the last
|
* ->len field. It can be found by traversing the list. If the last
|
||||||
* pbuf of a packet has a ->next field other than NULL, more packets
|
* pbuf of a packet has a ->next field other than NULL, more packets
|
||||||
* are on the queue.
|
* are on the queue.
|
||||||
|
*
|
||||||
|
* Therefore, looping through a pbuf of a single packet, has an
|
||||||
|
* loop end condition (tot_len == p->len), NOT (next == NULL).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user