Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / libnfnetlink / src / rtnl.h
blob0c403dc28a68432c9ee34000d852c47406475481
1 #ifndef _RTNL_H
2 #define _RTNL_H
4 #include <linux/types.h>
5 #include <linux/rtnetlink.h>
7 struct rtnl_handler {
8 struct rtnl_handler *next;
10 u_int16_t nlmsg_type;
11 int (*handlefn)(struct nlmsghdr *h, void *arg);
12 void *arg;
15 struct rtnl_handle {
16 int rtnl_fd;
17 int rtnl_seq;
18 int rtnl_dump;
19 struct sockaddr_nl rtnl_local;
20 struct rtnl_handler *handlers;
23 /* api for handler plugins */
24 int rtnl_handler_register(struct rtnl_handle *rtnl_handle,
25 struct rtnl_handler *hdlr);
26 int rtnl_handler_unregister(struct rtnl_handle *rtnl_handle,
27 struct rtnl_handler *hdlr);
28 int rtnl_parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len);
29 int rtnl_dump_type(struct rtnl_handle *rtnl_handle, unsigned int type);
31 /* api for core program */
32 struct rtnl_handle *rtnl_open(void);
33 void rtnl_close(struct rtnl_handle *rtnl_handle);
34 int rtnl_receive(struct rtnl_handle *rtnl_handle);
35 int rtnl_receive_multi(struct rtnl_handle *rtnl_handle);
37 #endif