hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From 30ff5d1f742e2ed1be3fd9c42dcc902b6f3a19cc Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Wed, 27 May 2020 15:24:19 +0800
Subject: [PATCH 4/5] uapi: netlink.h: Add more definations from upstream
 
No functional changes.
 
Change-Id: I7fb817dda7f9755e6d068594cbc71e2202a5ade5
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
 include/uapi/linux/netlink.h | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
index 0dba4e4ed2be..c4999c6552f1 100644
--- a/include/uapi/linux/netlink.h
+++ b/include/uapi/linux/netlink.h
@@ -68,6 +68,10 @@ struct nlmsghdr {
 #define NLM_F_CREATE    0x400    /* Create, if it does not exist    */
 #define NLM_F_APPEND    0x800    /* Add to end of list        */
 
+/* Flags for ACK message */
+#define NLM_F_CAPPED    0x100    /* request was capped */
+#define NLM_F_ACK_TLVS  0x200    /* extended ACK TVLs were included */
+
 /*
    4.4BSD ADD        NLM_F_CREATE|NLM_F_EXCL
    4.4BSD CHANGE    NLM_F_REPLACE
@@ -102,6 +106,28 @@ struct nlmsgerr {
     struct nlmsghdr msg;
 };
 
+/**
+ * enum nlmsgerr_attrs - nlmsgerr attributes
+ * @NLMSGERR_ATTR_UNUSED: unused
+ * @NLMSGERR_ATTR_MSG: error message string (string)
+ * @NLMSGERR_ATTR_OFFS: offset of the invalid attribute in the original
+ *       message, counting from the beginning of the header (u32)
+ * @NLMSGERR_ATTR_COOKIE: arbitrary subsystem specific cookie to
+ *      be used - in the success case - to identify a created
+ *      object or operation or similar (binary)
+ * @__NLMSGERR_ATTR_MAX: number of attributes
+ * @NLMSGERR_ATTR_MAX: highest attribute number
+ */
+enum nlmsgerr_attrs {
+    NLMSGERR_ATTR_UNUSED,
+    NLMSGERR_ATTR_MSG,
+    NLMSGERR_ATTR_OFFS,
+    NLMSGERR_ATTR_COOKIE,
+
+    __NLMSGERR_ATTR_MAX,
+    NLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1
+};
+
 #define NETLINK_ADD_MEMBERSHIP        1
 #define NETLINK_DROP_MEMBERSHIP        2
 #define NETLINK_PKTINFO            3
@@ -114,6 +140,7 @@ struct nlmsgerr {
 #define NETLINK_LISTEN_ALL_NSID        8
 #define NETLINK_LIST_MEMBERSHIPS    9
 #define NETLINK_CAP_ACK            10
+#define NETLINK_EXT_ACK            11
 
 struct nl_pktinfo {
     __u32    group;
-- 
2.20.1