DHCP problems

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

DHCP problems

Trampas Stern
I am trying to get DCHP work and have yet to do so I have the following and was wondering if it was enough to help debug the problem?

dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541413120.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541416224.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541414672.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541413120.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541417776.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541416224.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541417776.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541413120.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541416224.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP problems

Trampas Stern
here is some more logs:
dhcp.c  518: dhcp_fine_tmr(): request timeout
dhcp.c  539: dhcp_timeout()
dhcp.c  542: dhcp_timeout(): restarting discovery
dhcp.c  978: dhcp_discover()
dhcp.c 1899: transaction id xid(abcd0001)
dhcp.c  992: dhcp_discover: making request
dhcp.c 1004: dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
dhcp.c 1006: dhcp_discover: deleting()
dhcp.c 1008: dhcp_discover: SELECTING
dhcp.c 1018: dhcp_discover(): set request timeout 4000 msecs
task_sd_card.cpp  250: SD Card mounted
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541417776.192.168.168 port 168
dhcp.c 1751: pbuf->len = 268
dhcp.c 1752: pbuf->tot_len = 268
dhcp.c 1789: searching DHCP_OPTION_MESSAGE_TYPE
dhcp.c 1835: DHCP_OFFER received in DHCP_STATE_SELECTING state
dhcp.c  373: dhcp_handle_offer(netif=) e110
dhcp.c  380: dhcp_handle_offer(): server 0xa8a8a8c0
dhcp.c  384: dhcp_handle_offer(): offer for 0x9ca8a8c0
dhcp.c  415: dhcp_select(netif=) e110
dhcp.c 1899: transaction id xid(abcd0001)
dhcp.c  447: dhcp_select: REQUESTING
dhcp.c  457: dhcp_select(): set request timeout 2000 msecs
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541413120.192.168.168 port 168
dhcp.c 1751: pbuf->len = 268
dhcp.c 1752: pbuf->tot_len = 268
dhcp.c 1789: searching DHCP_OPTION_MESSAGE_TYPE
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541417776.192.168.168 port 168
dhcp.c 1751: pbuf->len = 268
dhcp.c 1752: pbuf->tot_len = 268
dhcp.c 1789: searching DHCP_OPTION_MESSAGE_TYPE
dhcp.c 1801: DHCP_ACK received
dhcp.c  354: dhcp_check(netif=) e
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541417776.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541413120.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272

On Fri, Feb 14, 2020 at 1:03 PM Trampas Stern <[hidden email]> wrote:
I am trying to get DCHP work and have yet to do so I have the following and was wondering if it was enough to help debug the problem?

dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541413120.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541416224.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541414672.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541413120.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541417776.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541416224.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541417776.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541413120.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541416224.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP problems

Trampas Stern
OK walking through the code it appears somewhere along the way the ACD module was added and it looks like it needs to have it's timer periodically called. 

I added it to the timer list and seem to work now.  I would have figured that the ACD timer would have been called from the DHCP timer for backwards compatibility. I assume this was done for a good reason. 

trampas

/* LwIP tmr functions list. */
static timers_info_t gs_timers_table[] = {
{0, TCP_TMR_INTERVAL, tcp_tmr},
{0, IP_TMR_INTERVAL, ip_reass_tmr},
#if 0
/* LWIP_TCP */
{0, TCP_FAST_INTERVAL, tcp_fasttmr},
{0, TCP_SLOW_INTERVAL, tcp_slowtmr},
#endif
/* LWIP_ARP */
{0, ARP_TMR_INTERVAL, etharp_tmr},
/* LWIP_DHCP */
#if LWIP_DHCP
{0, DHCP_COARSE_TIMER_MSECS, dhcp_coarse_tmr},
{0, DHCP_FINE_TIMER_MSECS, dhcp_fine_tmr},
{0, ACD_TMR_INTERVAL, acd_tmr},
#endif
};

On Fri, Feb 14, 2020 at 1:05 PM Trampas Stern <[hidden email]> wrote:
here is some more logs:
dhcp.c  518: dhcp_fine_tmr(): request timeout
dhcp.c  539: dhcp_timeout()
dhcp.c  542: dhcp_timeout(): restarting discovery
dhcp.c  978: dhcp_discover()
dhcp.c 1899: transaction id xid(abcd0001)
dhcp.c  992: dhcp_discover: making request
dhcp.c 1004: dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
dhcp.c 1006: dhcp_discover: deleting()
dhcp.c 1008: dhcp_discover: SELECTING
dhcp.c 1018: dhcp_discover(): set request timeout 4000 msecs
task_sd_card.cpp  250: SD Card mounted
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541417776.192.168.168 port 168
dhcp.c 1751: pbuf->len = 268
dhcp.c 1752: pbuf->tot_len = 268
dhcp.c 1789: searching DHCP_OPTION_MESSAGE_TYPE
dhcp.c 1835: DHCP_OFFER received in DHCP_STATE_SELECTING state
dhcp.c  373: dhcp_handle_offer(netif=) e110
dhcp.c  380: dhcp_handle_offer(): server 0xa8a8a8c0
dhcp.c  384: dhcp_handle_offer(): offer for 0x9ca8a8c0
dhcp.c  415: dhcp_select(netif=) e110
dhcp.c 1899: transaction id xid(abcd0001)
dhcp.c  447: dhcp_select: REQUESTING
dhcp.c  457: dhcp_select(): set request timeout 2000 msecs
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541413120.192.168.168 port 168
dhcp.c 1751: pbuf->len = 268
dhcp.c 1752: pbuf->tot_len = 268
dhcp.c 1789: searching DHCP_OPTION_MESSAGE_TYPE
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541417776.192.168.168 port 168
dhcp.c 1751: pbuf->len = 268
dhcp.c 1752: pbuf->tot_len = 268
dhcp.c 1789: searching DHCP_OPTION_MESSAGE_TYPE
dhcp.c 1801: DHCP_ACK received
dhcp.c  354: dhcp_check(netif=) e
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541417776.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541413120.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272

On Fri, Feb 14, 2020 at 1:03 PM Trampas Stern <[hidden email]> wrote:
I am trying to get DCHP work and have yet to do so I have the following and was wondering if it was enough to help debug the problem?

dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541413120.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541416224.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541414672.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541413120.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541417776.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541416224.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541417776.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541413120.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c 1750: dhcp_recv(pbuf = ) from DHCP server 541416224.192.168.168 port 168
dhcp.c 1751: pbuf->len = 272
dhcp.c 1752: pbuf->tot_len = 272
dhcp.c 1772: netif->hwaddr[1]==04 != reply_msg->chaddr[1]==22
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()
dhcp.c  469: dhcp_coarse_tmr()

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP problems

goldsimon@gmx.de
Am 14.02.2020 um 19:53 schrieb Trampas Stern:
> OK walking through the code it appears somewhere along the way the ACD
> module was added and it looks like it needs to have it's
> timer periodically called. 
>
> I added it to the timer list and seem to work now.  I would have figured
> that the ACD timer would have been called from the DHCP timer for
> backwards compatibility. I assume this was done for a good reason.

Sorry for the inconvenience. Yes, there *is* a reason: ACD has been
implemented in a bad way before inside dhcp.c plus it can now be used
without DHCP enabled, and its interval is 100ms, not 500ms like dhcp.

However, calling all those timer functions yourself is not what you
should be doing. We need to be free in adding timers to change/fix
things like this.

Even when not using the automatic timer handling provided by lwIP, you
should use the list of timers (and corresponding intervals) provided as
'lwip_cyclic_timers' array by timeouts.h.

Regards,
Simon


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

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: DHCP problems

Trampas Stern
How should I be using the 'lwip_cyclic_timers' ?

On Sat, Feb 15, 2020 at 2:36 PM [hidden email] <[hidden email]> wrote:
Am 14.02.2020 um 19:53 schrieb Trampas Stern:
> OK walking through the code it appears somewhere along the way the ACD
> module was added and it looks like it needs to have it's
> timer periodically called. 
>
> I added it to the timer list and seem to work now.  I would have figured
> that the ACD timer would have been called from the DHCP timer for
> backwards compatibility. I assume this was done for a good reason.

Sorry for the inconvenience. Yes, there *is* a reason: ACD has been
implemented in a bad way before inside dhcp.c plus it can now be used
without DHCP enabled, and its interval is 100ms, not 500ms like dhcp.

However, calling all those timer functions yourself is not what you
should be doing. We need to be free in adding timers to change/fix
things like this.

Even when not using the automatic timer handling provided by lwIP, you
should use the list of timers (and corresponding intervals) provided as
'lwip_cyclic_timers' array by timeouts.h.

Regards,
Simon

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

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP problems

goldsimon@gmx.de


Am 17. Februar 2020 13:21:46 MEZ schrieb Trampas Stern <[hidden email]>:
>How should I be using the 'lwip_cyclic_timers' ?

It's an array of timer callback functions and their required timer frequency. You should use this to set up your timers, so you'll be calling all required timers in the future.

Regards,
Simon

>
>On Sat, Feb 15, 2020 at 2:36 PM [hidden email] <[hidden email]>
>wrote:
>
>> Am 14.02.2020 um 19:53 schrieb Trampas Stern:
>> > OK walking through the code it appears somewhere along the way the
>ACD
>> > module was added and it looks like it needs to have it's
>> > timer periodically called.
>> >
>> > I added it to the timer list and seem to work now.  I would have
>figured
>> > that the ACD timer would have been called from the DHCP timer for
>> > backwards compatibility. I assume this was done for a good reason.
>>
>> Sorry for the inconvenience. Yes, there *is* a reason: ACD has been
>> implemented in a bad way before inside dhcp.c plus it can now be used
>> without DHCP enabled, and its interval is 100ms, not 500ms like dhcp.
>>
>> However, calling all those timer functions yourself is not what you
>> should be doing. We need to be free in adding timers to change/fix
>> things like this.
>>
>> Even when not using the automatic timer handling provided by lwIP,
>you
>> should use the list of timers (and corresponding intervals) provided
>as
>> 'lwip_cyclic_timers' array by timeouts.h.
>>
>> Regards,
>> Simon
>>
>> _______________________________________________
>> lwip-users mailing list
>> [hidden email]
>> https://lists.nongnu.org/mailman/listinfo/lwip-users

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