lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] pbuf_header fails in etharp_output


From: Goldschmidt Simon
Subject: RE: [lwip-users] pbuf_header fails in etharp_output
Date: Tue, 22 May 2007 15:47:11 +0200

> > That would make ICMP dependent of the link layer!
> 
> No more so than TCP, UDP, etc.  It would (if there wasn't 
> enough space in the pbuf it already had) simply allocate a 
> pbuf using the PBUF_IP pbuf_layer flag, and so it would have 
> enough space reserved for the IP and link headers.

But how does the ICMP code know how much space to reserve fo the
link layer? As far as I know, UDP does not make such an assumption,
i only checks if the UDP header fits in and allocates another pbuf
if not. But in ICMP, the packet fits in the pbuf (and also the IP
header). Only the MAC header does not fit in. I think it's a wrong
design of the etharp module that it can't allocate its own header.
On the other side, ip_output_if() does it the same way.
So the easiest modification would be to allocate a new pbuf for
ICMP?


Simon




reply via email to

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