]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/netlink.h
[NETLINK]: Introduce nested and byteorder flag to netlink attribute
[net-next-2.6.git] / include / linux / netlink.h
index d2843ae4a83a35d0d4d6e880c773a392ce8ff247..e638256ce4729cc6e5398644c77b6ebd9ee2bfa8 100644 (file)
@@ -131,6 +131,20 @@ struct nlattr
        __u16           nla_type;
 };
 
+/*
+ * nla_type (16 bits)
+ * +---+---+-------------------------------+
+ * | N | O | Attribute Type                |
+ * +---+---+-------------------------------+
+ * N := Carries nested attributes
+ * O := Payload stored in network byte order
+ *
+ * Note: The N and O flag are mutually exclusive.
+ */
+#define NLA_F_NESTED           (1 << 15)
+#define NLA_F_NET_BYTEORDER    (1 << 14)
+#define NLA_TYPE_MASK          ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER)
+
 #define NLA_ALIGNTO            4
 #define NLA_ALIGN(len)         (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1))
 #define NLA_HDRLEN             ((int) NLA_ALIGN(sizeof(struct nlattr)))