diff options
author | Jamal Hadi Salim <hadi@cyberus.ca> | 2006-08-08 12:13:34 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@osdl.org> | 2006-08-08 12:13:34 -0700 |
commit | 65018ae43b14c8157bbe05473d76635626177b87 (patch) | |
tree | c01782fd0e7e50265fedb22829986ca00ff9be7f /genl/genl_utils.h | |
parent | de0a0b52a6ddfb6b3c4a5f835daa4cc3100bf234 (diff) |
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 <shemminger@osdl.org>
Diffstat (limited to 'genl/genl_utils.h')
-rw-r--r-- | genl/genl_utils.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 |