Penguin
Annotated edit history of netlink(3) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 NETLINK
2 !!!NETLINK
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 NOTES
7 SEE ALSO
8 ----
9 !!NAME
10
11
12 netlink - Netlink macros
13 !!SYNOPSIS
14
15
16 __#include
17 __ ''len''__);
18 int NLMSG_LENGTH(size_t__ ''len''__);
19 int NLMSG_SPACE(size_t__ ''len''__);
20 void *NLMSG_DATA(struct nlmsghdr *__''nlh''__);
21 struct nlmsghdr *NLMSG_NEXT(struct nlmsghdr *__''nlh''__, int__ ''len''__);
22 int NLMSG_OK(struct nlmsghdr *__''nlh''__, int__ ''len''__);
23 int NLMSG_PAYLOAD(struct nlmsghdr *__''nlh''__, int__ ''len''__);
24 __
25 !!DESCRIPTION
26
27
28 ''netlink.h'' defines several standard macros to access
29 or create a netlink datagram. They are similar in spirit to
30 the macros defined in cmsg(3) for auxilliary data.
31 The buffer passed to and from a netlink socket should be
32 only accessed using these macros.
33
34
35 NLMSG_ALIGN
36
37
38 Round the length of a netlink message up to align it
39 properly.
40
41
42 NLMSG_LENGTH
43
44
45 Gets the payload length as argument and returns the aligned
46 length to store in the __nlmsg_len__ field of the
47 ''nlmsghdr''.
48
49
50 NLMSG_SPACE
51
52
53 Return the number of bytes a netlink message with payload of
54 the passed length would occupy.
55
56
57 NLMSG_DATA
58
59
60 Return a pointer to the payload associated with the passed
61 ''nlmsghdr''.
62
63
64 NLMSG_NEXT
65
66
67 Get the next ''nlmsghdr'' in a multipart message. The
68 caller must check if the current nlmsghdr didn't have the
69 NLMSG_DONE set - this function doesn't return NULL on end.
70 The length parameter is an lvalue containing the remaining
71 length of the message buffer. This macro decrements it by
72 the length of the message header.
73
74
75 NLMSG_OK
76
77
78 Return true if the netlink message is not truncated and ok
79 to parse.
80
81
82 NLMSG_PAYLOAD
83
84
85 Return the length of the payload associated with the
86 ''nlmsghdr''.
87 !!NOTES
88
89
90 It is often better to use netlink via __libnetlink__ than
91 via the low level kernel interface.
92 !!SEE ALSO
93
94
95 netlink(7)
96
97
98 and ftp://ftp.inr.ac.ru/ip-routing/iproute2* for
99 libnetlink
100 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.