lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] manage pbuf using multiple netif on the same hw


From: Piero 74
Subject: Re: [lwip-devel] manage pbuf using multiple netif on the same hw
Date: Wed, 20 Feb 2008 14:58:42 +0100

the following  is it correct?

// build pbuf with packet from driver
p = pbuf_alloc(PBUF_RAW, len_packet, PBUF_POOL);

// copy data from driver
......

// build second pbuf WITHOUT copy
p_copy = pbuf_alloc(PBUF_RAW, 0, PBUF_REF);
p_copy->next = p;
p_copy->tot_len = len_packet;

// update ref filed in original pbuf
pbuf_ref(p);

// send first pbuf to tcp_ip thread for FIRST netif
...
netif->input(p, netif_first);
...

// send second pbuf to tcp_ip thread for SECOND netif
...
netif->input(p_copy, netif_second);
...


What do you think???

Thanks again,
Piero


2008/2/20, Piero 74 <address@hidden>:




  OR i have to build A PBUF FOR EACH NETIF using the same payload? (in this case... i have to spend time for copy)

can avoid copy using pbuf? i want 2 pbuf which has the same packet (i think... the same payload and len??)

Piero



reply via email to

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