]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
make muticast group to bitmask conversion generic
authorjamal <hadi@cyberus.ca>
Fri, 8 Dec 2006 01:47:03 +0000 (20:47 -0500)
committerStephen Hemminger <shemminger@osdl.org>
Thu, 14 Dec 2006 01:04:26 +0000 (17:04 -0800)
[utils] make muticast group to bitmask conversion generic

Signed-off-by: J Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
genl/genl_utils.h
include/utils.h

index 22e9210f607ee3bbf7c6d7c88ff21d854473b891..85b518301f3c88e744032cdd51b6d2c8eeab8381 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _TC_UTIL_H_
 #define _TC_UTIL_H_ 1
 
+#include "utils.h"
 #include "linux/genetlink.h"
 
 struct genl_util
@@ -13,10 +14,4 @@ struct genl_util
 
 extern int genl_ctrl_resolve_family(const char *family);
 
-/* seems to have dissapeared from netlink.h */
-static inline __u32 nl_mgrp(__u32 group)
-{
-       return group ? (1 << (group -1)) : 0;
-}
-
 #endif
index a4133c91ed3223ce09b0716bc653af1afcf156c5..1769ca101c145ec6a6bda8550911da497c05636d 100644 (file)
@@ -127,6 +127,12 @@ static __inline__ int get_user_hz(void)
        return __iproute2_user_hz_internal;
 }
 
+static inline __u32 nl_mgrp(__u32 group)
+{
+       return group ? (1 << (group -1)) : 0;
+}
+
+
 int print_timestamp(FILE *fp);
 
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))