X-Git-Url: https://git.decadent.org.uk/gitweb/?p=odhcp6c.git;a=blobdiff_plain;f=src%2Fodhcp6c.h;h=2bc289b3d6198f7fae2ab185100b38b0f4ed2827;hp=024ebea5476b49b907e59895899c3a3388a6125e;hb=47fac6f603c236d7b149e0ec593269322572b352;hpb=dc30922e418be6271ad177f3f9d4ecf0c1eb3f01 diff --git a/src/odhcp6c.h b/src/odhcp6c.h index 024ebea..2bc289b 100644 --- a/src/odhcp6c.h +++ b/src/odhcp6c.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012-2013 Steven Barth + * Copyright (C) 2012-2014 Steven Barth * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License v2 as published by @@ -31,6 +31,8 @@ #define DHCPV6_REB_MAX_RT 600 #define DHCPV6_INF_MAX_RT 3600 +#define DEFAULT_MIN_UPDATE_INTERVAL 30 + enum dhcvp6_opt { DHCPV6_OPT_CLIENTID = 1, DHCPV6_OPT_SERVERID = 2, @@ -43,6 +45,8 @@ enum dhcvp6_opt { DHCPV6_OPT_AUTH = 11, DHCPV6_OPT_STATUS = 13, DHCPV6_OPT_RAPID_COMMIT = 14, + DHCPV6_OPT_USER_CLASS = 15, + DHCPV6_OPT_VENDOR_CLASS = 16, DHCPV6_OPT_RECONF_MESSAGE = 19, DHCPV6_OPT_RECONF_ACCEPT = 20, DHCPV6_OPT_DNS_SERVERS = 23, @@ -63,6 +67,10 @@ enum dhcvp6_opt { /* draft-bhandari-dhc-class-based-prefix, not yet standardized */ DHCPV6_OPT_PREFIX_CLASS = EXT_PREFIX_CLASS, #endif +#ifdef EXT_CER_ID + /* draft-donley-dhc-cer-id-option-03 */ + DHCPV6_OPT_CER_ID = EXT_CER_ID, +#endif }; enum dhcpv6_opt_npt { @@ -166,6 +174,15 @@ struct dhcpv6_auth_reconfigure { uint8_t key[16]; } _packed; +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; +} _packed; + #define dhcpv6_for_each_option(start, end, otype, olen, odata)\ for (uint8_t *_o = (uint8_t*)(start); _o + 4 <= (uint8_t*)(end) &&\ @@ -209,6 +226,9 @@ enum odhcp6c_state { STATE_RA_PREFIX, STATE_RA_DNS, STATE_AFTR_NAME, + STATE_VENDORCLASS, + STATE_USERCLASS, + STATE_CER, _STATE_MAX };