summaryrefslogtreecommitdiffhomepage
path: root/src/odhcpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/odhcpd.h')
-rw-r--r--src/odhcpd.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/odhcpd.h b/src/odhcpd.h
index f32f34b..e7fcd82 100644
--- a/src/odhcpd.h
+++ b/src/odhcpd.h
@@ -23,6 +23,7 @@
#include <libubox/list.h>
#include <libubox/uloop.h>
#include <libubox/avl.h>
+#include <libubox/ustream.h>
// RFC 6106 defines this router advertisement option
#define ND_OPT_ROUTE_INFO 24
@@ -145,6 +146,44 @@ struct lease {
};
+struct odhcpd_ref_ip;
+
+struct dhcp_assignment {
+ struct list_head head;
+ struct interface *iface;
+
+ struct sockaddr_in6 peer;
+ time_t valid_until;
+
+#define fr_timer reconf_timer
+ struct uloop_timeout reconf_timer;
+#define accept_fr_nonce accept_reconf
+ bool accept_reconf;
+#define fr_cnt reconf_cnt
+ int reconf_cnt;
+ uint8_t key[16];
+ struct odhcpd_ref_ip *fr_ip;
+
+ uint32_t addr;
+ uint32_t assigned;
+ uint32_t iaid;
+ uint8_t length; // length == 128 -> IA_NA, length <= 64 -> IA_PD
+
+ struct odhcpd_ipaddr *managed;
+ ssize_t managed_size;
+ struct ustream_fd managed_sock;
+
+ unsigned int flags;
+ uint32_t leasetime;
+ char *hostname;
+#define hwaddr mac
+ uint8_t mac[6];
+
+ uint8_t clid_len;
+ uint8_t clid_data[];
+};
+
+
struct interface {
struct avl_node avl;