Unix/Linux Go Back    

RedHat 9 (Linux i386) - man page for netlink (redhat section 3)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

NETLINK(3)			    Linux Programmer's Manual			       NETLINK(3)

       netlink - Netlink macros

       #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);

       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 only accessed using these macros.

	      Round the length of a netlink message up to align it properly.

	      Gets  the payload length as argument and returns the aligned length to store
	      in the nlmsg_len field of the nlmsghdr.

	      Return the number of bytes a netlink message  with  payload  of  the  passed
	      length would occupy.

	      Return a pointer to the payload associated with the passed nlmsghdr.

	      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 remain-
	      ing length of the message buffer. This macro decrements it by the length	of
	      the message header.

	      Return true if the netlink message is not truncated and ok to parse.

	      Return the length of the payload associated with the nlmsghdr.

       It  is  often  better  to  use netlink via libnetlink than via the low level kernel


       and ftp://ftp.inr.ac.ru/ip-routing/iproute2* for libnetlink

Linux Man Page				    1999-05-14				       NETLINK(3)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 02:17 AM.