router: add syslog debug tracing for trouble shooting
[project/odhcpd.git] / src / odhcpd.h
index 3e8fc3e..cbeaaf8 100644 (file)
@@ -43,6 +43,9 @@
 
 #define RELAYD_BUFFER_SIZE 8192
 #define RELAYD_MAX_PREFIXES 8
+#define RELAYD_MAX_ADDRS 8
+
+#define INFINITE_VALID(x) ((x) == 0)
 
 #define _unused __attribute__((unused))
 #define _packed __attribute__((packed))
@@ -82,6 +85,11 @@ enum odhcpd_mode {
 };
 
 
+enum odhcpd_assignment_flags {
+       OAF_BOUND       = (1 << 0),
+       OAF_STATIC      = (1 << 1),
+};
+
 struct config {
        bool legacy;
        char *dhcp_cb;
@@ -111,7 +119,7 @@ struct interface {
        // Runtime data
        struct uloop_timeout timer_rs;
        struct list_head ia_assignments;
-       struct odhcpd_ipaddr ia_addr[8];
+       struct odhcpd_ipaddr ia_addr[RELAYD_MAX_ADDRS];
        size_t ia_addr_len;
        bool ia_reconf;