diff options
author | laforge <laforge> | 2005-11-04 13:50:25 +0000 |
---|---|---|
committer | laforge <laforge> | 2005-11-04 13:50:25 +0000 |
commit | d28e2bf3222ef4c58bebebd9c118818bfccedb8c (patch) | |
tree | 818b09ee9d3e936527dc6dfb33e06feea74d8ea0 /filter/rtnl.h | |
parent | bbb97afe32b049af50f410f02431237df2f9cb9d (diff) |
implement ifindex to interface name filter plugin
Diffstat (limited to 'filter/rtnl.h')
-rw-r--r-- | filter/rtnl.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/filter/rtnl.h b/filter/rtnl.h new file mode 100644 index 0000000..18f0963 --- /dev/null +++ b/filter/rtnl.h @@ -0,0 +1,29 @@ +#ifndef _RTNL_H +#define _RTNL_H + +#include <sys/socket.h> +#include <linux/types.h> +#include <linux/rtnetlink.h> + +struct rtnl_handler { + struct rtnl_handler *next; + + u_int16_t nlmsg_type; + int (*handlefn)(struct nlmsghdr *h, void *arg); + void *arg; +}; + + +/* api for handler plugins */ +int rtnl_handler_register(struct rtnl_handler *hdlr); +int rtnl_handler_unregister(struct rtnl_handler *hdlr); +int rtnl_parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len); +int rtnl_dump_type(unsigned int type); + +/* api for core program */ +int rtnl_init(void); +void rtnl_fini(void); +int rtnl_receive(); + + +#endif |