]> git.proxmox.com Git - mirror_iproute2.git/blob - genl/genl_utils.h
This patch adds a generic netlink controller interface.
[mirror_iproute2.git] / genl / genl_utils.h
1 #ifndef _TC_UTIL_H_
2 #define _TC_UTIL_H_ 1
3
4 #include "linux/genetlink.h"
5
6 struct genl_util
7 {
8 struct genl_util *next;
9 char name[16];
10 int (*parse_genlopt)(struct genl_util *fu, int argc, char **argv);
11 int (*print_genlopt)(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg);
12 };
13
14 extern int genl_ctrl_resolve_family(const char *family);
15
16 /* seems to have dissapeared from netlink.h */
17 static inline __u32 nl_mgrp(__u32 group)
18 {
19 return group ? 1 << group : 0;
20 }
21
22 #endif