lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Problems with receiving UDP-checksum fails


From: ake . forslund
Subject: Re: [lwip-users] Problems with receiving UDP-checksum fails
Date: Tue, 14 Jun 2011 13:30:23 +0200

Hello once more,

Note to self (and anyone who is interested): it is important to set the "Compiler hints for packing structures". for Keil (RVCT3.1) these should be

/* Compiler hints for packing structures */
#define PACK_STRUCT_FIELD(x) x
#define PACK_STRUCT_STRUCT  
#define PACK_STRUCT_BEGIN __packed
#define PACK_STRUCT_END


The decice now gets an IP, GW and netmask and seems to be content with it's situation.

As always I find that the error is in the porting layer =)

I'll stop spamming the mailing list now.

/Åke
-----------------------------
Åke Forslund
0433-273296
NIBE AB
Box 14
S-285 21  Markaryd
Tel +46-(0)433-273296



From: address@hidden
To: address@hidden
Date: 2011-06-14 10:03
Subject: [lwip-users] Problems with receiving UDP-checksum fails
Sent by: address@hidden





Hello again,

I've started working with the driver for my ethernet-controller (Microchip ENC424J600) and gotten it to transmit and receive data using the interface in lwip. I've started to test this out on DHCP and have thus run into some problems. The DHCP discover-message is sent and in return an DHCP-offer is sent (and recieved in my platform). When checking the trace (excerpt below) I'm informed that the UDP-datagram is discarded due to failing checksum. I've verified the recieved package with the transmitted data using wireshark and diff and the recieved package is identical to the sent package.


So my questions are: Where should I look for the problem? Could it be some endianess- problem? How do I verify the UDP-checksum calculated by lwip?

Another question: should FCS be stripped by the low_level_input()-function or should it be saved for the handling functions?


I'm on an ARM-platform using lwip 1.4.0


Thanks for any help


Best Regards

/Åke




currPkg Len: 0x15a

nextpkg @ 0x59a8

00 04 a3 1e 0b 08 00 16 a6 10 83 c2 08 00 45 00
01 48 30 db 00 00 40 11 c7 5d c0 a8 00 01 c0 a8
00 1b 00 43 00 44 01 34 18 ad 02 01 06 00 ab cd
00 01 00 00 00 00 00 00 00 00 c0 a8 00 1b c0 a8
00 01 00 00 00 00 00 04 a3 1e 0b 08 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 63 82 53 63 35 01 02 36 04 c0
a8 00 01 33 04 00 00 a8 c0 3a 04 00 00 54 60 3b
04 00 00 93 a8 01 04 ff ff ff 00 1c 04 c0 a8 00
ff 03 04 c0 a8 00 01 06 04 c0 a8 00 01 ff 00 00
00 00 00 00 00 00
tcpip_thread: PACKET 203b7670

udp_input: received datagram of length 308

UDP header:

+-------------------------------+

|        67     |        68     | (src port, dest port)

+-------------------------------+

|       308     |     0x18ad    | (len, chksum)

+-------------------------------+

udp (192.168.0.27, 68) <-- (192.168.0.1, 67)

udp_input: calculating checksum

udp_input: UDP datagram discarded due to failing checksum


-----------------------------
Åke Forslund
0433-273296
NIBE AB
Box 14
S-285 21  Markaryd
Tel +46-(0)433-273296
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

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