Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
|
Network Management. More...
Data Structures | |
struct | net_event_ipv6_addr |
Network Management event information structure Used to pass information on network events like NET_EVENT_IPV6_ADDR_ADD, NET_EVENT_IPV6_ADDR_DEL, NET_EVENT_IPV6_MADDR_ADD and NET_EVENT_IPV6_MADDR_DEL when CONFIG_NET_MGMT_EVENT_INFO enabled and event generator pass the information. More... | |
struct | net_event_ipv6_nbr |
Network Management event information structure Used to pass information on network events like NET_EVENT_IPV6_NBR_ADD and NET_EVENT_IPV6_NBR_DEL when CONFIG_NET_MGMT_EVENT_INFO enabled and event generator pass the information. More... | |
struct | net_event_ipv6_route |
Network Management event information structure Used to pass information on network events like NET_EVENT_IPV6_ROUTE_ADD and NET_EVENT_IPV6_ROUTE_DEL when CONFIG_NET_MGMT_EVENT_INFO enabled and event generator pass the information. More... | |
struct | net_event_ipv6_prefix |
Network Management event information structure Used to pass information on network events like NET_EVENT_IPV6_PREFIX_ADD and NET_EVENT_IPV6_PREFIX_DEL when CONFIG_NET_MGMT_EVENT_INFO is enabled and event generator pass the information. More... | |
struct | net_event_l4_hostname |
Network Management event information structure Used to pass information on NET_EVENT_HOSTNAME_CHANGED event when CONFIG_NET_MGMT_EVENT_INFO is enabled and event generator pass the information. More... | |
struct | net_event_ipv6_pe_filter |
Network Management event information structure Used to pass information on network events like NET_EVENT_IPV6_PE_FILTER_ADD and NET_EVENT_IPV6_PE_FILTER_DEL when CONFIG_NET_MGMT_EVENT_INFO is enabled and event generator pass the information. More... | |
struct | net_mgmt_event_callback |
Network Management event callback structure Used to register a callback into the network management event part, in order to let the owner of this struct to get network event notification based on given event mask. More... | |
Macros | |
#define | NET_EVENT_IF_DOWN (_NET_EVENT_IF_BASE | NET_EVENT_IF_CMD_DOWN) |
Event emitted when the network interface goes down. | |
#define | NET_EVENT_IF_UP (_NET_EVENT_IF_BASE | NET_EVENT_IF_CMD_UP) |
Event emitted when the network interface goes up. | |
#define | NET_EVENT_IF_ADMIN_DOWN (_NET_EVENT_IF_BASE | NET_EVENT_IF_CMD_ADMIN_DOWN) |
Event emitted when the network interface is taken down manually. | |
#define | NET_EVENT_IF_ADMIN_UP (_NET_EVENT_IF_BASE | NET_EVENT_IF_CMD_ADMIN_UP) |
Event emitted when the network interface goes up manually. | |
#define | NET_EVENT_IPV6_ADDR_ADD (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ADDR_ADD) |
Event emitted when an IPv6 address is added to the system. | |
#define | NET_EVENT_IPV6_ADDR_DEL (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ADDR_DEL) |
Event emitted when an IPv6 address is removed from the system. | |
#define | NET_EVENT_IPV6_MADDR_ADD (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_MADDR_ADD) |
Event emitted when an IPv6 multicast address is added to the system. | |
#define | NET_EVENT_IPV6_MADDR_DEL (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_MADDR_DEL) |
Event emitted when an IPv6 multicast address is removed from the system. | |
#define | NET_EVENT_IPV6_PREFIX_ADD (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PREFIX_ADD) |
Event emitted when an IPv6 prefix is added to the system. | |
#define | NET_EVENT_IPV6_PREFIX_DEL (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PREFIX_DEL) |
Event emitted when an IPv6 prefix is removed from the system. | |
#define | NET_EVENT_IPV6_MCAST_JOIN (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_MCAST_JOIN) |
Event emitted when an IPv6 multicast group is joined. | |
#define | NET_EVENT_IPV6_MCAST_LEAVE (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_MCAST_LEAVE) |
Event emitted when an IPv6 multicast group is left. | |
#define | NET_EVENT_IPV6_ROUTER_ADD (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ROUTER_ADD) |
Event emitted when an IPv6 router is added to the system. | |
#define | NET_EVENT_IPV6_ROUTER_DEL (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ROUTER_DEL) |
Event emitted when an IPv6 router is removed from the system. | |
#define | NET_EVENT_IPV6_ROUTE_ADD (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ROUTE_ADD) |
Event emitted when an IPv6 route is added to the system. | |
#define | NET_EVENT_IPV6_ROUTE_DEL (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ROUTE_DEL) |
Event emitted when an IPv6 route is removed from the system. | |
#define | NET_EVENT_IPV6_DAD_SUCCEED (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_DAD_SUCCEED) |
Event emitted when an IPv6 duplicate address detection succeeds. | |
#define | NET_EVENT_IPV6_DAD_FAILED (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_DAD_FAILED) |
Event emitted when an IPv6 duplicate address detection fails. | |
#define | NET_EVENT_IPV6_NBR_ADD (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_NBR_ADD) |
Event emitted when an IPv6 neighbor is added to the system. | |
#define | NET_EVENT_IPV6_NBR_DEL (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_NBR_DEL) |
Event emitted when an IPv6 neighbor is removed from the system. | |
#define | NET_EVENT_IPV6_DHCP_START (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_DHCP_START) |
Event emitted when an IPv6 DHCP client starts. | |
#define | NET_EVENT_IPV6_DHCP_BOUND (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_DHCP_BOUND) |
Event emitted when an IPv6 DHCP client address is bound. | |
#define | NET_EVENT_IPV6_DHCP_STOP (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_DHCP_STOP) |
Event emitted when an IPv6 DHCP client is stopped. | |
#define | NET_EVENT_IPV6_ADDR_DEPRECATED (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ADDR_DEPRECATED) |
IPv6 address is deprecated. | |
#define | NET_EVENT_IPV6_PE_ENABLED (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PE_ENABLED) |
IPv6 Privacy extension is enabled. | |
#define | NET_EVENT_IPV6_PE_DISABLED (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PE_DISABLED) |
IPv6 Privacy extension is disabled. | |
#define | NET_EVENT_IPV6_PE_FILTER_ADD (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PE_FILTER_ADD) |
IPv6 Privacy extension filter is added. | |
#define | NET_EVENT_IPV6_PE_FILTER_DEL (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PE_FILTER_DEL) |
IPv6 Privacy extension filter is removed. | |
#define | NET_EVENT_IPV4_ADDR_ADD (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ADDR_ADD) |
Event emitted when an IPv4 address is added to the system. | |
#define | NET_EVENT_IPV4_ADDR_DEL (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ADDR_DEL) |
Event emitted when an IPv4 address is removed from the system. | |
#define | NET_EVENT_IPV4_MADDR_ADD (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_MADDR_ADD) |
Event emitted when an IPv4 multicast address is added to the system. | |
#define | NET_EVENT_IPV4_MADDR_DEL (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_MADDR_DEL) |
Event emitted when an IPv4 multicast address is removed from the system. | |
#define | NET_EVENT_IPV4_ROUTER_ADD (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ROUTER_ADD) |
Event emitted when an IPv4 router is added to the system. | |
#define | NET_EVENT_IPV4_ROUTER_DEL (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ROUTER_DEL) |
Event emitted when an IPv4 router is removed from the system. | |
#define | NET_EVENT_IPV4_DHCP_START (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_DHCP_START) |
Event emitted when an IPv4 DHCP client is started. | |
#define | NET_EVENT_IPV4_DHCP_BOUND (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_DHCP_BOUND) |
Event emitted when an IPv4 DHCP client address is bound. | |
#define | NET_EVENT_IPV4_DHCP_STOP (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_DHCP_STOP) |
Event emitted when an IPv4 DHCP client is stopped. | |
#define | NET_EVENT_IPV4_MCAST_JOIN (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_MCAST_JOIN) |
Event emitted when an IPv4 multicast group is joined. | |
#define | NET_EVENT_IPV4_MCAST_LEAVE (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_MCAST_LEAVE) |
Event emitted when an IPv4 multicast group is left. | |
#define | NET_EVENT_L4_CONNECTED (_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_CONNECTED) |
Event emitted when the system is considered to be connected. | |
#define | NET_EVENT_L4_DISCONNECTED (_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_DISCONNECTED) |
Event emitted when the system is no longer connected. | |
#define | NET_EVENT_DNS_SERVER_ADD (_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_DNS_SERVER_ADD) |
Event emitted when a DNS server is added to the system. | |
#define | NET_EVENT_DNS_SERVER_DEL (_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_DNS_SERVER_DEL) |
Event emitted when a DNS server is removed from the system. | |
#define | NET_EVENT_HOSTNAME_CHANGED (_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_HOSTNAME_CHANGED) |
Event emitted when the system hostname is changed. | |
#define | NET_EVENT_CAPTURE_STARTED (_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_CAPTURE_STARTED) |
Network packet capture is started. | |
#define | NET_EVENT_CAPTURE_STOPPED (_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_CAPTURE_STOPPED) |
Network packet capture is stopped. | |
#define | net_mgmt(_mgmt_request, _iface, _data, _len) net_mgmt_##_mgmt_request(_mgmt_request, _iface, _data, _len) |
Generate a network management event. | |
#define | NET_MGMT_DEFINE_REQUEST_HANDLER(_mgmt_request) |
Declare a request handler function for the given network event. | |
#define | NET_MGMT_REGISTER_REQUEST_HANDLER(_mgmt_request, _func) FUNC_ALIAS(_func, net_mgmt_##_mgmt_request, int) |
Create a request handler function for the given network event. | |
#define | NET_MGMT_REGISTER_EVENT_HANDLER(_name, _event_mask, _func, _user_data) |
Define a static network event handler. | |
Typedefs | |
typedef int(* | net_mgmt_request_handler_t) (uint32_t mgmt_request, struct net_if *iface, void *data, size_t len) |
Signature which all Net MGMT request handler need to follow. | |
typedef void(* | net_mgmt_event_handler_t) (struct net_mgmt_event_callback *cb, uint32_t mgmt_event, struct net_if *iface) |
Define the user's callback handler function signature. | |
typedef void(* | net_mgmt_event_static_handler_t) (uint32_t mgmt_event, struct net_if *iface, void *info, size_t info_length, void *user_data) |
Define the user's callback handler function signature. | |
Functions | |
static void | net_mgmt_init_event_callback (struct net_mgmt_event_callback *cb, net_mgmt_event_handler_t handler, uint32_t mgmt_event_mask) |
Helper to initialize a struct net_mgmt_event_callback properly. | |
void | net_mgmt_add_event_callback (struct net_mgmt_event_callback *cb) |
Add a user callback. | |
void | net_mgmt_del_event_callback (struct net_mgmt_event_callback *cb) |
Delete a user callback. | |
void | net_mgmt_event_notify_with_info (uint32_t mgmt_event, struct net_if *iface, const void *info, size_t length) |
Used by the system to notify an event. | |
static void | net_mgmt_event_notify (uint32_t mgmt_event, struct net_if *iface) |
Used by the system to notify an event without any additional information. | |
int | net_mgmt_event_wait (uint32_t mgmt_event_mask, uint32_t *raised_event, struct net_if **iface, const void **info, size_t *info_length, k_timeout_t timeout) |
Used to wait synchronously on an event mask. | |
int | net_mgmt_event_wait_on_iface (struct net_if *iface, uint32_t mgmt_event_mask, uint32_t *raised_event, const void **info, size_t *info_length, k_timeout_t timeout) |
Used to wait synchronously on an event mask for a specific iface. | |
void | net_mgmt_event_init (void) |
Used by the core of the network stack to initialize the network event processing. | |
Network Management.
#define NET_EVENT_CAPTURE_STARTED (_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_CAPTURE_STARTED) |
#include <zephyr/net/net_event.h>
Network packet capture is started.
#define NET_EVENT_CAPTURE_STOPPED (_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_CAPTURE_STOPPED) |
#include <zephyr/net/net_event.h>
Network packet capture is stopped.
#define NET_EVENT_DNS_SERVER_ADD (_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_DNS_SERVER_ADD) |
#include <zephyr/net/net_event.h>
Event emitted when a DNS server is added to the system.
#define NET_EVENT_DNS_SERVER_DEL (_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_DNS_SERVER_DEL) |
#include <zephyr/net/net_event.h>
Event emitted when a DNS server is removed from the system.
#define NET_EVENT_HOSTNAME_CHANGED (_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_HOSTNAME_CHANGED) |
#include <zephyr/net/net_event.h>
Event emitted when the system hostname is changed.
#define NET_EVENT_IF_ADMIN_DOWN (_NET_EVENT_IF_BASE | NET_EVENT_IF_CMD_ADMIN_DOWN) |
#include <zephyr/net/net_event.h>
Event emitted when the network interface is taken down manually.
#define NET_EVENT_IF_ADMIN_UP (_NET_EVENT_IF_BASE | NET_EVENT_IF_CMD_ADMIN_UP) |
#include <zephyr/net/net_event.h>
Event emitted when the network interface goes up manually.
#define NET_EVENT_IF_DOWN (_NET_EVENT_IF_BASE | NET_EVENT_IF_CMD_DOWN) |
#include <zephyr/net/net_event.h>
Event emitted when the network interface goes down.
#define NET_EVENT_IF_UP (_NET_EVENT_IF_BASE | NET_EVENT_IF_CMD_UP) |
#include <zephyr/net/net_event.h>
Event emitted when the network interface goes up.
#define NET_EVENT_IPV4_ADDR_ADD (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ADDR_ADD) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv4 address is added to the system.
#define NET_EVENT_IPV4_ADDR_DEL (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ADDR_DEL) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv4 address is removed from the system.
#define NET_EVENT_IPV4_DHCP_BOUND (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_DHCP_BOUND) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv4 DHCP client address is bound.
#define NET_EVENT_IPV4_DHCP_START (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_DHCP_START) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv4 DHCP client is started.
#define NET_EVENT_IPV4_DHCP_STOP (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_DHCP_STOP) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv4 DHCP client is stopped.
#define NET_EVENT_IPV4_MADDR_ADD (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_MADDR_ADD) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv4 multicast address is added to the system.
#define NET_EVENT_IPV4_MADDR_DEL (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_MADDR_DEL) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv4 multicast address is removed from the system.
#define NET_EVENT_IPV4_MCAST_JOIN (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_MCAST_JOIN) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv4 multicast group is joined.
#define NET_EVENT_IPV4_MCAST_LEAVE (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_MCAST_LEAVE) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv4 multicast group is left.
#define NET_EVENT_IPV4_ROUTER_ADD (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ROUTER_ADD) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv4 router is added to the system.
#define NET_EVENT_IPV4_ROUTER_DEL (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ROUTER_DEL) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv4 router is removed from the system.
#define NET_EVENT_IPV6_ADDR_ADD (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ADDR_ADD) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 address is added to the system.
#define NET_EVENT_IPV6_ADDR_DEL (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ADDR_DEL) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 address is removed from the system.
#define NET_EVENT_IPV6_ADDR_DEPRECATED (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ADDR_DEPRECATED) |
#include <zephyr/net/net_event.h>
IPv6 address is deprecated.
#define NET_EVENT_IPV6_DAD_FAILED (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_DAD_FAILED) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 duplicate address detection fails.
#define NET_EVENT_IPV6_DAD_SUCCEED (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_DAD_SUCCEED) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 duplicate address detection succeeds.
#define NET_EVENT_IPV6_DHCP_BOUND (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_DHCP_BOUND) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 DHCP client address is bound.
#define NET_EVENT_IPV6_DHCP_START (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_DHCP_START) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 DHCP client starts.
#define NET_EVENT_IPV6_DHCP_STOP (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_DHCP_STOP) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 DHCP client is stopped.
#define NET_EVENT_IPV6_MADDR_ADD (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_MADDR_ADD) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 multicast address is added to the system.
#define NET_EVENT_IPV6_MADDR_DEL (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_MADDR_DEL) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 multicast address is removed from the system.
#define NET_EVENT_IPV6_MCAST_JOIN (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_MCAST_JOIN) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 multicast group is joined.
#define NET_EVENT_IPV6_MCAST_LEAVE (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_MCAST_LEAVE) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 multicast group is left.
#define NET_EVENT_IPV6_NBR_ADD (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_NBR_ADD) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 neighbor is added to the system.
#define NET_EVENT_IPV6_NBR_DEL (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_NBR_DEL) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 neighbor is removed from the system.
#define NET_EVENT_IPV6_PE_DISABLED (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PE_DISABLED) |
#include <zephyr/net/net_event.h>
IPv6 Privacy extension is disabled.
#define NET_EVENT_IPV6_PE_ENABLED (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PE_ENABLED) |
#include <zephyr/net/net_event.h>
IPv6 Privacy extension is enabled.
#define NET_EVENT_IPV6_PE_FILTER_ADD (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PE_FILTER_ADD) |
#include <zephyr/net/net_event.h>
IPv6 Privacy extension filter is added.
#define NET_EVENT_IPV6_PE_FILTER_DEL (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PE_FILTER_DEL) |
#include <zephyr/net/net_event.h>
IPv6 Privacy extension filter is removed.
#define NET_EVENT_IPV6_PREFIX_ADD (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PREFIX_ADD) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 prefix is added to the system.
#define NET_EVENT_IPV6_PREFIX_DEL (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PREFIX_DEL) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 prefix is removed from the system.
#define NET_EVENT_IPV6_ROUTE_ADD (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ROUTE_ADD) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 route is added to the system.
#define NET_EVENT_IPV6_ROUTE_DEL (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ROUTE_DEL) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 route is removed from the system.
#define NET_EVENT_IPV6_ROUTER_ADD (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ROUTER_ADD) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 router is added to the system.
#define NET_EVENT_IPV6_ROUTER_DEL (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ROUTER_DEL) |
#include <zephyr/net/net_event.h>
Event emitted when an IPv6 router is removed from the system.
#define NET_EVENT_L4_CONNECTED (_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_CONNECTED) |
#include <zephyr/net/net_event.h>
Event emitted when the system is considered to be connected.
The connected in this context means that the network interface is up, and the interface has either IPv4 or IPv6 address assigned to it.
#define NET_EVENT_L4_DISCONNECTED (_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_DISCONNECTED) |
#include <zephyr/net/net_event.h>
Event emitted when the system is no longer connected.
Typically this means that network connectivity is lost either by the network interface is going down, or the interface has no longer an IP address etc.
#define net_mgmt | ( | _mgmt_request, | |
_iface, | |||
_data, | |||
_len | |||
) | net_mgmt_##_mgmt_request(_mgmt_request, _iface, _data, _len) |
#include <zephyr/net/net_mgmt.h>
Generate a network management event.
_mgmt_request | Management event identifier |
_iface | Network interface |
_data | Any additional data for the event |
_len | Length of the additional data. |
#define NET_MGMT_DEFINE_REQUEST_HANDLER | ( | _mgmt_request | ) |
#include <zephyr/net/net_mgmt.h>
Declare a request handler function for the given network event.
_mgmt_request | Management event identifier |
#define NET_MGMT_REGISTER_EVENT_HANDLER | ( | _name, | |
_event_mask, | |||
_func, | |||
_user_data | |||
) |
#include <zephyr/net/net_mgmt.h>
Define a static network event handler.
_name | Name of the event handler. |
_event_mask | A mask of network events on which the passed handler should be called in case those events come. Note that only the command part is treated as a mask, matching one to several commands. Layer and layer code will be made of an exact match. This means that in order to receive events from multiple layers, one must have multiple listeners registered, one for each layer being listened. |
_func | The function to be called upon network events being emitted. |
_user_data | User data passed to the handler being called on network events. |
#define NET_MGMT_REGISTER_REQUEST_HANDLER | ( | _mgmt_request, | |
_func | |||
) | FUNC_ALIAS(_func, net_mgmt_##_mgmt_request, int) |
#include <zephyr/net/net_mgmt.h>
Create a request handler function for the given network event.
_mgmt_request | Management event identifier |
_func | Function for handling this event |
net_mgmt_event_handler_t |
#include <zephyr/net/net_mgmt.h>
Define the user's callback handler function signature.
cb | Original struct net_mgmt_event_callback owning this handler. |
mgmt_event | The network event being notified. |
iface | A pointer on a struct net_if to which the event belongs to, if it's an event on an iface. NULL otherwise. |
net_mgmt_event_static_handler_t |
#include <zephyr/net/net_mgmt.h>
Define the user's callback handler function signature.
mgmt_event | The network event being notified. |
iface | A pointer on a struct net_if to which the event belongs to, if it's an event on an iface. NULL otherwise. |
info | A valid pointer on a data understood by the handler. NULL otherwise. |
info_length | Length in bytes of the memory pointed by info . |
user_data | Data provided by the user to the handler. |
net_mgmt_request_handler_t |
#include <zephyr/net/net_mgmt.h>
Signature which all Net MGMT request handler need to follow.
mgmt_request | The exact request value the handler is being called through |
iface | A valid pointer on struct net_if if the request is meant to be tight to a network interface. NULL otherwise. |
data | A valid pointer on a data understood by the handler. NULL otherwise. |
len | Length in byte of the memory pointed by data. |
void net_mgmt_add_event_callback | ( | struct net_mgmt_event_callback * | cb | ) |
#include <zephyr/net/net_mgmt.h>
Add a user callback.
cb | A valid pointer on user's callback to add. |
void net_mgmt_del_event_callback | ( | struct net_mgmt_event_callback * | cb | ) |
#include <zephyr/net/net_mgmt.h>
Delete a user callback.
cb | A valid pointer on user's callback to delete. |
void net_mgmt_event_init | ( | void | ) |
#include <zephyr/net/net_mgmt.h>
Used by the core of the network stack to initialize the network event processing.
#include <zephyr/net/net_mgmt.h>
Used by the system to notify an event without any additional information.
mgmt_event | The actual network event code to notify |
iface | A valid pointer on a struct net_if if only the event is based on an iface. NULL otherwise. |
void net_mgmt_event_notify_with_info | ( | uint32_t | mgmt_event, |
struct net_if * | iface, | ||
const void * | info, | ||
size_t | length | ||
) |
#include <zephyr/net/net_mgmt.h>
Used by the system to notify an event.
mgmt_event | The actual network event code to notify |
iface | a valid pointer on a struct net_if if only the event is based on an iface. NULL otherwise. |
info | A valid pointer on the information you want to pass along with the event. NULL otherwise. Note the data pointed there is normalized by the related event. |
length | size of the data pointed by info pointer. |
Note: info and length are disabled if CONFIG_NET_MGMT_EVENT_INFO is not defined.
int net_mgmt_event_wait | ( | uint32_t | mgmt_event_mask, |
uint32_t * | raised_event, | ||
struct net_if ** | iface, | ||
const void ** | info, | ||
size_t * | info_length, | ||
k_timeout_t | timeout | ||
) |
#include <zephyr/net/net_mgmt.h>
Used to wait synchronously on an event mask.
mgmt_event_mask | A mask of relevant events to wait on. |
raised_event | a pointer on a uint32_t to get which event from the mask generated the event. Can be NULL if the caller is not interested in that information. |
iface | a pointer on a place holder for the iface on which the event has originated from. This is valid if only the event mask has bit NET_MGMT_IFACE_BIT set relevantly, depending on events the caller wants to listen to. |
info | a valid pointer if user wants to get the information the event might bring along. NULL otherwise. |
info_length | tells how long the info memory area is. Only valid if the info is not NULL. |
timeout | A timeout delay. K_FOREVER can be used to wait indefinitely. |
int net_mgmt_event_wait_on_iface | ( | struct net_if * | iface, |
uint32_t | mgmt_event_mask, | ||
uint32_t * | raised_event, | ||
const void ** | info, | ||
size_t * | info_length, | ||
k_timeout_t | timeout | ||
) |
#include <zephyr/net/net_mgmt.h>
Used to wait synchronously on an event mask for a specific iface.
iface | a pointer on a valid network interface to listen event to |
mgmt_event_mask | A mask of relevant events to wait on. Listened to events should be relevant to iface events and thus have the bit NET_MGMT_IFACE_BIT set. |
raised_event | a pointer on a uint32_t to get which event from the mask generated the event. Can be NULL if the caller is not interested in that information. |
info | a valid pointer if user wants to get the information the event might bring along. NULL otherwise. |
info_length | tells how long the info memory area is. Only valid if the info is not NULL. |
timeout | A timeout delay. K_FOREVER can be used to wait indefinitely. |
|
inlinestatic |
#include <zephyr/net/net_mgmt.h>
Helper to initialize a struct net_mgmt_event_callback properly.
cb | A valid application's callback structure pointer. |
handler | A valid handler function pointer. |
mgmt_event_mask | A mask of relevant events for the handler |