lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Ethernet raw frames?


From: Michael Anburaj
Subject: Re: [lwip-users] Ethernet raw frames?
Date: Sun, 9 Feb 2003 16:43:36 -0800 (PST)

Hi Leon,

Sorry, The 2nd payloads are not missing, but they are there, but as I told in my 1st email they get miss interpretted.

-Mike.

 Michael Anburaj <address@hidden> wrote:

Hi Leon,

LwIP apps response to HTTP GET request from Internet explorer:

If you look at the console debug output from netif->linkoutput() function <attached below this email>, the pbuf passed to it (p) has 2 payloads, the 1st one "p->payload[0 to p->len]" & the second one "p->next->payload[0 to p->next->len]".

Questions
1. Does this seem right to you??
2. If so, Then how these 2 payloads in the pbuf (p) be sent out?

Currently in the Ethernet IF code, at netif->linkoutput() function I simple send them out as is to the ethernet driver below in 2 successive calls (for the 2 payloads). And the ethernet driver simply puts the data out through the wire. If I look at the data received on the PC side using Ethereal, It shows only the 1st Payload of the 'http_html_hdr' packet & then its shows the 1st payload of the 'indexdata' packet. The 2nd payloads are missing in the Ethereal debug window.

Please tell me where I went wrong.

[ note: I also tried putting the 2 payloads together in 1 single buffer & send them to the ethernet driver in one call. Still I see the same results.]

I can send the ethereal debug capture file too.

Thanks a lot.

-Mike.


Console debug output:
--------------------------------

do_write:C o n t e n t - t y p e :   t e x t / h t m l
 
 
 

netif->linkoutput():
p->payload[0 to p->len]:
[0] à [e0.] ˜ [98] ž [9e] „ [84] – [96]  [0] Ð [d0]   [a0]  [0]  [0] í [ed]  [8]  [0] E [45]  [0]  [0] D [44]  [0]  [3] @ [40]  [0] ÿ [ff]  [6]  [12] T [54] © [a9] þ [fe] Š [8a] ¯ [af] © [a9] þ [fe] Š [8a] ° [b0]  [0] P [50]  [4]  [11]  [0]  [0]  [19] y [79]  [0] ­ [ad]  [1e] € [80] P [50]   [18]  [3] € [80] J [4a] „ [84]  [0]  [0]

p->next->payload[0 to p->next->len]:
C [43] o [6f] n [6e] t [74] e [65] n [6e] t [74] - [2d] t [74] y [79] p [70] e [65] : [3a]   [20] t [74] e [65] x [78] t [74] / [2f] h [68] t [74] m [6d] l [6c]
 [d]
 [a]
 [d]
 [a]  [0]


do_write:< h t m l >   < h e a d > < t i t l e > A   t e s t   p a g e < / t i t l e > < / h e a d >   < b o d y >   T h i s   i s   a   s m a l l   t e s t   p a g e .   < / b o d y >   < / h t m l >

netif->linkoutput():
p->payload[0 to p->len]:
[0] à [e0] ˜ [98] ž [9e] „ [84] – [96]  [0] Ð [d0]   [a0]  [0]  [0] í [ed]  [8]  [0] E [45]  [0]  [0] ‰ [89]  [0]  [4] @ [40]  [0] ÿ [ff]  [6]  [12]  [e] © [a9] þ [fe] Š [8a] ¯ [af] © [a9] þ [f.e] Š [8a] ° [b0]  [0] P [50]  [4]  [11]  [0]  [0]  [19] • [95]  [0] ­ [ad]  [1e] † [86] P [50]   [18]  [3] z [7a] Õ [d5] * [2a]  [0]  [0]

p->next->payload[0 to p->next->len]:
< [3c] h [68] t [74] m [6d] l [6c] > [3e]   [20] < [3c] h [68] e [65] a [61] d [64] > [3e] < [3c] t [74] i [69] t [74] l [6c] e [65] > [3e] A [41]   [20] t [74] e [65] s [73] t [74]   [20] p [70] a [61] g [67] e [65] < [3c] / [2f] t [74] i [69] t [74] l [6c] e [65] > [3e] < [3c] / [2f] h [68] e [65] a [61] d [64] > [3e]   [20] < [3c] b [62] o [6f] d [64] y [79] > [3e]   [20] T [54] h [68] i [69] s. [73]   [20] i [69] s [73]   [20] a [61]   [20] s [73] m [6d] a [61] l [6c] l [6c]   [20] t [74] e [65] s [73] t [74]   [20] p [70] a [61] g [67] e [65] . [2e]   [20] < [3c] / [2f] b [62] o [6f] d [64] y [79] > [3e]   [20] < [3c] / [2f] h [68] t [74] m [6d] l [6c] > [3e]  [0]

 Leon Woestenberg <address@hidden> wrote:

Hello Mike,

> tcp_enqueue() gets called at some point > tcpip_thread>. It creates two pbufs, seg->p & p.
> seg->p is of type PBUF_RAM.
> p is of type PBUF_ROM
> p is chained with seg->p. "pbuf_chain(seg->p, p);"
> seg->p carries the ACK packet with the TCP header
> p carries the pointer to the constant 'http_html_hdr'.
> And no header attached to it.
>
A chain of pbufs always represents one packet.

> Later the IP layer calls the netif->output() function
> with the pbuf (p chained to seg->p). Note: the 1st
> Packet, ACK is complete with its header & stuff. But
> the second packet has just the raw string contained in
> 'http_html_hdr'.
>
Here you indicate that the chained pbuf's are sent as seperate
packets, which is not what is supposed to happen.

I recon the chaining fails, or maybe the Ethernet device
driver fails to send a pbuf chain as one consecutive packet.

I would start adding some debug statements to see if
the pbuf chaining works and is not broken.

Regards,

Leon


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



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now_______________________________________________
lwip-users mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/lwip-users



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
reply via email to

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