From: jamal Date: Fri, 8 Dec 2006 01:47:03 +0000 (-0500) Subject: make muticast group to bitmask conversion generic X-Git-Tag: v2.6.19-061214~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cd09e61e349e94c9569d3bc33d5785d1f81961c;p=thirdparty%2Fiproute2.git make muticast group to bitmask conversion generic [utils] make muticast group to bitmask conversion generic Signed-off-by: J Hadi Salim Signed-off-by: Stephen Hemminger --- diff --git a/genl/genl_utils.h b/genl/genl_utils.h index 22e9210f6..85b518301 100644 --- a/genl/genl_utils.h +++ b/genl/genl_utils.h @@ -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 diff --git a/include/utils.h b/include/utils.h index a4133c91e..1769ca101 100644 --- a/include/utils.h +++ b/include/utils.h @@ -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]))