#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}}}
#define DHCPV6_OPT_SOL_MAX_RT 82
#define DHCPV6_OPT_INF_MAX_RT 83
-#ifdef EXT_PREFIX_CLASS
-/* draft-bhandari-dhc-class-based-prefix, not yet standardized */
-#define DHCPV6_OPT_PREFIX_CLASS EXT_PREFIX_CLASS
-#endif
-
#define DHCPV6_DUID_VENDOR 2
#define DHCPV6_STATUS_OK 0
struct sockaddr_in6 peer;
time_t valid_until;
time_t reconf_sent;
- bool all_class;
- uint8_t classes_cnt;
- uint16_t *classes;
int reconf_cnt;
char *hostname;
uint8_t key[16];
ssize_t managed_size;
struct ustream_fd managed_sock;
+ uint32_t leasetime;
+ unsigned int flags;
+
uint8_t clid_len;
uint8_t clid_data[];
};
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);