*/
#pragma once
+#include <libubox/ustream.h>
+
#define ALL_DHCPV6_RELAYS {{{0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02}}}
#define DHCPV6_OPT_STATUS 13
#define DHCPV6_OPT_RELAY_MSG 9
#define DHCPV6_OPT_AUTH 11
+#define DHCPV6_OPT_USER_CLASS 15
#define DHCPV6_OPT_INTERFACE_ID 18
#define DHCPV6_OPT_RECONF_MSG 19
#define DHCPV6_OPT_RECONF_ACCEPT 20
#define DHCPV6_OPT_IA_PREFIX 26
#define DHCPV6_OPT_INFO_REFRESH 32
#define DHCPV6_OPT_FQDN 39
+#define DHCPV6_OPT_SOL_MAX_RT 82
#ifdef EXT_PREFIX_CLASS
/* draft-bhandari-dhc-class-based-prefix, not yet standardized */
uint8_t mac[6];
uint8_t length; // length == 128 -> IA_NA, length <= 64 -> IA_PD
bool accept_reconf;
+
+ struct odhcpd_ipaddr *managed;
+ ssize_t managed_size;
+ struct ustream_fd managed_sock;
+
uint8_t clid_len;
uint8_t clid_data[];
};
int dhcpv6_init_ia(struct interface *iface, int socket);
size_t dhcpv6_handle_ia(uint8_t *buf, size_t buflen, struct interface *iface,
const struct sockaddr_in6 *addr, const void *data, const uint8_t *end);
-int dhcpv6_ia_init(int dhcpv6_socket);
+int dhcpv6_ia_init(void);
int setup_dhcpv6_ia_interface(struct interface *iface, bool enable);
void dhcpv6_write_statefile(void);