Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
dhcpv6.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
11#ifndef ZEPHYR_INCLUDE_NET_DHCPV6_H_
12#define ZEPHYR_INCLUDE_NET_DHCPV6_H_
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
28enum net_dhcpv6_state {
29 NET_DHCPV6_DISABLED,
30 NET_DHCPV6_INIT,
31 NET_DHCPV6_SOLICITING,
32 NET_DHCPV6_REQUESTING,
33 NET_DHCPV6_CONFIRMING,
34 NET_DHCPV6_RENEWING,
35 NET_DHCPV6_REBINDING,
36 NET_DHCPV6_INFO_REQUESTING,
37 NET_DHCPV6_BOUND,
38} __packed;
39
40#define DHCPV6_TID_SIZE 3
41
42#ifndef CONFIG_NET_DHCPV6_DUID_MAX_LEN
43#define CONFIG_NET_DHCPV6_DUID_MAX_LEN 22
44#endif
45
46struct net_dhcpv6_duid_raw {
47 uint16_t type;
48 uint8_t buf[CONFIG_NET_DHCPV6_DUID_MAX_LEN];
49} __packed;
50
51struct net_dhcpv6_duid_storage {
52 struct net_dhcpv6_duid_raw duid;
53 uint8_t length;
54};
55
56struct net_if;
57
62 bool request_addr : 1;
63 bool request_prefix : 1;
64};
65
77void net_dhcpv6_start(struct net_if *iface, struct net_dhcpv6_params *params);
78
88void net_dhcpv6_stop(struct net_if *iface);
89
98void net_dhcpv6_restart(struct net_if *iface);
99
107const char *net_dhcpv6_state_name(enum net_dhcpv6_state state);
108
115#ifdef __cplusplus
116}
117#endif
118
119#endif /* ZEPHYR_INCLUDE_NET_DHCPV6_H_ */
void net_dhcpv6_restart(struct net_if *iface)
Restart DHCPv6 client on an iface.
void net_dhcpv6_start(struct net_if *iface, struct net_dhcpv6_params *params)
Start DHCPv6 client on an iface.
void net_dhcpv6_stop(struct net_if *iface)
Stop DHCPv6 client on an iface.
state
Definition: parser_state.h:29
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
DHCPv6 client configuration parameters.
Definition: dhcpv6.h:61
bool request_addr
Request IPv6 address.
Definition: dhcpv6.h:62
bool request_prefix
Request IPv6 prefix.
Definition: dhcpv6.h:63
Network Interface structure.
Definition: net_if.h:675