X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fnetlink-protocol.h;h=3009fc538b7c75266aa6e9cff692d35d500ae3e7;hb=003ce655b7116d18c86a74c50391e54990346931;hp=6281fb2c3af2678ec86587a55d71ecad60efbc78;hpb=7c6244783982509fddd62b3296bc627943bb7a1a;p=sliver-openvswitch.git diff --git a/lib/netlink-protocol.h b/lib/netlink-protocol.h index 6281fb2c3..3009fc538 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, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,6 +36,7 @@ #ifdef HAVE_NETLINK #include #include + #else #define NETLINK_GENERIC 16 @@ -86,10 +87,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; @@ -152,9 +149,34 @@ enum { /* 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) +#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 +/* These were introduced all together in 2.6.23. (We want our programs to + * support the newer kernel features even if compiled with older headers.) */ +#ifndef CTRL_ATTR_MCAST_GRP_MAX + +#undef CTRL_ATTR_MAX +#define CTRL_ATTR_MAX 7 +#define CTRL_ATTR_MCAST_GROUPS 7 + +enum { + CTRL_ATTR_MCAST_GRP_UNSPEC, + CTRL_ATTR_MCAST_GRP_NAME, + CTRL_ATTR_MCAST_GRP_ID, + __CTRL_ATTR_MCAST_GRP_MAX, +}; + +#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1) +#endif /* CTRL_ATTR_MCAST_GRP_MAX */ + #endif /* netlink-protocol.h */