Hi,
I have been trying to implement ping via LWIP into my custom TM4C board with little success.
After doing tracing on wireshark I have found that the board receives the ping and does respond but leaves the checksum as a 0 (all of this done on Windows 10). Because the checksum is a 0 the response in my command line is "Request timed out".
So, I have looked at a few other LWIP sources and found that the issue is in the icmp.c (ipv4) source file in the icmp_input function. When i have tried to step through this section I can see the checksum go into ip_output_if with a value and come back out with a 0. I have traced through ip_output_if and can not find a single place that modifies the checksum handed in through the payload buffer.
I have also modified lwipopts.h. LWIP_ICMP is defined to 1 and all of the checksums in the checksum options are defined to 1.
At this point I am stuck and would like some help getting this checksum issue fixed. As far as I can tell this is the only thing holding my ping response hostage.
Reference Code:
ip_output_if (p, ip_current_dest_addr(), IP_HDRINCL, ICMP_TTL, 0, IP_PROTO_ICMP, inp); // Line 223 in icmp.c
//*****************************************************************************
//
// ---------- checksum options ----------
// changed from the original, all of these were commented
//*****************************************************************************
#define CHECKSUM_GEN_IP 1
#define CHECKSUM_GEN_UDP 1
#define CHECKSUM_GEN_TCP 1
#define CHECKSUM_CHECK_IP 1
#define CHECKSUM_CHECK_UDP 1
#define CHECKSUM_CHECK_TCP 1