38#ifndef LWIP_HDR_DHCP_H
39#define LWIP_HDR_DHCP_H
48#if LWIP_DHCP_DOES_ACD_CHECK
58#ifdef DHCP_TIMEOUT_SIZE_T
59typedef DHCP_TIMEOUT_SIZE_T dhcp_timeout_t;
61typedef u16_t dhcp_timeout_t;
64#ifndef DHCP_COARSE_TIMER_SECS
65#define DHCP_COARSE_TIMER_SECS 60
68#define DHCP_COARSE_TIMER_MSECS (DHCP_COARSE_TIMER_SECS * 1000UL)
70#define DHCP_FINE_TIMER_MSECS 500
72#define DHCP_BOOT_FILE_LEN 128U
74#define DHCP_FLAG_SUBNET_MASK_GIVEN 0x01
75#define DHCP_FLAG_EXTERNAL_MEM 0x02
79 DHCP_AUTOIP_COOP_STATE_OFF = 0,
80 DHCP_AUTOIP_COOP_STATE_ON = 1
81} dhcp_autoip_coop_state_enum_t;
96 dhcp_timeout_t request_timeout;
97 dhcp_timeout_t t1_timeout;
98 dhcp_timeout_t t2_timeout;
99 dhcp_timeout_t t1_renew_time;
100 dhcp_timeout_t t2_rebind_time;
101 dhcp_timeout_t lease_used;
102 dhcp_timeout_t t0_timeout;
104 ip4_addr_t offered_ip_addr;
105 ip4_addr_t offered_sn_mask;
106 ip4_addr_t offered_gw_addr;
108 u32_t offered_t0_lease;
109 u32_t offered_t1_renew;
110 u32_t offered_t2_rebind;
111#if LWIP_DHCP_BOOTP_FILE
112 ip4_addr_t offered_si_addr;
113 char boot_file_name[DHCP_BOOT_FILE_LEN];
115#if LWIP_DHCP_DOES_ACD_CHECK
124#define dhcp_remove_struct(netif) netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL)
130void dhcp_release_and_stop(
struct netif *
netif);
132void dhcp_network_changed_link_up(
struct netif *
netif);
136void dhcp_coarse_tmr(
void);
138void dhcp_fine_tmr(
void);
140#if LWIP_DHCP_GET_NTP_SRV
144extern void dhcp_set_ntp_servers(
u8_t num_ntp_servers,
const ip4_addr_t* ntp_server_addrs);
147#define netif_dhcp_data(netif) ((struct dhcp*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP))
void dhcp(struct packet *packet)