diff options
author | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org> | 2005-08-12 12:34:44 +0000 |
---|---|---|
committer | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org> | 2005-08-12 12:34:44 +0000 |
commit | 3082bc6baeee32db8b437aca1072ca3a564f546c (patch) | |
tree | b29326ee0bda6596d7293202c3ec5ef05ca7c2c4 /src/rtnl.h | |
parent | ca73c40c755f64cc305b8c53cef49cd9d04c5b57 (diff) |
add (but not use) rtnetlink source code for resolving ifindex<->devname
Diffstat (limited to 'src/rtnl.h')
-rw-r--r-- | src/rtnl.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/rtnl.h b/src/rtnl.h new file mode 100644 index 0000000..5eeb043 --- /dev/null +++ b/src/rtnl.h @@ -0,0 +1,28 @@ +#ifndef _RTNL_H +#define _RTNL_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 |