6 #define DEFAULT_BUFSIZE 2048
7 #define DEFAULT_MTU 1000
8 #define ICMP_BUFSIZE 1024
10 struct netlink_client
{
11 struct subnet_list
*networks
;
12 netlink_deliver_fn
*deliver
;
15 uint32_t link_quality
;
17 struct netlink_client
*next
;
20 struct netlink_route
{
26 uint32_t quality
; /* provided by client */
27 struct netlink_client
*c
;
30 typedef bool_t
netlink_route_fn(void *cst
, struct netlink_route
*route
);
32 /* Netlink provides one function to the device driver, to call to deliver
33 a packet from the device. The device driver provides one function to
34 netlink, for it to call to deliver a packet to the device. */
38 struct netlink_if ops
;
39 void *dst
; /* Pointer to host interface state */
41 uint32_t max_start_pad
;
43 struct subnet_list networks
;
44 struct subnet_list exclude_remote_networks
;
45 uint32_t secnet_address
; /* our own address */
47 struct netlink_client
*clients
;
48 netlink_deliver_fn
*deliver_to_host
; /* Provided by driver */
49 netlink_route_fn
*set_route
; /* Provided by driver */
50 struct buffer_if icmp
; /* Buffer for assembly of outgoing ICMP */
51 uint32_t n_routes
; /* How many routes do we know about? */
52 struct netlink_route
*routes
;
55 extern netlink_deliver_fn
*netlink_init(struct netlink
*st
,
56 void *dst
, struct cloc loc
,
57 dict_t
*dict
, string_t description
,
58 netlink_route_fn
*set_route
,
59 netlink_deliver_fn
*to_host
);
61 #endif /* netlink_h */