Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
struct sockaddr_nm - The sockaddr structure for NET_MGMT sockets More...
#include <socket_net_mgmt.h>
Data Fields | |
sa_family_t | nm_family |
AF_NET_MGMT address family. | |
int | nm_ifindex |
Network interface related to this address. | |
uintptr_t | nm_pid |
Thread id or similar that is used to separate the different sockets. | |
uint32_t | nm_mask |
net_mgmt mask | |
struct sockaddr_nm - The sockaddr structure for NET_MGMT sockets
Similar concepts are used as in Linux AF_NETLINK. The NETLINK name is not used in order to avoid confusion between Zephyr and Linux as the implementations are different.
The socket domain (address family) is AF_NET_MGMT, and the type of socket is either SOCK_RAW or SOCK_DGRAM, because this is a datagram-oriented service.
The protocol (protocol type) selects for which feature the socket is used.
When used with bind(), the nm_pid field of the sockaddr_nm can be filled with the calling thread' own id. The nm_pid serves here as the local address of this net_mgmt socket. The application is responsible for picking a unique integer value to fill in nm_pid.
sa_family_t sockaddr_nm::nm_family |
AF_NET_MGMT address family.
int sockaddr_nm::nm_ifindex |
Network interface related to this address.
uint32_t sockaddr_nm::nm_mask |
net_mgmt mask
uintptr_t sockaddr_nm::nm_pid |
Thread id or similar that is used to separate the different sockets.
Application can decide how the pid is constructed.