25 #ifndef _FNET_DHCP_CLN_H_ 27 #define _FNET_DHCP_CLN_H_ 29 #if FNET_CFG_DHCP_CLN || defined(__DOXYGEN__) 94 #define FNET_DHCP_CLN_LEASE_INFINITY (0xFFFFFFFFU) 101 #define FNET_DHCP_CLN_LEASE_MIN (180U) 140 #if FNET_CFG_DHCP_CLN_BROADCAST 170 #if defined(__cplusplus) 354 #if defined(__cplusplus) void fnet_dhcp_cln_set_response_timeout(fnet_dhcp_cln_desc_t desc, fnet_time_t response_timout_ms)
Change timeout for a DHCP server response.
void fnet_dhcp_cln_release(fnet_dhcp_cln_desc_t desc)
Release the DHCPv4 client service.
fnet_bool_t probe_addr
Probing of the newly received address with ARP:
void fnet_dhcp_cln_set_callback_discover(fnet_dhcp_cln_desc_t desc, fnet_dhcp_cln_callback_t callback_discover, void *cookie)
Register the "Discover message sent" DHCP event handler callback.
fnet_netif_desc_t netif
Network interface descriptor to be used by the DHCP client.
fnet_dhcp_cln_desc_t fnet_dhcp_cln_init(fnet_dhcp_cln_params_t *params)
Initialize the DHCPv4 client service.
fnet_uint32_t fnet_time_t
Unsigned integer type representing time uinits. It can be seconds or milliseconds.
fnet_uint32_t t2
Rebinding (T2) Time Value in seconds (in network byte order). This option specifies the time interval...
void fnet_dhcp_cln_set_callback_updated(fnet_dhcp_cln_desc_t desc, fnet_dhcp_cln_callback_t callback_updated, void *cookie)
Register the "IP parameters updated" DHCP event handler callback.
fnet_uint32_t requested_lease_time
Suggested Lease time in seconds (in network byte order). The client can suggest to the DHCP server th...
struct fnet_in_addr netmask
Subnet Mask (in network byte order).
struct fnet_in_addr ip_address
Client IP address assigned by the DHCP server (in network byte order).
fnet_bool_t fnet_dhcp_cln_is_enabled(fnet_dhcp_cln_desc_t desc)
Detect if the DHCP Client service is enabled or disabled.
fnet_uint32_t t1
Renewal (T1) Time Value in seconds (in network byte order). This option specifies the time interval f...
fnet_dhcp_cln_desc_t fnet_dhcp_cln_get_by_netif(fnet_netif_desc_t netif)
Look for a DHCP Client assigned to the specified network interface.
void * fnet_dhcp_cln_desc_t
DHCPv4 client descriptor.
fnet_uint32_t lease_time
The IP Address Lease Time in seconds (in network byte order). t1 < t2 < lease_time. By default, t1=0.5*lease_time; t2=0.875*lease_time. A user application may ignore this option value. It is used for internal and debug purposes only.
void fnet_dhcp_cln_get_options(fnet_dhcp_cln_desc_t desc, struct fnet_dhcp_cln_options *options)
Retrieve the current DHCPv4 client options retrieved from a DHCP server.
struct fnet_in_addr dhcp_server
The DHCP server IP address (in network byte order).
void(* fnet_dhcp_cln_callback_t)(fnet_dhcp_cln_desc_t desc, fnet_netif_desc_t netif, void *cookie)
DHCP client event handler callback function prototype, that is called when the DHCP client has update...
struct fnet_in_addr gateway
The IP address of a router on the client's subnet (in network byte order).
DHCP options are retrieved from a DHCP server.
void * fnet_netif_desc_t
Network interface descriptor.
Initialization parameters for the fnet_dhcp_cln_init() function.