summaryrefslogtreecommitdiffstats
path: root/man3/rtnetlink.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/rtnetlink.3')
-rw-r--r--man3/rtnetlink.323
1 files changed, 9 insertions, 14 deletions
diff --git a/man3/rtnetlink.3 b/man3/rtnetlink.3
index b15c9f172..7033d4b67 100644
--- a/man3/rtnetlink.3
+++ b/man3/rtnetlink.3
@@ -1,15 +1,10 @@
-.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
.\"
.\" $Id: rtnetlink.3,v 1.2 1999/05/18 10:35:10 freitag Exp $
.\"
-.TH rtnetlink 3 2022-10-30 "Linux man-pages 6.03"
+.TH rtnetlink 3 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
rtnetlink \- macros to manipulate rtnetlink messages
.SH LIBRARY
@@ -80,7 +75,7 @@ returns the amount of space which will be needed in a message with
.I len
bytes of data.
.SH STANDARDS
-These macros are nonstandard Linux extensions.
+Linux.
.SH BUGS
This manual page is incomplete.
.SH EXAMPLES
@@ -90,20 +85,20 @@ Creating a rtnetlink message to set the MTU of a device:
.in +4n
.EX
#include <linux/rtnetlink.h>
-
+\&
\&...
-
+\&
struct {
struct nlmsghdr nh;
struct ifinfomsg if;
char attrbuf[512];
} req;
-
+\&
struct rtattr *rta;
unsigned int mtu = 1000;
-
+\&
int rtnetlink_sk = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE);
-
+\&
memset(&req, 0, sizeof(req));
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.if));
req.nh.nlmsg_flags = NLM_F_REQUEST;