Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygen#include "lwip/opt.h"#include "lwip/stats.h"#include "lwip/def.h"#include "lwip/mem.h"#include "lwip/memp.h"#include "lwip/pbuf.h"#include "lwip/sys.h"#include "arch/perf.h"#include <string.h>Go to the source code of this file. Detailed DescriptionPacket buffer management Packets are built from the pbuf data structure. It supports dynamic memory allocation for packet contents or can reference externally managed packet contents both in RAM and ROM. Quick allocation for incoming packets is provided through pools with fixed sized pbufs. A packet may span over multiple pbufs, chained as a singly linked list. This is called a "pbuf chain". Multiple packets may be queued, also using this singly linked list. 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. CURRENTLY, PACKET QUEUES ARE NOT SUPPORTED!!! Use helper structs to queue multiple packets. The differences between a pbuf chain and a packet queue are very precise but subtle. 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 pbuf of a packet has a ->next field other than NULL, more packets 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). Definition in file pbuf.c. Generated on Sat May 26 2012 06:02:59 for ReactOS by
1.7.6.1
|