|
From: | Robert Deschambault |
Subject: | Re: [lwip-users] Strategy Question for DHCP |
Date: | Thu, 18 Jun 2015 10:28:38 -0400 |
Hi,I did a quick test to see when the autoip state is set to stop. It looks like that when the IP address becomes non-zero, the DHCP code recognizes the assignment and makes a call to dhcp_stop() which I believe is calling autoip_stop() function coop mode. Here is what the printf debug looks like at assignment (my code is also printing stuff too and please remember I have modified the default IP address pool for my application):...dhcp_discover()transaction id xid(abcd0001)dhcp_discover: making requestdhcp_discover: realloc()ingdhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)dhcp_discover: deleting()ingdhcp_discover: SELECTINGdhcp_discover(): set request timeout 16000 msecsautoip_tmr() AutoIP-State: 2, ttw=6autoip_tmr() AutoIP-State: 2, ttw=5autoip_tmr() AutoIP-State: 2, ttw=4autoip_tmr() AutoIP-State: 2, ttw=3autoip_tmr() AutoIP-State: 2, ttw=2autoip_tmr() AutoIP-State: 2, ttw=1autoip_tmr() AutoIP-State: 2, ttw=0autoip_bind(netif=20000778) cd0 192.168.252.11autoip_tmr() AutoIP-State: 2, ttw=20autoip_tmr() AutoIP-State: 2, ttw=19MAIN: Network assigned by DHCP server:dhcp_stop()MAIN: IP: 192.168.252.11MAIN: SN: 255.255.255.0MAIN: GW: 192.168.252.1autoip_tmr() AutoIP-State: 0, ttw=18autoip_tmr() AutoIP-State: 0, ttw=18autoip_tmr() AutoIP-State: 0, ttw=18...after this the last line is repeated over and over again. ttw always stays at 18 and the state is always 0 (stop). I don't know if this the expected behavior?--Bob Deschambault
[Prev in Thread] | Current Thread | [Next in Thread] |