Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
dhcpv6_server.h
Go to the documentation of this file.
1/*
2 * Copyright The Zephyr Project Contributors
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
10
11#ifndef ZEPHYR_INCLUDE_NET_DHCPV6_SERVER_H_
12#define ZEPHYR_INCLUDE_NET_DHCPV6_SERVER_H_
13
14#include <zephyr/net/net_ip.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
28
29struct net_if;
30
61
71 struct net_dhcpv6_server_params *params);
72
80int net_dhcpv6_server_stop(struct net_if *iface);
81
83
85struct net_dhcpv6_server_lease {
87 struct net_in6_addr addr;
89 struct net_in6_addr prefix;
91 const uint8_t *duid;
95 int64_t expiry;
97 uint8_t duid_len;
99 uint8_t prefix_len;
101 bool has_addr;
103 bool has_prefix;
104};
105
107
117 struct net_if *iface, struct net_dhcpv6_server_lease *lease,
118 void *user_data);
119
135 void *user_data);
136
140
141#ifdef __cplusplus
142}
143#endif
144
145#endif /* ZEPHYR_INCLUDE_NET_DHCPV6_SERVER_H_ */
int net_dhcpv6_server_start(struct net_if *iface, struct net_dhcpv6_server_params *params)
Start the DHCPv6 server on the given interface.
void(* net_dhcpv6_server_lease_cb_t)(struct net_if *iface, struct net_dhcpv6_server_lease *lease, void *user_data)
Callback used while iterating over DHCPv6 server leases.
Definition dhcpv6_server.h:116
int net_dhcpv6_server_foreach_lease(struct net_if *iface, net_dhcpv6_server_lease_cb_t cb, void *user_data)
Iterate over all DHCPv6 server leases and call cb for each.
int net_dhcpv6_server_stop(struct net_if *iface)
Stop the DHCPv6 server on the given interface.
IPv6 and IPv4 definitions.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__INT64_TYPE__ int64_t
Definition stdint.h:75
DHCPv6 server configuration parameters.
Definition dhcpv6_server.h:32
uint32_t preferred_lifetime
Preferred lifetime advertised to clients (seconds).
Definition dhcpv6_server.h:50
uint8_t prefix_len
Length (in bits) of the prefixes delegated to clients, e.g.
Definition dhcpv6_server.h:53
struct net_in6_addr prefix
Base of the prefix pool used for prefix delegation (IA_PD).
Definition dhcpv6_server.h:37
bool offer_prefix
Hand out IA_PD (delegated) prefixes.
Definition dhcpv6_server.h:59
struct net_in6_addr addr
Base of the address pool used for non-temporary address assignment (IA_NA).
Definition dhcpv6_server.h:42
bool offer_addr
Hand out IA_NA (non-temporary) addresses.
Definition dhcpv6_server.h:56
uint32_t valid_lifetime
Valid lifetime advertised to clients (seconds).
Definition dhcpv6_server.h:45
Network Interface structure.
Definition net_if.h:764
IPv6 address struct.
Definition net_ip.h:144