libcortex
Event loop library following a "batteries included" approach
Loading...
Searching...
No Matches
nl_route_raw.h
1#ifndef _CRTX_NL_ROUTE_H
2#define _CRTX_NL_ROUTE_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8/*
9 * Mario Kicherer (dev@kicherer.org) 2016
10 *
11 */
12
13#include <linux/netlink.h>
14#include <linux/rtnetlink.h>
15
16#include "netlink_raw.h"
17
19 struct crtx_listener_base base;
20
21 struct crtx_netlink_raw_listener nl_listener;
22
23 uint16_t *nlmsg_types;
24
25 struct crtx_dict *(*raw2dict)(struct crtx_nl_route_raw_listener *nl_listener, struct nlmsghdr *nlh);
26 char all_fields;
27
28// struct crtx_signals msg_done;
29 void (*msg_done_cb)(void *data);
30 void *msg_done_cb_data;
31};
32
33struct crtx_dict *crtx_nl_route_raw2dict_ifaddr(struct crtx_nl_route_raw_listener *nlr_list, struct nlmsghdr *nlh);
34struct crtx_dict *crtx_nl_route_raw2dict_ifaddr2(struct nlmsghdr *nlh, int all_fields);
35struct crtx_dict *crtx_nl_route_raw2dict_interface(struct nlmsghdr *nlh, char all_fields);
36char crtx_nl_route_send_req(struct crtx_nl_route_raw_listener *nl_listener, struct nlmsghdr *n);
37
38struct crtx_listener_base *crtx_setup_nl_route_raw_listener(void *options);
39CRTX_DECLARE_ALLOC_FUNCTION(nl_route_raw)
40CRTX_DECLARE_CALLOC_FUNCTION(nl_route_raw)
41
42void crtx_nl_route_raw_init();
43void crtx_nl_route_raw_finish();
44
45#ifdef __cplusplus
46}
47#endif
48
49#endif
Definition dict.h:61
base structure of a listener
Definition core.h:186
Definition nl_route_raw.h:18