My platform is Cortex M3.

I think it is not endianess issue !

From: [email protected] 
[mailto:[email protected]] On Behalf Of 
Colin Nichols
Sent: 2012年6月8日 4:11
To: Mailing list for lwIP users
Subject: Re: [lwip-users] ping thread fails to works when IP, UDP, TCP and ICMP 
checksums by hardware

What platform are you running on?

I'm not sure about this, but could it be an endianness issue?  Is your #define 
BYTE_ORDER XXXX_ENDIAN correct?

Hope this helps,
Colin


On 06/07/2012 05:23 AM, vincent cui wrote:
Hi ,

I found a strange case about ping. All test is base on removeing the 
iecho->chksum = inet_chksum(iecho, len); And using HW checksum
If I set ping_target with IPV4_ADDR(&ping_target, 192, 168, 1, 1), then send it 
out, the received icmp packet is from 192.168.1.1. host
If I set ping_target with ipaddr_aton(“192.168.1.1”, &ping_target), then send 
it out, the received icmp packet is not from 192.168.1.1 host.

I check the ping_target.addr value in the two case, they are same, but received 
icmp result is different !

Also, I add “printf(“%x \n”, ping_target.addr)” code after 
IPV4_ADDR(&ping_target, 192, 168, 1, 1), the received icmp packet is not from 
192.168.1.1 host too .

Anyone meet the problem ?

Vincent

From: 
[email protected]<mailto:[email protected]>
 [mailto:[email protected]] On Behalf Of 
Funk, Artur
Sent: 2012年6月6日 19:49
To: Mailing list for lwIP users
Subject: Re: [lwip-users] ping thread fails to works when IP, UDP, TCP and ICMP 
checksums by hardware

An idea: comment this line in ping_prepare_echo function:
iecho->chksum = inet_chksum(iecho, len);

Von: 
[email protected]<mailto:[email protected]>
 [mailto:[email protected]] Im Auftrag 
von vincent cui
Gesendet: Mittwoch, 6. Juni 2012 13:12
An: Mailing list for lwIP users
Betreff: [lwip-users] ping thread fails to works when IP, UDP, TCP and ICMP 
checksums by hardware

All
I ported ping thread from contrib. packet, and found that it fails to works 
when IP, UDP, TCP and ICMP checksums by HW.
But it works when those checksums by SW.

Anyone meets same problem ?

Regards,
Vincent
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to