11#ifndef ZEPHYR_INCLUDE_NET_DHCPV4_SERVER_H_
12#define ZEPHYR_INCLUDE_NET_DHCPV4_SERVER_H_
32#define DHCPV4_CLIENT_ID_MAX_SIZE 20
34enum dhcpv4_server_addr_state {
35 DHCPV4_SERVER_ADDR_FREE,
36 DHCPV4_SERVER_ADDR_RESERVED,
37 DHCPV4_SERVER_ADDR_ALLOCATED,
38 DHCPV4_SERVER_ADDR_DECLINED,
41struct dhcpv4_client_id {
42 uint8_t buf[DHCPV4_CLIENT_ID_MAX_SIZE];
46struct dhcpv4_addr_slot {
47 enum dhcpv4_server_addr_state
state;
48 struct dhcpv4_client_id client_id;
93 struct dhcpv4_addr_slot *lease,
int net_dhcpv4_server_start(struct net_if *iface, struct in_addr *base_addr)
Start DHCPv4 server instance on an iface.
int net_dhcpv4_server_foreach_lease(struct net_if *iface, net_dhcpv4_lease_cb_t cb, void *user_data)
Iterate over all DHCPv4 address leases on a given network interface and call callback for each lease.
int net_dhcpv4_server_stop(struct net_if *iface)
Stop DHCPv4 server instance on an iface.
void(* net_dhcpv4_lease_cb_t)(struct net_if *iface, struct dhcpv4_addr_slot *lease, void *user_data)
Callback used while iterating over active DHCPv4 address leases.
Definition: dhcpv4_server.h:92
IPv6 and IPv4 definitions.
state
Definition: parser_state.h:29
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
IPv4 address struct.
Definition: net_ip.h:151
Kernel timepoint type.
Definition: sys_clock.h:219
Network Interface structure.
Definition: net_if.h:675
Variables needed for system clock.