X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fnetlink-protocol.h;h=1b5fa715389f62002f47d38bc375bcb5113d4866;hb=4f1046117c54e60b8ef6b7b21c23d3a4bf2e61fb;hp=77f5c8965f796fd229135e41aefb897514956c2f;hpb=365a25176bf854112b37c56888979d7755ab0d72;p=openvswitch diff --git a/lib/netlink-protocol.h b/lib/netlink-protocol.h index 77f5c896..1b5fa715 100644 --- a/lib/netlink-protocol.h +++ b/lib/netlink-protocol.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010 Nicira Networks. + * Copyright (c) 2008, 2010, 2011 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -86,10 +86,6 @@ struct nlmsgerr }; BUILD_ASSERT_DECL(sizeof(struct nlmsgerr) == 20); -#define NETLINK_ADD_MEMBERSHIP 1 -#define NETLINK_DROP_MEMBERSHIP 2 -#define NETLINK_PKTINFO 3 - struct genlmsghdr { uint8_t cmd; uint8_t version; @@ -150,4 +146,18 @@ 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 + +/* These were introduced all together in 2.6.14. (We want our programs to + * support the newer kernel features even if compiled with older headers.) */ +#ifndef NETLINK_ADD_MEMBERSHIP +#define NETLINK_ADD_MEMBERSHIP 1 +#define NETLINK_DROP_MEMBERSHIP 2 +#endif + #endif /* netlink-protocol.h */