dhcpv4: implement router configuration option
[project/odhcpd.git] / src / dhcpv6.h
index 936a350..44ce1d7 100644 (file)
@@ -57,6 +57,7 @@
 #define DHCPV6_OPT_INFO_REFRESH 32
 #define DHCPV6_OPT_FQDN 39
 #define DHCPV6_OPT_SOL_MAX_RT 82
 #define DHCPV6_OPT_INFO_REFRESH 32
 #define DHCPV6_OPT_FQDN 39
 #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 */
 
 #ifdef EXT_PREFIX_CLASS
 /* draft-bhandari-dhc-class-based-prefix, not yet standardized */
@@ -69,6 +70,7 @@
 #define DHCPV6_STATUS_NOADDRSAVAIL 2
 #define DHCPV6_STATUS_NOBINDING 3
 #define DHCPV6_STATUS_NOTONLINK 4
 #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...
 #define DHCPV6_STATUS_NOPREFIXAVAIL 6
 
 // I just remembered I have an old one lying around...
@@ -164,6 +166,15 @@ struct dhcpv6_assignment {
        uint8_t clid_data[];
 };
 
        uint8_t clid_data[];
 };
 
+struct dhcpv6_cer_id {
+       uint16_t type;
+       uint16_t len;
+       uint16_t reserved;
+       uint16_t auth_type;
+       uint8_t auth[16];
+       struct in6_addr addr;
+};
+
 
 
 #define dhcpv6_for_each_option(start, end, otype, olen, odata)\
 
 
 #define dhcpv6_for_each_option(start, end, otype, olen, odata)\
@@ -173,7 +184,7 @@ struct dhcpv6_assignment {
                _o += 4 + (_o[2] << 8 | _o[3]))
 
 int dhcpv6_init_ia(struct interface *iface, int socket);
                _o += 4 + (_o[2] << 8 | _o[3]))
 
 int dhcpv6_init_ia(struct interface *iface, int socket);
-size_t dhcpv6_handle_ia(uint8_t *buf, size_t buflen, struct interface *iface,
+ssize_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(void);
 int setup_dhcpv6_ia_interface(struct interface *iface, bool enable);
                const struct sockaddr_in6 *addr, const void *data, const uint8_t *end);
 int dhcpv6_ia_init(void);
 int setup_dhcpv6_ia_interface(struct interface *iface, bool enable);