aboutsummaryrefslogtreecommitdiffstats
path: root/man/man3/netlink.3
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-11-17 18:47:53 +0100
committerAlejandro Colomar <alx@kernel.org>2024-11-17 21:51:23 +0100
commit18e7c4597c4e72fa5210c7887273e363c456c9ee (patch)
tree97cfd22e731a4c859ae71783d70943ff72e6cb60 /man/man3/netlink.3
parent8fc6fdd8291d906e58a175b5e1b20da680aaeb4a (diff)
downloadman-pages-18e7c4597c4e.tar.gz
man/: Terminology consistency reforms (n, size, length)
Use 'length' for the lenght of a string. Use 'n' for the number of elements. Use 'size' for the number of bytes. (And in wide-character string functions, 'size' also refers to the number of wide characters.) The change is quite large, and I might have made some mistakes. But overall, this should improve consistency in use of these terms. Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man/man3/netlink.3')
-rw-r--r--man/man3/netlink.330
1 files changed, 15 insertions, 15 deletions
diff --git a/man/man3/netlink.3 b/man/man3/netlink.3
index a9b6ab5baf..e8594ece25 100644
--- a/man/man3/netlink.3
+++ b/man/man3/netlink.3
@@ -16,13 +16,13 @@ Standard C library
.B #include <asm/types.h>
.B #include <linux/netlink.h>
.P
-.BI "int NLMSG_ALIGN(size_t " len );
-.BI "int NLMSG_LENGTH(size_t " len );
-.BI "int NLMSG_SPACE(size_t " len );
+.BI "int NLMSG_ALIGN(size_t " size );
+.BI "int NLMSG_LENGTH(size_t " size );
+.BI "int NLMSG_SPACE(size_t " size );
.BI "void *NLMSG_DATA(struct nlmsghdr *" nlh );
-.BI "struct nlmsghdr *NLMSG_NEXT(struct nlmsghdr *" nlh ", int " len );
-.BI "int NLMSG_OK(struct nlmsghdr *" nlh ", int " len );
-.BI "int NLMSG_PAYLOAD(struct nlmsghdr *" nlh ", int " len );
+.BI "struct nlmsghdr *NLMSG_NEXT(struct nlmsghdr *" nlh ", int " size );
+.BI "int NLMSG_OK(struct nlmsghdr *" nlh ", int " size );
+.BI "int NLMSG_PAYLOAD(struct nlmsghdr *" nlh ", int " size );
.fi
.SH DESCRIPTION
.I <linux/netlink.h>
@@ -34,19 +34,19 @@ The buffer passed to and from a netlink socket should
be accessed using only these macros.
.TP
.BR NLMSG_ALIGN ()
-Round the length of a netlink message up to align it properly.
+Round the size of a netlink message up to align it properly.
.TP
.BR NLMSG_LENGTH ()
-Given the payload length,
-.IR len ,
-this macro returns the aligned length to store in the
+Given the payload size,
+.IR size ,
+this macro returns the aligned size to store in the
.I nlmsg_len
field of the
.IR nlmsghdr .
.TP
.BR NLMSG_SPACE ()
Return the number of bytes that a netlink message with payload of
-.I len
+.I size
would occupy.
.TP
.BR NLMSG_DATA ()
@@ -64,17 +64,17 @@ didn't have the
.B NLMSG_DONE
set\[em]this function doesn't return NULL on end.
The
-.I len
-argument is an lvalue containing the remaining length
+.I size
+argument is an lvalue containing the remaining size
of the message buffer.
-This macro decrements it by the length of the message header.
+This macro decrements it by the size of the message header.
.TP
.BR NLMSG_OK ()
Return true if the netlink message is not truncated and
is in a form suitable for parsing.
.TP
.BR NLMSG_PAYLOAD ()
-Return the length of the payload associated with the
+Return the size of the payload associated with the
.IR nlmsghdr .
.SH VERSIONS
It is often better to use netlink via