> > 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 _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
