from small one page howto to huge articles all in one place
 

search text in:





Poll
What does your sytem tell when running "ulimit -u"?








poll results

Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

196713

userrating:

average rating: 1.7 (102 votes) (1=very good 6=terrible)


May 25th. 2007:
Words

486

Views

252324

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

141294

userrating:

average rating: 1.4 (42 votes) (1=very good 6=terrible)


April, 26th. 2006:

Druckversion
You are here: manpages





NETLINK

Section: Linux Programmer's Manual (3)
Updated: 2014-03-20
Index Return to Main Contents
 

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

<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.
NLMSG_ALIGN()
Round the length of a netlink message up to align it properly.
NLMSG_LENGTH()
Given the payload length, len, this macro returns the aligned length to store in the nlmsg_len field of the nlmsghdr.
NLMSG_SPACE()
Return the number of bytes that a netlink message with payload of len 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 len argument 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 is in a form suitable for parsing.
NLMSG_PAYLOAD()
Return the length of the payload associated with the nlmsghdr.
 

CONFORMING TO

These macros are nonstandard Linux extensions.  

NOTES

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

SEE ALSO

libnetlink(3), netlink(7)  

COLOPHON

This page is part of release 4.13 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.


 

Index

NAME
SYNOPSIS
DESCRIPTION
CONFORMING TO
NOTES
SEE ALSO
COLOPHON





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2020 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 31.3 ms