O nás     Inzerce     KontaktSpolehlivé informace o IT již od roku 2011
Hledat
Nepřehlédněte: Usnadní vám práci: Pozoruhodné IT produkty pro rok 2024
Správa dokumentů
Digitální transformace
Informační systémy
Hlavní rubriky: Informační systémy, Mobilní technologie, Datová centra, Sítě, IT bezpečnost, Software, Hardware, Zkušenosti a názory, Speciály

Pozoruhodné IT produkty 2024
E-knihy o IT zdarma
Manuál Linux
[Linux manuál]

netlink: Makra Netlink

Originální popis anglicky: netlink - Netlink macros

Návod, kniha: Linux Programmer's Manual

STRUČNĚ

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

POPIS / INSTRUKCE

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.
 

SOUVISEJÍCÍ

netlink(7)
and ftp://ftp.inr.ac.ru/ip-routing/iproute2* for libnetlink
1999-05-14 Linux Man Page
©2011-2024 BusinessIT.cz, ISSN 1805-0522 | Názvy použité v textech mohou být ochrannými známkami příslušných vlastníků.
Provozovatel: Bispiral, s.r.o., kontakt: BusinessIT(at)Bispiral.com | Inzerce: Best Online Media, s.r.o., zuzana@online-media.cz
O vydavateli | Pravidla webu BusinessIT.cz a ochrana soukromí | Používáme účetní program Money S3 | pg(9456)