netlink(3) | Library Functions Manual | netlink(3) |
netlink - Netlink macros
Standard C library (libc, -lc)
#include <asm/types.h> #include <linux/netlink.h>
int NLMSG_ALIGN(size_t len); int NLMSG_LENGTH(size_t len); int NLMSG_SPACE(size_t len); void *NLMSG_DATA(struct nlmsghdr *nlh); struct nlmsghdr *NLMSG_NEXT(struct nlmsghdr *nlh, int len); int NLMSG_OK(struct nlmsghdr *nlh, int len); int NLMSG_PAYLOAD(struct nlmsghdr *nlh, int len);
<linux/netlink.h> defines several standard macros to access or create a netlink datagram. They are similar in spirit to the macros defined in cmsg(3) for auxiliary data. The buffer passed to and from a netlink socket should be accessed using only these macros.
It is often better to use netlink via libnetlink than via the low-level kernel interface.
Linux.
libnetlink(3), netlink(7)
2023-10-31 | Linux man-pages 6.7 |