Zephyr Project API 3.7.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
net_mgmt.h File Reference

Network Management API public header. More...

Go to the source code of this file.

Data Structures

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_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.
 

Detailed Description

Network Management API public header.