lwip-users
[Top][All Lists]
Advanced

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

Re:Re: [lwip-users] Is something wrong in netconn_accetp() api ??


From: yihect
Subject: Re:Re: [lwip-users] Is something wrong in netconn_accetp() api ??
Date: Thu, 21 Aug 2008 13:28:11 +0800 (CST)

 Hi, Jonathan, thanks a lot for your reply.
 
 The netconn_recv() can return none-zero netbuf ptr now. But the http demo can't work yet.
 
 Debugging network program seems tool difficult. The client tool, IE in my windows, will send several ethernet frames to my bf531 box continuously. That makes me difficult to debug, because several network chip interrupts raise up, and the program will goes here and there in multi_tasks environment like uCOS.. oh, that makes headache to me.
  So, my question is: is there some simple tools for protocol stack debugging? To be an example, is there one tool, by which we can send a package or frame one time manually?
 
 


 

在2008-08-20,"Jonathan Larmour" <address@hidden> 写道:
>yihect wrote:
>>  
>>   When I sent a http request using TELNET program in my pc, the 
>> netconn_accept() returned, and I had noticed SYN/SYN+ACK/ACK packages in 
>> Ethereal, I think that meas the TCP connection(accept_conn) have 
>> established.
>>   But when I stepped into netconn_recv() in http_server_serve() fun, I 
>> found the conn->state is equal to zero, namely NETCONN_NONE.
>
>That is correct.
>
>> Finally, 
>> netconn_recv() return a null pointer, and the port is crashed.
>
>Is that just after you closed your telnet? If so, then I don't believe 
>there's any problem. The example program is not robust to that - it's only 
>a trivial example for demonstration purposes. It doesn't check the return 
>from netconn_recv.
>
>>   Here, Is something wrong? Since the connection had been established , 
>> should state field of the connection be NETCONN_CONNECT , not be 
>> NETCONN_NONE ? From Ethereal's output, the connection have closed, which 
>> proved by debugging into following if-block in netconn_recv() fun:
>
>NETCONN_CONNECT is only used if something is waiting for a 
>netconn_connect() to complete.
>
>Jifl
>-- 
>eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
>Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
>Registered in England and Wales: Reg No 4422071.
>------["The best things in life aren't things."]------      Opinions==mine
>
>
>_______________________________________________
>lwip-users mailing list
>address@hidden
>http://lists.nongnu.org/mailman/listinfo/lwip-users



伊利:有梦想,就有下一次飞翔。期待刘翔王者归来。
reply via email to

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