|
From: | Muhamad Ikhwan Ismail |
Subject: | [lwip-users] udp checksum error |
Date: | Thu, 17 Jan 2008 10:33:51 +0000 |
Hi.. As always I have checked any thread having something to do with this, and the only one I found was related to old lwip 0.5 while I am using lwip 1.2 and things are running very2 well accept for this slight weird problem. I am using the socket API sending some dummy packets to a UDP echo server I setup on the other node. The sending went well except for I am having UDP checksum error. This didnt happen for TCP. I used DHCP, which uses UDP directly, and DHCP works fine. So it kinda awkard to me that my short client having this problem. Any ideas would be welcomed. Following is a piece of the client code. My platform is MPC852T running SMX RTOS. I also attached the wireshark trace. Thanks a lot in advance. void test_udp_socket(void){ int socket_index; SCB_PTR suspend_udp; //semaphore used to suspend the thread suspend_udp = create_sema(1); socket_index = lwip_socket(AF_INET,SOCK_DGRAM,0x00); /*now get a sockaddr structure corresponding to socket domain AF_INET */ struct sockaddr_in* endpoint = (struct sockaddr_in*)mallocx(sizeof(struct sockaddr)); (endpoint)->sin_family = AF_INET; (endpoint)->sin_port = (htons(7)); struct ip_addr server_ip; IP4_ADDR(&server_ip,169,254,36,145); (endpoint)->sin_addr.s_addr = server_ip.addr; int addrlen = (endpoint)->sin_len = sizeof((endpoint)->sin_addr.s_addr); char* dummy_data = (char*)mallocx(12); for(int i =0 ; i<12;i++) dummy_data[i]= '2'; while(1){ lwip_sendto(socket_index,(void*)dummy_data,12,0,(struct sockaddr*)endpoint,addrlen); WaitForSingleObject(suspend_udp,SMX_MSEC_TO_TICKS(10)); } } Helping your favorite cause is as easy as instant messaging. You IM, we give. Learn more. |
udp_checksum error.pcap
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |