[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] TCP Checksum Errors - NOT.
From: |
Nick Thomas |
Subject: |
[lwip-users] TCP Checksum Errors - NOT. |
Date: |
Thu, 25 Sep 2008 13:11:09 +0100 |
A few days ago I was in this mailing list to ask for help with a TCP
Checksum problem.
After further investigation, it appears that the checksum calcs are OK
afterall - sorry about this red herring. My problem really lies in the
low_level_output function - not really part of LWIP.
My hardware (STMAC110) was using the OSPlus device_write() function to send
each pbuf->payload in the pbuf chain. However, the second, and subsequent
blocks in the chain just wouldn't appear on the wires (according to
wireshark anyway).
So, only the first pbuf->payload would actually get sent, despite
device_write returning the correct number of bytes which it claims to have
sent for all blocks.
Anyway, as a test I copy all of the pbuf->payload(s) to a big buffer prior
to sending, and just do one device_write(). I notice that some of the
low_level_output functions in the contrib\ports\xxx do exactly this.
This seems to work - at least for output; I may need to do something similar
for input too!
Does anyone on this list also use the STMAC110 with OSPlus? If so, how did
you get around this problem? I am not too happy about copying all of the
pbufs in the chain to a buffer prior to sending! For one thing I don't know
how big to make the buffer in advance? What if there are a lot of pbufs in
the chain? I notice that some examples in the contrib sections use stack
variable buffer like 'unsigned char buffer[1600];' but then don't do a
length check on the memcpy(s) as it builds up the buffer with data!
Any advice welcomed.
Regards
Nick
-----------------------------
Nick Thomas
Email: address@hidden
- [lwip-users] TCP Checksum Errors - NOT.,
Nick Thomas <=