57 #ifndef LWIP_HDR_DHCP_H 58 #define LWIP_HDR_DHCP_H 72 #define DHCP_COARSE_TIMER_SECS 60 74 #define DHCP_COARSE_TIMER_MSECS (DHCP_COARSE_TIMER_SECS * 1000UL) 76 #define DHCP_FINE_TIMER_MSECS 500 78 #define DHCP_BOOT_FILE_LEN 128U 82 DHCP_AUTOIP_COOP_STATE_OFF = 0,
83 DHCP_AUTOIP_COOP_STATE_ON = 1
84 } dhcp_autoip_coop_state_enum_t;
98 #if LWIP_DHCP_AUTOIP_COOP 99 u8_t autoip_coop_state;
101 u8_t subnet_mask_given;
105 u16_t options_out_len;
106 u16_t request_timeout;
110 u16_t t2_rebind_time;
113 ip_addr_t server_ip_addr;
114 ip4_addr_t offered_ip_addr;
115 ip4_addr_t offered_sn_mask;
116 ip4_addr_t offered_gw_addr;
118 u32_t offered_t0_lease;
119 u32_t offered_t1_renew;
120 u32_t offered_t2_rebind;
121 #if LWIP_DHCP_BOOTP_FILE 122 ip4_addr_t offered_si_addr;
123 char boot_file_name[DHCP_BOOT_FILE_LEN];
128 void dhcp_set_struct(
struct netif *
netif,
struct dhcp *dhcp);
130 #define dhcp_remove_struct(netif) do { (netif)->dhcp = NULL; } while(0) 137 void dhcp_network_changed(
struct netif *
netif);
138 #if DHCP_DOES_ARP_CHECK 139 void dhcp_arp_reply(
struct netif *
netif,
const ip4_addr_t *addr);
141 u8_t dhcp_supplied_address(
const struct netif *
netif);
143 void dhcp_coarse_tmr(
void);
145 void dhcp_fine_tmr(
void);
147 #if LWIP_DHCP_GET_NTP_SRV 151 extern void dhcp_set_ntp_servers(u8_t num_ntp_servers,
const ip4_addr_t* ntp_server_addrs);
154 #define netif_dhcp_data(netif) ((struct dhcp*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP))