router: support ra_mininterval and ra_lifetime uci parameters (FS#397)
[project/odhcpd.git] / src / dhcpv6.h
index 09aa6f1..c0775f1 100644 (file)
@@ -14,6 +14,7 @@
 #pragma once
 
 #include <libubox/ustream.h>
+#include "odhcpd.h"
 
 #define ALL_DHCPV6_RELAYS {{{0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
                0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02}}}
@@ -154,6 +155,9 @@ struct dhcpv6_assignment {
        ssize_t managed_size;
        struct ustream_fd managed_sock;
 
+       uint32_t leasetime;
+       unsigned int flags;
+
        uint8_t clid_len;
        uint8_t clid_data[];
 };
@@ -181,3 +185,5 @@ ssize_t dhcpv6_handle_ia(uint8_t *buf, size_t buflen, struct interface *iface,
 int dhcpv6_ia_init(void);
 int setup_dhcpv6_ia_interface(struct interface *iface, bool enable);
 void dhcpv6_write_statefile(void);
+void dhcpv6_ia_preupdate(struct interface *iface);
+void dhcpv6_ia_postupdate(struct interface *iface, time_t now);