[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] a question
From: |
Craig Graham |
Subject: |
Re: [lwip-users] a question |
Date: |
Mon, 8 Nov 2004 12:58:31 +0000 |
User-agent: |
KMail/1.6 |
That's in case the packet from the ethernet is to big to fit into a single
pbuf, in which case you actually have a linked list of pbuf's (a chain). 'q'
iterates along the linked list, filling each pbuf with as much data as it
can, then moving on to the next pbuf in the chain until it has read the
entire packet from the ethernet chip.
On Monday 08 November 2004 12:18, jack W wrote:
> hi everyone
>
> i have a question about the file ethernetif.c. In the file there is a
> function low_level_input() and in the function , i must use the pbuf to
> fill the packet
>
>
> /* We iterate over the pbuf chain until we have read the entire
> * packet into the pbuf. */
> for(q = p; q != NULL; q = q->next) {
> /* Read enough bytes to fill this pbuf in the chain. The
> * available data in the pbuf is given by the q->len
> * variable. */
> read data into(q->payload, q->len);
> }
> acknowledge that packet has been read();
>
>
> i don't understand why use p and q .
>
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users