38 #ifndef LWIP_HDR_DHCP_H
39 #define LWIP_HDR_DHCP_H
53 #define DHCP_COARSE_TIMER_SECS 60
55 #define DHCP_COARSE_TIMER_MSECS (DHCP_COARSE_TIMER_SECS * 1000UL)
57 #define DHCP_FINE_TIMER_MSECS 500
59 #define DHCP_BOOT_FILE_LEN 128U
63 DHCP_AUTOIP_COOP_STATE_OFF = 0,
64 DHCP_AUTOIP_COOP_STATE_ON = 1
65 } dhcp_autoip_coop_state_enum_t;
79 #if LWIP_DHCP_AUTOIP_COOP
80 u8_t autoip_coop_state;
82 u8_t subnet_mask_given;
86 u16_t options_out_len;
87 u16_t request_timeout;
95 ip4_addr_t offered_ip_addr;
96 ip4_addr_t offered_sn_mask;
97 ip4_addr_t offered_gw_addr;
99 u32_t offered_t0_lease;
100 u32_t offered_t1_renew;
101 u32_t offered_t2_rebind;
102 #if LWIP_DHCP_BOOTP_FILE
103 ip4_addr_t offered_si_addr;
104 char boot_file_name[DHCP_BOOT_FILE_LEN];
109 void dhcp_set_struct(
struct netif *
netif,
struct dhcp *dhcp);
111 #define dhcp_remove_struct(netif) netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL)
118 void dhcp_network_changed(
struct netif *
netif);
119 #if DHCP_DOES_ARP_CHECK
120 void dhcp_arp_reply(
struct netif *
netif,
const ip4_addr_t *addr);
124 void dhcp_coarse_tmr(
void);
126 void dhcp_fine_tmr(
void);
128 #if LWIP_DHCP_GET_NTP_SRV
132 extern void dhcp_set_ntp_servers(
u8_t num_ntp_servers,
const ip4_addr_t* ntp_server_addrs);
135 #define netif_dhcp_data(netif) ((struct dhcp*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP))