diff options
Diffstat (limited to 'include/uapi/linux/netlink.h')
-rw-r--r-- | include/uapi/linux/netlink.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h index b2c9c26ea30f..7df88770e029 100644 --- a/include/uapi/linux/netlink.h +++ b/include/uapi/linux/netlink.h | |||
@@ -69,6 +69,10 @@ struct nlmsghdr { | |||
69 | #define NLM_F_CREATE 0x400 /* Create, if it does not exist */ | 69 | #define NLM_F_CREATE 0x400 /* Create, if it does not exist */ |
70 | #define NLM_F_APPEND 0x800 /* Add to end of list */ | 70 | #define NLM_F_APPEND 0x800 /* Add to end of list */ |
71 | 71 | ||
72 | /* Flags for ACK message */ | ||
73 | #define NLM_F_CAPPED 0x100 /* request was capped */ | ||
74 | #define NLM_F_ACK_TLVS 0x200 /* extended ACK TVLs were included */ | ||
75 | |||
72 | /* | 76 | /* |
73 | 4.4BSD ADD NLM_F_CREATE|NLM_F_EXCL | 77 | 4.4BSD ADD NLM_F_CREATE|NLM_F_EXCL |
74 | 4.4BSD CHANGE NLM_F_REPLACE | 78 | 4.4BSD CHANGE NLM_F_REPLACE |
@@ -101,6 +105,33 @@ struct nlmsghdr { | |||
101 | struct nlmsgerr { | 105 | struct nlmsgerr { |
102 | int error; | 106 | int error; |
103 | struct nlmsghdr msg; | 107 | struct nlmsghdr msg; |
108 | /* | ||
109 | * followed by the message contents unless NETLINK_CAP_ACK was set | ||
110 | * or the ACK indicates success (error == 0) | ||
111 | * message length is aligned with NLMSG_ALIGN() | ||
112 | */ | ||
113 | /* | ||
114 | * followed by TLVs defined in enum nlmsgerr_attrs | ||
115 | * if NETLINK_EXT_ACK was set | ||
116 | */ | ||
117 | }; | ||
118 | |||
119 | /** | ||
120 | * enum nlmsgerr_attrs - nlmsgerr attributes | ||
121 | * @NLMSGERR_ATTR_UNUSED: unused | ||
122 | * @NLMSGERR_ATTR_MSG: error message string (string) | ||
123 | * @NLMSGERR_ATTR_OFFS: offset of the invalid attribute in the original | ||
124 | * message, counting from the beginning of the header (u32) | ||
125 | * @__NLMSGERR_ATTR_MAX: number of attributes | ||
126 | * @NLMSGERR_ATTR_MAX: highest attribute number | ||
127 | */ | ||
128 | enum nlmsgerr_attrs { | ||
129 | NLMSGERR_ATTR_UNUSED, | ||
130 | NLMSGERR_ATTR_MSG, | ||
131 | NLMSGERR_ATTR_OFFS, | ||
132 | |||
133 | __NLMSGERR_ATTR_MAX, | ||
134 | NLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1 | ||
104 | }; | 135 | }; |
105 | 136 | ||
106 | #define NETLINK_ADD_MEMBERSHIP 1 | 137 | #define NETLINK_ADD_MEMBERSHIP 1 |
@@ -115,6 +146,7 @@ struct nlmsgerr { | |||
115 | #define NETLINK_LISTEN_ALL_NSID 8 | 146 | #define NETLINK_LISTEN_ALL_NSID 8 |
116 | #define NETLINK_LIST_MEMBERSHIPS 9 | 147 | #define NETLINK_LIST_MEMBERSHIPS 9 |
117 | #define NETLINK_CAP_ACK 10 | 148 | #define NETLINK_CAP_ACK 10 |
149 | #define NETLINK_EXT_ACK 11 | ||
118 | 150 | ||
119 | struct nl_pktinfo { | 151 | struct nl_pktinfo { |
120 | __u32 group; | 152 | __u32 group; |