summaryrefslogtreecommitdiffhomepage
path: root/src/odhcpd.h
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2018-12-11 14:13:30 +0100
committerHans Dedecker <dedeckeh@gmail.com>2019-02-08 14:07:21 +0100
commit7847b27e6533824e41fbae239acfda328b9cdfa5 (patch)
tree6674993d128d1c2ed30eacf44e41203ae6f46afe /src/odhcpd.h
parenta54cee0d033ada75724b18a9350103a02e0ba956 (diff)
treewide: unify dhcpv6 and dhcpv4 assignments
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
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;