Cancel pending timeouts before freeing hosts
[project/relayd.git] / relayd.h
index 0fb38e7..fd23833 100644 (file)
--- a/relayd.h
+++ b/relayd.h
 #ifndef __RELAYD_H
 #define __RELAYD_H
 
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <net/ethernet.h>
+#include <netinet/if_ether.h>
+#include <netinet/ip.h>
+#include <netinet/udp.h>
+
+#include <linux/if_packet.h>
+#include <linux/rtnetlink.h>
+#include <linux/neighbour.h>
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#include "uloop.h"
+#include "list.h"
+
 #define DEBUG
 #ifdef DEBUG
 #define DPRINTF(level, ...) if (debug >= level) fprintf(stderr, __VA_ARGS__);
@@ -87,7 +104,15 @@ struct rtnl_req {
        struct rtmsg rt;
 } __packed;
 
-struct list_head interfaces;
+extern struct list_head interfaces;
 extern int debug;
 
+void relayd_add_route(struct relayd_host *host);
+void relayd_del_route(struct relayd_host *host);
+
+int relayd_rtnl_init(void);
+void relayd_rtnl_done(void);
+
+struct relayd_host *relayd_refresh_host(struct relayd_interface *rif, const uint8_t *lladdr, const uint8_t *ipaddr);
+
 #endif