lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Packet queuing to an ARP table entry


From: Amena El Homsi
Subject: [lwip-users] Packet queuing to an ARP table entry
Date: Tue, 14 Nov 2017 11:55:05 +0200

Hi,
I am using lwip 2.0.3 Release version.

I am trying to send ping request using Lwip.
The ICMP header and ping data is in my system frame memory referenced by a PBUF_ROM 'p' (p->payload points to the ICMP hdr in the frame memory.

The PBUF_ROM is chained by a PBUF_RAM 'q' in which the ETHERNET and IP headers are saved

q: q->next = p                                                          p: p->next = NULL
    q->payload = q + sizeof(struct pbuf)                        p->payload = memory address
    q->len = Eth hdr size + IP hdr size                          p->len = ICMP hdr size + ping data size
    q->tot_len = q->len + p->len                                    p->tot_len = p->len  
    q->type = PBUF_RAM                                             p->type = PBUF_ROM

When I tried to send the first ping, LwIP sends an ARP request and queue the packet. The problem is that LwIP creates a new pbuf RAM 'r' and copies 'q' of type PBUF RAM and 'p' of type PBUF_ROM to the new PBUF RAM!
Indeed I don't want to copy PBUF_ROM payload to the new PBUF_RAM, is there a way to avoid such copy? why LwIP doesn't copy 'q' to 'r' while preserving the chain between the PBUF_RAM and PBUF_ROM?

Regards,
Amena

--

Amena El-Homsi
Computer & Communication Engineer
Dipl. Eng,  M.S.

reply via email to

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