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;
77 #if LWIP_DHCP_AUTOIP_COOP
78 u8_t autoip_coop_state;
80 u8_t subnet_mask_given;
82 u16_t request_timeout;
90 ip4_addr_t offered_ip_addr;
91 ip4_addr_t offered_sn_mask;
92 ip4_addr_t offered_gw_addr;
94 u32_t offered_t0_lease;
95 u32_t offered_t1_renew;
96 u32_t offered_t2_rebind;
97 #if LWIP_DHCP_BOOTP_FILE
98 ip4_addr_t offered_si_addr;
99 char boot_file_name[DHCP_BOOT_FILE_LEN];
104 void dhcp_set_struct(
struct netif *
netif,
struct dhcp *dhcp);
106 #define dhcp_remove_struct(netif) netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL)
112 void dhcp_release_and_stop(
struct netif *
netif);
114 void dhcp_network_changed(
struct netif *
netif);
115 #if DHCP_DOES_ARP_CHECK
116 void dhcp_arp_reply(
struct netif *
netif,
const ip4_addr_t *addr);
120 void dhcp_coarse_tmr(
void);
122 void dhcp_fine_tmr(
void);
124 #if LWIP_DHCP_GET_NTP_SRV
128 extern void dhcp_set_ntp_servers(
u8_t num_ntp_servers,
const ip4_addr_t* ntp_server_addrs);
131 #define netif_dhcp_data(netif) ((struct dhcp*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP))
uint32_t u32_t
Definition: arch.h:129
uint8_t u8_t
Definition: arch.h:125
uint16_t u16_t
Definition: arch.h:127
s8_t err_t
Definition: err.h:96
ip6_addr_t ip_addr_t
Definition: ip_addr.h:318