Web Hosting Directory | Web Hosting Resources | Webmaster Resources | Domain Tools | Search Engine Marketing | Forums
  Signup
Today: 1,296   Yesterday: 1,345   Max: 1,872   Total: 468,378   Current Users : 14 (Member 0) 
DOMAIN TOOLS

WEBMASTER TOOLS

RELATED ARTICLES

SUBMIT AN ARTICLE

Write for us and get publicity, link to your website, and best of all get paid. Please visit our writers page for details.


LINK TO US

Link to us and earn points for each visitor you bring to us. Please visit our link partner page for details.

 
Search Linux manpages For:  

netlink(3) -- Linux man page

 

NAME

netlink - Netlink macros  

SYNOPSIS

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

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 auxiliary 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


 
 
 
What is your major source of website traffic?
 
 
 
 
 
 

ADVERTISEMENT

 
Cheap Web HostingBudget Web HostingEcommerce Web Hosting
Link to UsLink ExchangeAdvertisePrivacy PolicyTerms Of ServiceAbout UsContact UsSitemap
Copyright © 2006 - 2008 Broadband Media, Inc. All rights reserved.