X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fodhcpd.git;a=blobdiff_plain;f=src%2Fdhcpv6.h;h=c0775f190c90559f61ffbbe65f68f7a2eb140356;hp=dbde88a040b0b8fc3bb468728f43c0d372e528d3;hb=1b630f8bc59978884c9caccebca3b6d8e9b045a1;hpb=d12c7b8c39bc0f727bde5aa34595e9a581891dca diff --git a/src/dhcpv6.h b/src/dhcpv6.h index dbde88a..c0775f1 100644 --- a/src/dhcpv6.h +++ b/src/dhcpv6.h @@ -14,6 +14,7 @@ #pragma once #include +#include "odhcpd.h" #define ALL_DHCPV6_RELAYS {{{0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02}}} @@ -57,11 +58,7 @@ #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 */ -#define DHCPV6_OPT_PREFIX_CLASS EXT_PREFIX_CLASS -#endif +#define DHCPV6_OPT_INF_MAX_RT 83 #define DHCPV6_DUID_VENDOR 2 @@ -69,6 +66,7 @@ #define DHCPV6_STATUS_NOADDRSAVAIL 2 #define DHCPV6_STATUS_NOBINDING 3 #define DHCPV6_STATUS_NOTONLINK 4 +#define DHCPV6_STATUS_USEMULTICAST 5 #define DHCPV6_STATUS_NOPREFIXAVAIL 6 // I just remembered I have an old one lying around... @@ -144,9 +142,6 @@ struct dhcpv6_assignment { 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]; @@ -160,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[]; }; @@ -187,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);