lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Using netbufs


From: Joe Dupre
Subject: [lwip-users] Using netbufs
Date: Wed, 17 Feb 2010 17:24:24 -0500

I have a simple application that sends out a UDP packet every few seconds.  
When using the raw API, I created a raw pbuf in ram, filled the payload, and 
then had udp_send() send that same pbuf over and over from my lwip task.

Now with the Netconn API, I've created separate task to do this.  I create a 
netbuf, fill the payload, and call netconn_sendto().  The first time the packet 
is sent as expected, but when netconn_sendto() returns, the length of my netbuf 
has changed, and the payload is in a different location.

I see that as the netbuf's pbuf gets passed toward the interface, headers get 
added to the payload.  But after the packet is sent the headers are not removed 
and the netbuf I get back is no longer the netbuf that I started with.

Are netbufs only designed to be used once and then thrown away?

- Joe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]