diff options
| author | Philipp Schuster <phip1611@gmail.com> | 2021-02-20 23:48:36 +0100 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2021-02-21 09:57:04 +0100 |
| commit | efbcc10934d9c3f70e4b9ac86dbcc655792eee05 (patch) | |
| tree | 69d9328400c20fbf300eecc5fe306aaec08acbc0 /man7 | |
| parent | 04fd7f3121bd4cea3d1d0a919bfaef1d5c761a5e (diff) | |
| download | man-pages-efbcc10934d9c3f70e4b9ac86dbcc655792eee05.tar.gz | |
netlink.7: Clarify details of netlink error responses
Make it clear that netlink error responses (i.e., messages with
type NLMSG_ERROR (0x2)), can be longer than sizeof(struct
nlmsgerr). In certain circumstances, the payload can be longer.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7')
| -rw-r--r-- | man7/netlink.7 | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/man7/netlink.7 b/man7/netlink.7 index c69bb62bfc..1f1a0d9904 100644 --- a/man7/netlink.7 +++ b/man7/netlink.7 @@ -189,13 +189,25 @@ message signals an error and the payload contains an .I nlmsgerr structure, .B NLMSG_DONE -message terminates a multipart message. +message terminates a multipart message. Error messages get the +original request appened, unless the user requests to cap the +error message, and get extra error data if requested. .PP .in +4n .EX struct nlmsgerr { int error; /* Negative errno or 0 for acknowledgements */ struct nlmsghdr msg; /* Message header that caused the error */ + /* + * followed by the message contents unless NETLINK_CAP_ACK was set + * or the ACK indicates success (error == 0). + * For example Generic Netlink message with attributes. + * message length is aligned with NLMSG_ALIGN() + */ + /* + * followed by TLVs defined in enum nlmsgerr_attrs + * if NETLINK_EXT_ACK was set + */ }; .EE .in |
