lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] Minor fix to dhcp.c


From: Rasmussen, Art N.
Subject: [lwip-devel] Minor fix to dhcp.c
Date: Wed, 13 Feb 2008 11:08:16 -0600


Greetings,

The dhcp module has the option to do an ARP check of the offered IP address. You turn this off using the tag DHCP_DOES_ARP_CHECK. Setting the tag to zero excludes the dhcp_arp_reply() and dhcp_decline() functions from being compiled.

The tag should also turn off the forward decl of the dhcp_decline() function done on line 103 in dhcp.c.

Current code in dhcp.c (line 99)

static err_t dhcp_discover(struct netif *netif);
static err_t dhcp_select(struct netif *netif);
static void dhcp_check(struct netif *netif);
static void dhcp_bind(struct netif *netif);
static err_t dhcp_decline(struct netif *netif);
static err_t dhcp_rebind(struct netif *netif);
static void dhcp_set_state(struct dhcp *dhcp, u8_t new_state);

The updated code would add the #if / #endif:

static err_t dhcp_discover(struct netif *netif);
static err_t dhcp_select(struct netif *netif);
static void dhcp_check(struct netif *netif);
static void dhcp_bind(struct netif *netif);
#if DHCP_DOES_ARP_CHECK
static err_t dhcp_decline(struct netif *netif);
#endif /* DHCP_DOES_ARP_CHECK */
static err_t dhcp_rebind(struct netif *netif);
static void dhcp_set_state(struct dhcp *dhcp, u8_t new_state);

This would silence warnings produced by a compiler 'declared but not implemented' or similar.

(Alternative one could move the location of the function and remove the forward decl.)

Thanks,
Art Rasmussen


reply via email to

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