diff options
| author | Ben Pfaff <blp@nicira.com> | 2010-12-07 09:37:59 -0800 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2010-12-10 11:13:31 -0800 |
| commit | 7c6244783982509fddd62b3296bc627943bb7a1a (patch) | |
| tree | 0e2064b181295e6432aa24cd048dde6b9442237a /lib/netlink-protocol.h | |
| parent | ee913f985d470515cc018e57ea56aac3f087702f (diff) | |
| download | openvswitch-7c6244783982509fddd62b3296bc627943bb7a1a.tar.gz | |
netlink: New function nl_attr_type().
Linux since v2.6.24 has a couple of couple of bits at the top of
nla_type that one is apparently supposed to ignore. This commit
starts doing that in Open vSwitch userspace.
Acked-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'lib/netlink-protocol.h')
| -rw-r--r-- | lib/netlink-protocol.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/netlink-protocol.h b/lib/netlink-protocol.h index 77f5c8965..6281fb2c3 100644 --- a/lib/netlink-protocol.h +++ b/lib/netlink-protocol.h @@ -150,4 +150,11 @@ enum { #define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1) #endif /* !HAVE_NETLINK */ +/* These were introduced all together in 2.6.24. */ +#ifndef NLA_TYPE_MASK +#define NLA_F_NESTED (1 << 15) +#define NLA_F_NET_BYTEORDER (1 << 14) +#define NLA_TYPE_MASK ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER) +#endif + #endif /* netlink-protocol.h */ |
