Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
netlink(3)
Edit
PageHistory
Diff
Info
LikePages
NETLINK !!!NETLINK NAME SYNOPSIS DESCRIPTION NOTES SEE ALSO ---- !!NAME netlink - Netlink macros !!SYNOPSIS __#include __ ''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''__); __ !!DESCRIPTION ''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 auxilliary data. The buffer passed to and from a netlink socket should be only accessed using these macros. NLMSG_ALIGN Round the length of a netlink message up to align it properly. NLMSG_LENGTH Gets the payload length as argument and returns the aligned length to store in the __nlmsg_len__ field of the ''nlmsghdr''. NLMSG_SPACE Return the number of bytes a netlink message with payload of the passed length would occupy. NLMSG_DATA Return a pointer to the payload associated with the passed ''nlmsghdr''. NLMSG_NEXT Get the next ''nlmsghdr'' in a multipart message. The caller must check if the current nlmsghdr didn't have the NLMSG_DONE set - this function doesn't return NULL on end. The length parameter is an lvalue containing the remaining length of the message buffer. This macro decrements it by the length of the message header. NLMSG_OK Return true if the netlink message is not truncated and ok to parse. NLMSG_PAYLOAD Return the length of the payload associated with the ''nlmsghdr''. !!NOTES It is often better to use netlink via __libnetlink__ than via the low level kernel interface. !!SEE ALSO netlink(7) and ftp://ftp.inr.ac.ru/ip-routing/iproute2* for libnetlink ----
4 pages link to
netlink(3)
:
LinuxNetlinkSockets
netlink(7)
rtnetlink(3)
Man3n
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.