From 65018ae43b14c8157bbe05473d76635626177b87 Mon Sep 17 00:00:00 2001 From: Jamal Hadi Salim Date: Tue, 8 Aug 2006 12:13:34 -0700 Subject: This patch adds a generic netlink controller interface. The controller is the only module using this at the moment. Thomas has a sample user of genetlink that would fit here; bug him for it. Signed-off-by: Stephen Hemminger --- genl/genl_utils.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 genl/genl_utils.h (limited to 'genl/genl_utils.h') diff --git a/genl/genl_utils.h b/genl/genl_utils.h new file mode 100644 index 00000000..2f2314b1 --- /dev/null +++ b/genl/genl_utils.h @@ -0,0 +1,22 @@ +#ifndef _TC_UTIL_H_ +#define _TC_UTIL_H_ 1 + +#include "linux/genetlink.h" + +struct genl_util +{ + struct genl_util *next; + char name[16]; + int (*parse_genlopt)(struct genl_util *fu, int argc, char **argv); + int (*print_genlopt)(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); +}; + +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 : 0; +} + +#endif -- cgit v1.2.3