4 #include <linux/types.h>
5 #include <linux/rtnetlink.h>
8 struct rtnl_handler
*next
;
11 int (*handlefn
)(struct nlmsghdr
*h
, void *arg
);
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
);