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 whileI 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 dummypackets 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.
http://im.live.com/Messenger/IM/Home/?source=text_hotmail_join

Attachment: udp_checksum error.pcap
Description: Binary data

_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to