1 /*
2  * Copyright (c) 2016 Intel Corporation.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /**
8  * @file
9  * @brief Network Events code public header
10  */
11 
12 #ifndef ZEPHYR_INCLUDE_NET_NET_EVENT_H_
13 #define ZEPHYR_INCLUDE_NET_NET_EVENT_H_
14 
15 #include <zephyr/net/net_ip.h>
16 #include <zephyr/net/hostname.h>
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 /**
23  * @addtogroup net_mgmt
24  * @{
25  */
26 
27 /** @cond INTERNAL_HIDDEN */
28 
29 /* Network Interface events */
30 #define _NET_IF_LAYER		NET_MGMT_LAYER_L2
31 #define _NET_IF_CORE_CODE	0x001
32 #define _NET_EVENT_IF_BASE	(NET_MGMT_EVENT_BIT |			\
33 				 NET_MGMT_IFACE_BIT |			\
34 				 NET_MGMT_LAYER(_NET_IF_LAYER) |	\
35 				 NET_MGMT_LAYER_CODE(_NET_IF_CORE_CODE))
36 
37 enum net_event_if_cmd {
38 	NET_EVENT_IF_CMD_DOWN = 1,
39 	NET_EVENT_IF_CMD_UP,
40 	NET_EVENT_IF_CMD_ADMIN_DOWN,
41 	NET_EVENT_IF_CMD_ADMIN_UP,
42 };
43 
44 /* IPv6 Events */
45 #define _NET_IPV6_LAYER		NET_MGMT_LAYER_L3
46 #define _NET_IPV6_CORE_CODE	0x060
47 #define _NET_EVENT_IPV6_BASE	(NET_MGMT_EVENT_BIT |			\
48 				 NET_MGMT_IFACE_BIT |			\
49 				 NET_MGMT_LAYER(_NET_IPV6_LAYER) |	\
50 				 NET_MGMT_LAYER_CODE(_NET_IPV6_CORE_CODE))
51 
52 enum net_event_ipv6_cmd {
53 	NET_EVENT_IPV6_CMD_ADDR_ADD	= 1,
54 	NET_EVENT_IPV6_CMD_ADDR_DEL,
55 	NET_EVENT_IPV6_CMD_MADDR_ADD,
56 	NET_EVENT_IPV6_CMD_MADDR_DEL,
57 	NET_EVENT_IPV6_CMD_PREFIX_ADD,
58 	NET_EVENT_IPV6_CMD_PREFIX_DEL,
59 	NET_EVENT_IPV6_CMD_MCAST_JOIN,
60 	NET_EVENT_IPV6_CMD_MCAST_LEAVE,
61 	NET_EVENT_IPV6_CMD_ROUTER_ADD,
62 	NET_EVENT_IPV6_CMD_ROUTER_DEL,
63 	NET_EVENT_IPV6_CMD_ROUTE_ADD,
64 	NET_EVENT_IPV6_CMD_ROUTE_DEL,
65 	NET_EVENT_IPV6_CMD_DAD_SUCCEED,
66 	NET_EVENT_IPV6_CMD_DAD_FAILED,
67 	NET_EVENT_IPV6_CMD_NBR_ADD,
68 	NET_EVENT_IPV6_CMD_NBR_DEL,
69 	NET_EVENT_IPV6_CMD_DHCP_START,
70 	NET_EVENT_IPV6_CMD_DHCP_BOUND,
71 	NET_EVENT_IPV6_CMD_DHCP_STOP,
72 	NET_EVENT_IPV6_CMD_ADDR_DEPRECATED,
73 	NET_EVENT_IPV6_CMD_PE_ENABLED,
74 	NET_EVENT_IPV6_CMD_PE_DISABLED,
75 	NET_EVENT_IPV6_CMD_PE_FILTER_ADD,
76 	NET_EVENT_IPV6_CMD_PE_FILTER_DEL,
77 	NET_EVENT_IPV6_CMD_PMTU_CHANGED,
78 };
79 
80 /* IPv4 Events*/
81 #define _NET_IPV4_LAYER		NET_MGMT_LAYER_L3
82 #define _NET_IPV4_CORE_CODE	0x004
83 #define _NET_EVENT_IPV4_BASE	(NET_MGMT_EVENT_BIT |			\
84 				 NET_MGMT_IFACE_BIT |			\
85 				 NET_MGMT_LAYER(_NET_IPV4_LAYER) |	\
86 				 NET_MGMT_LAYER_CODE(_NET_IPV4_CORE_CODE))
87 
88 enum net_event_ipv4_cmd {
89 	NET_EVENT_IPV4_CMD_ADDR_ADD	= 1,
90 	NET_EVENT_IPV4_CMD_ADDR_DEL,
91 	NET_EVENT_IPV4_CMD_MADDR_ADD,
92 	NET_EVENT_IPV4_CMD_MADDR_DEL,
93 	NET_EVENT_IPV4_CMD_ROUTER_ADD,
94 	NET_EVENT_IPV4_CMD_ROUTER_DEL,
95 	NET_EVENT_IPV4_CMD_DHCP_START,
96 	NET_EVENT_IPV4_CMD_DHCP_BOUND,
97 	NET_EVENT_IPV4_CMD_DHCP_STOP,
98 	NET_EVENT_IPV4_CMD_MCAST_JOIN,
99 	NET_EVENT_IPV4_CMD_MCAST_LEAVE,
100 	NET_EVENT_IPV4_CMD_ACD_SUCCEED,
101 	NET_EVENT_IPV4_CMD_ACD_FAILED,
102 	NET_EVENT_IPV4_CMD_ACD_CONFLICT,
103 	NET_EVENT_IPV4_CMD_PMTU_CHANGED,
104 };
105 
106 /* L4 network events */
107 #define _NET_L4_LAYER		NET_MGMT_LAYER_L4
108 #define _NET_L4_CORE_CODE	0x114
109 #define _NET_EVENT_L4_BASE	(NET_MGMT_EVENT_BIT |			\
110 				 NET_MGMT_IFACE_BIT |			\
111 				 NET_MGMT_LAYER(_NET_L4_LAYER) |	\
112 				 NET_MGMT_LAYER_CODE(_NET_L4_CORE_CODE))
113 
114 enum net_event_l4_cmd {
115 	NET_EVENT_L4_CMD_CONNECTED = 1,
116 	NET_EVENT_L4_CMD_DISCONNECTED,
117 	NET_EVENT_L4_CMD_IPV4_CONNECTED,
118 	NET_EVENT_L4_CMD_IPV4_DISCONNECTED,
119 	NET_EVENT_L4_CMD_IPV6_CONNECTED,
120 	NET_EVENT_L4_CMD_IPV6_DISCONNECTED,
121 	NET_EVENT_L4_CMD_DNS_SERVER_ADD,
122 	NET_EVENT_L4_CMD_DNS_SERVER_DEL,
123 	NET_EVENT_L4_CMD_HOSTNAME_CHANGED,
124 	NET_EVENT_L4_CMD_CAPTURE_STARTED,
125 	NET_EVENT_L4_CMD_CAPTURE_STOPPED,
126 };
127 
128 /** @endcond */
129 
130 /** Event emitted when the network interface goes down. */
131 #define NET_EVENT_IF_DOWN					\
132 	(_NET_EVENT_IF_BASE | NET_EVENT_IF_CMD_DOWN)
133 
134 /** Event emitted when the network interface goes up. */
135 #define NET_EVENT_IF_UP						\
136 	(_NET_EVENT_IF_BASE | NET_EVENT_IF_CMD_UP)
137 
138 /** Event emitted when the network interface is taken down manually. */
139 #define NET_EVENT_IF_ADMIN_DOWN					\
140 	(_NET_EVENT_IF_BASE | NET_EVENT_IF_CMD_ADMIN_DOWN)
141 
142 /** Event emitted when the network interface goes up manually. */
143 #define NET_EVENT_IF_ADMIN_UP					\
144 	(_NET_EVENT_IF_BASE | NET_EVENT_IF_CMD_ADMIN_UP)
145 
146 /** Event emitted when an IPv6 address is added to the system. */
147 #define NET_EVENT_IPV6_ADDR_ADD					\
148 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ADDR_ADD)
149 
150 /** Event emitted when an IPv6 address is removed from the system. */
151 #define NET_EVENT_IPV6_ADDR_DEL					\
152 	(_NET_EVENT_IPV6_BASE |	NET_EVENT_IPV6_CMD_ADDR_DEL)
153 
154 /** Event emitted when an IPv6 multicast address is added to the system. */
155 #define NET_EVENT_IPV6_MADDR_ADD				\
156 	(_NET_EVENT_IPV6_BASE |	NET_EVENT_IPV6_CMD_MADDR_ADD)
157 
158 /** Event emitted when an IPv6 multicast address is removed from the system. */
159 #define NET_EVENT_IPV6_MADDR_DEL				\
160 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_MADDR_DEL)
161 
162 /** Event emitted when an IPv6 prefix is added to the system. */
163 #define NET_EVENT_IPV6_PREFIX_ADD				\
164 	(_NET_EVENT_IPV6_BASE |	NET_EVENT_IPV6_CMD_PREFIX_ADD)
165 
166 /** Event emitted when an IPv6 prefix is removed from the system. */
167 #define NET_EVENT_IPV6_PREFIX_DEL				\
168 	(_NET_EVENT_IPV6_BASE |	NET_EVENT_IPV6_CMD_PREFIX_DEL)
169 
170 /** Event emitted when an IPv6 multicast group is joined. */
171 #define NET_EVENT_IPV6_MCAST_JOIN				\
172 	(_NET_EVENT_IPV6_BASE |	NET_EVENT_IPV6_CMD_MCAST_JOIN)
173 
174 /** Event emitted when an IPv6 multicast group is left. */
175 #define NET_EVENT_IPV6_MCAST_LEAVE				\
176 	(_NET_EVENT_IPV6_BASE |	NET_EVENT_IPV6_CMD_MCAST_LEAVE)
177 
178 /** Event emitted when an IPv6 router is added to the system. */
179 #define NET_EVENT_IPV6_ROUTER_ADD				\
180 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ROUTER_ADD)
181 
182 /** Event emitted when an IPv6 router is removed from the system. */
183 #define NET_EVENT_IPV6_ROUTER_DEL				\
184 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ROUTER_DEL)
185 
186 /** Event emitted when an IPv6 route is added to the system. */
187 #define NET_EVENT_IPV6_ROUTE_ADD				\
188 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ROUTE_ADD)
189 
190 /** Event emitted when an IPv6 route is removed from the system. */
191 #define NET_EVENT_IPV6_ROUTE_DEL				\
192 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ROUTE_DEL)
193 
194 /** Event emitted when an IPv6 duplicate address detection succeeds. */
195 #define NET_EVENT_IPV6_DAD_SUCCEED				\
196 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_DAD_SUCCEED)
197 
198 /** Event emitted when an IPv6 duplicate address detection fails. */
199 #define NET_EVENT_IPV6_DAD_FAILED				\
200 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_DAD_FAILED)
201 
202 /** Event emitted when an IPv6 neighbor is added to the system. */
203 #define NET_EVENT_IPV6_NBR_ADD					\
204 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_NBR_ADD)
205 
206 /** Event emitted when an IPv6 neighbor is removed from the system. */
207 #define NET_EVENT_IPV6_NBR_DEL					\
208 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_NBR_DEL)
209 
210 /** Event emitted when an IPv6 DHCP client starts. */
211 #define NET_EVENT_IPV6_DHCP_START				\
212 	(_NET_EVENT_IPV6_BASE |	NET_EVENT_IPV6_CMD_DHCP_START)
213 
214 /** Event emitted when an IPv6 DHCP client address is bound. */
215 #define NET_EVENT_IPV6_DHCP_BOUND				\
216 	(_NET_EVENT_IPV6_BASE |	NET_EVENT_IPV6_CMD_DHCP_BOUND)
217 
218 /** Event emitted when an IPv6 DHCP client is stopped. */
219 #define NET_EVENT_IPV6_DHCP_STOP				\
220 	(_NET_EVENT_IPV6_BASE |	NET_EVENT_IPV6_CMD_DHCP_STOP)
221 
222 /** IPv6 address is deprecated. */
223 #define NET_EVENT_IPV6_ADDR_DEPRECATED				\
224 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ADDR_DEPRECATED)
225 
226 /** IPv6 Privacy extension is enabled. */
227 #define NET_EVENT_IPV6_PE_ENABLED				\
228 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PE_ENABLED)
229 
230 /** IPv6 Privacy extension is disabled. */
231 #define NET_EVENT_IPV6_PE_DISABLED				\
232 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PE_DISABLED)
233 
234 /** IPv6 Privacy extension filter is added. */
235 #define NET_EVENT_IPV6_PE_FILTER_ADD				\
236 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PE_FILTER_ADD)
237 
238 /** IPv6 Privacy extension filter is removed. */
239 #define NET_EVENT_IPV6_PE_FILTER_DEL				\
240 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PE_FILTER_DEL)
241 
242 /** IPv6 Path MTU is changed. */
243 #define NET_EVENT_IPV6_PMTU_CHANGED				\
244 	(_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PMTU_CHANGED)
245 
246 /** Event emitted when an IPv4 address is added to the system. */
247 #define NET_EVENT_IPV4_ADDR_ADD					\
248 	(_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ADDR_ADD)
249 
250 /** Event emitted when an IPv4 address is removed from the system. */
251 #define NET_EVENT_IPV4_ADDR_DEL					\
252 	(_NET_EVENT_IPV4_BASE |	NET_EVENT_IPV4_CMD_ADDR_DEL)
253 
254 /** Event emitted when an IPv4 multicast address is added to the system. */
255 #define NET_EVENT_IPV4_MADDR_ADD				\
256 	(_NET_EVENT_IPV4_BASE |	NET_EVENT_IPV4_CMD_MADDR_ADD)
257 
258 /** Event emitted when an IPv4 multicast address is removed from the system. */
259 #define NET_EVENT_IPV4_MADDR_DEL				\
260 	(_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_MADDR_DEL)
261 
262 /** Event emitted when an IPv4 router is added to the system. */
263 #define NET_EVENT_IPV4_ROUTER_ADD				\
264 	(_NET_EVENT_IPV4_BASE |	NET_EVENT_IPV4_CMD_ROUTER_ADD)
265 
266 /** Event emitted when an IPv4 router is removed from the system. */
267 #define NET_EVENT_IPV4_ROUTER_DEL				\
268 	(_NET_EVENT_IPV4_BASE |	NET_EVENT_IPV4_CMD_ROUTER_DEL)
269 
270 /** Event emitted when an IPv4 DHCP client is started. */
271 #define NET_EVENT_IPV4_DHCP_START				\
272 	(_NET_EVENT_IPV4_BASE |	NET_EVENT_IPV4_CMD_DHCP_START)
273 
274 /** Event emitted when an IPv4 DHCP client address is bound. */
275 #define NET_EVENT_IPV4_DHCP_BOUND				\
276 	(_NET_EVENT_IPV4_BASE |	NET_EVENT_IPV4_CMD_DHCP_BOUND)
277 
278 /** Event emitted when an IPv4 DHCP client is stopped. */
279 #define NET_EVENT_IPV4_DHCP_STOP				\
280 	(_NET_EVENT_IPV4_BASE |	NET_EVENT_IPV4_CMD_DHCP_STOP)
281 
282 /** Event emitted when an IPv4 multicast group is joined. */
283 #define NET_EVENT_IPV4_MCAST_JOIN				\
284 	(_NET_EVENT_IPV4_BASE |	NET_EVENT_IPV4_CMD_MCAST_JOIN)
285 
286 /** Event emitted when an IPv4 multicast group is left. */
287 #define NET_EVENT_IPV4_MCAST_LEAVE				\
288 	(_NET_EVENT_IPV4_BASE |	NET_EVENT_IPV4_CMD_MCAST_LEAVE)
289 
290 /** Event emitted when an IPv4 address conflict detection succeeds. */
291 #define NET_EVENT_IPV4_ACD_SUCCEED				\
292 	(_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ACD_SUCCEED)
293 
294 /** Event emitted when an IPv4 address conflict detection fails. */
295 #define NET_EVENT_IPV4_ACD_FAILED				\
296 	(_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ACD_FAILED)
297 
298 /** Event emitted when an IPv4 address conflict was detected after the address
299  *  was confirmed as safe to use. It's up to the application to determine on
300  *  how to act in such case.
301  */
302 #define NET_EVENT_IPV4_ACD_CONFLICT				\
303 	(_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ACD_CONFLICT)
304 
305 /** IPv4 Path MTU is changed. */
306 #define NET_EVENT_IPV4_PMTU_CHANGED				\
307 	(_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_PMTU_CHANGED)
308 
309 /** Event emitted when the system is considered to be connected.
310  * The connected in this context means that the network interface is up,
311  * and the interface has either IPv4 or IPv6 address assigned to it.
312  */
313 #define NET_EVENT_L4_CONNECTED					\
314 	(_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_CONNECTED)
315 
316 /** Event emitted when the system is no longer connected.
317  * Typically this means that network connectivity is lost either by
318  * the network interface is going down, or the interface has no longer
319  * an IP address etc.
320  */
321 #define NET_EVENT_L4_DISCONNECTED			\
322 	(_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_DISCONNECTED)
323 
324 
325 /** Event raised when IPv4 network connectivity is available. */
326 #define NET_EVENT_L4_IPV4_CONNECTED			\
327 	(_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_IPV4_CONNECTED)
328 
329 /** Event emitted when IPv4 network connectivity is lost. */
330 #define NET_EVENT_L4_IPV4_DISCONNECTED			\
331 	(_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_IPV4_DISCONNECTED)
332 
333 /** Event emitted when IPv6 network connectivity is available. */
334 #define NET_EVENT_L4_IPV6_CONNECTED			\
335 	(_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_IPV6_CONNECTED)
336 
337 /** Event emitted when IPv6 network connectivity is lost. */
338 #define NET_EVENT_L4_IPV6_DISCONNECTED			\
339 	(_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_IPV6_DISCONNECTED)
340 
341 /** Event emitted when a DNS server is added to the system. */
342 #define NET_EVENT_DNS_SERVER_ADD			\
343 	(_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_DNS_SERVER_ADD)
344 
345 /** Event emitted when a DNS server is removed from the system. */
346 #define NET_EVENT_DNS_SERVER_DEL			\
347 	(_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_DNS_SERVER_DEL)
348 
349 /** Event emitted when the system hostname is changed. */
350 #define NET_EVENT_HOSTNAME_CHANGED			\
351 	(_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_HOSTNAME_CHANGED)
352 
353 /** Network packet capture is started. */
354 #define NET_EVENT_CAPTURE_STARTED			\
355 	(_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_CAPTURE_STARTED)
356 
357 /** Network packet capture is stopped. */
358 #define NET_EVENT_CAPTURE_STOPPED			\
359 	(_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_CAPTURE_STOPPED)
360 
361 /**
362  * @brief Network Management event information structure
363  * Used to pass information on network events like
364  *   NET_EVENT_IPV6_ADDR_ADD,
365  *   NET_EVENT_IPV6_ADDR_DEL,
366  *   NET_EVENT_IPV6_MADDR_ADD and
367  *   NET_EVENT_IPV6_MADDR_DEL
368  * when CONFIG_NET_MGMT_EVENT_INFO enabled and event generator pass the
369  * information.
370  */
371 struct net_event_ipv6_addr {
372 	/** IPv6 address related to this event */
373 	struct in6_addr addr;
374 };
375 
376 /**
377  * @brief Network Management event information structure
378  * Used to pass information on network events like
379  *   NET_EVENT_IPV6_NBR_ADD and
380  *   NET_EVENT_IPV6_NBR_DEL
381  * when CONFIG_NET_MGMT_EVENT_INFO enabled and event generator pass the
382  * information.
383  * @note: idx will be '-1' in case of NET_EVENT_IPV6_NBR_DEL event.
384  */
385 struct net_event_ipv6_nbr {
386 	/** Neighbor IPv6 address */
387 	struct in6_addr addr;
388 	/** Neighbor index in cache */
389 	int idx;
390 };
391 
392 /**
393  * @brief Network Management event information structure
394  * Used to pass information on network events like
395  *   NET_EVENT_IPV6_ROUTE_ADD and
396  *   NET_EVENT_IPV6_ROUTE_DEL
397  * when CONFIG_NET_MGMT_EVENT_INFO enabled and event generator pass the
398  * information.
399  */
400 struct net_event_ipv6_route {
401 	/** IPv6 address of the next hop */
402 	struct in6_addr nexthop;
403 	/** IPv6 address or prefix of the route */
404 	struct in6_addr addr;
405 	/** IPv6 prefix length */
406 	uint8_t prefix_len;
407 };
408 
409 /**
410  * @brief Network Management event information structure
411  * Used to pass information on network events like
412  *   NET_EVENT_IPV6_PREFIX_ADD and
413  *   NET_EVENT_IPV6_PREFIX_DEL
414  * when CONFIG_NET_MGMT_EVENT_INFO is enabled and event generator pass the
415  * information.
416  */
417 struct net_event_ipv6_prefix {
418 	/** IPv6 prefix */
419 	struct in6_addr addr;
420 	/** IPv6 prefix length */
421 	uint8_t len;
422 	/** IPv6 prefix lifetime in seconds */
423 	uint32_t lifetime;
424 };
425 
426 /**
427  * @brief Network Management event information structure
428  * Used to pass information on NET_EVENT_HOSTNAME_CHANGED event when
429  * CONFIG_NET_MGMT_EVENT_INFO is enabled and event generator pass the
430  * information.
431  */
432 struct net_event_l4_hostname {
433 	/** New hostname */
434 	char hostname[NET_HOSTNAME_SIZE];
435 };
436 
437 /**
438  * @brief Network Management event information structure
439  * Used to pass information on network events like
440  *   NET_EVENT_IPV6_PE_FILTER_ADD and
441  *   NET_EVENT_IPV6_PE_FILTER_DEL
442  * when CONFIG_NET_MGMT_EVENT_INFO is enabled and event generator pass the
443  * information.
444  *
445  * This is only available if CONFIG_NET_IPV6_PE_FILTER_PREFIX_COUNT is >0.
446  */
447 struct net_event_ipv6_pe_filter {
448 	/** IPv6 address of privacy extension filter */
449 	struct in6_addr prefix;
450 	/** IPv6 filter deny or allow list */
451 	bool is_deny_list;
452 };
453 
454 /**
455  * @brief Network Management event information structure
456  * Used to pass information on network event
457  *   NET_EVENT_IPV4_PMTU_CHANGED
458  * when CONFIG_NET_MGMT_EVENT_INFO enabled and event generator pass the
459  * information.
460  */
461 struct net_event_ipv4_pmtu_info {
462 	/** IPv4 address */
463 	struct in_addr dst;
464 	/** New MTU */
465 	uint16_t mtu;
466 };
467 
468 /**
469  * @brief Network Management event information structure
470  * Used to pass information on network event
471  *   NET_EVENT_IPV6_PMTU_CHANGED
472  * when CONFIG_NET_MGMT_EVENT_INFO enabled and event generator pass the
473  * information.
474  */
475 struct net_event_ipv6_pmtu_info {
476 	/** IPv6 address */
477 	struct in6_addr dst;
478 	/** New MTU */
479 	uint32_t mtu;
480 };
481 
482 #ifdef __cplusplus
483 }
484 #endif
485 
486 /**
487  * @}
488  */
489 
490 #endif /* ZEPHYR_INCLUDE_NET_NET_EVENT_H_ */
491