[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] netconn_recv blocked
From: |
Chien-Lung Wu |
Subject: |
RE: [lwip-users] netconn_recv blocked |
Date: |
Thu, 20 Dec 2007 11:06:58 -0500 |
Hi, Jifl:
Thank you so much for your help.
I trace the DHCP_OFFER packet. It is up to upd_input() with src_port
67, and dest_port 68. What I don't understand is how such DHCP_OFFER
packet gos up (function1 -> function2-> ...-> netconn_recv())for
netconn_recv. Would you please give me some hints? Thanks.
Merry Christmas,
David
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Jonathan Larmour
Sent: Tuesday, December 18, 2007 9:38 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] netconn_recv blocked
Chien-Lung Wu wrote:
>
> 8. My questions:
> Q1. I am sure DHCP server sent out DHCPOFFER packets
> (broadcasting);
>
> HOW can client to receive such broadcast packet?
> Should I rebind the socket/connect again
> (Netconn_bind(conn, IP_ADDR_ANY, DHCP_CLIENT_PORT);)
No.
I suspect since you aren't using the lwIP DHCP client, that you therefor
do not have LWIP_DHCP enabled. That means a magic bit of code in
core/ipv4/ip.c does not get triggered. I suggest you look at that file
(search for LWIP_DHCP in that file) as you'll need that code.
> Q2. The netconn_recv(conn) seems been blocked!
> Are there any ways to have timeout mechanism to unblock the
> process
> After certain time?
If you are using CVS, you can enable LWIP_SO_RCVTIMEO. There isn't an
official API function to then set the timeout, but you do it by
assigning
to the 'recv_timeout' member of the 'struct netconn'.
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