lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] etharp_output: could not allocate room for header.


From: Thanh NGUYEN
Subject: Re: [lwip-users] etharp_output: could not allocate room for header.
Date: Tue, 23 Sep 2008 22:46:53 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080724)

Hi,

I have tried to compile my application with previous version (< 1.3 in ecos) of lwip. It worked perfectly. I have gotten a look at the code source of 2 versions and found out, as you said, that:

In the udp_send() of lwip 1.3, when there is not enought space to add an UDP header, we allocated the pbuf with:

p = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM)

And in the previous version, we did:

p = pbuf_alloc(PBUF_TRANSPORT, UDP_HLEN + 16, PBUF_RAM)

Anyone can explain me what's wrong here ?

Thanks for your helps.

NT

Simon Goldschmidt wrote:
The most obvious reason would be that the pbuf you have passed to udp_send() was not allocated using PBUF_TRANSPORT and thus does not provide enough room for all headers.

Simon

  
Hi all,

I'm trying compile an little application with lwip inside ecos. Here is 
the trace of my program:

udp_send: added header pbuf 0x20174fd4 before given pbuf 0x20176ad4
udp_send: sending datagram of length 55
udp_send: UDP packet length 55
udp_send: UDP checksum 0x3bd5
udp_send: ip_output_if (,,,,IP_PROTO_UDP,)
pbuf_header: old 0x20175008 new 0x20174ff4 (20)
ip_output_if: et1
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |        75     | (v, hl, tos, len)
+-------------------------------+
|        0      |000|       0   | (id, flags, offset)
+-------------------------------+
|  255  |   17  |    0x5657     | (ttl, proto, chksum)
+-------------------------------+
|  172  |   16  |    6  |   43  | (src)
+-------------------------------+
|  172  |   16  |    6  |  255  | (dest)
+-------------------------------+
netif->output()etharp_output: could not allocate room for header.

After that, the application crashed. Anyone knows why ?


Thanks for your helps.

NT



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users
    

  


reply via email to

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