X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=src%2Fodhcp6c.h;h=285f6b10d2e1d3da5d6644fdc69f02bfcde89f33;hb=d88e97eade44c39d4b51eef440c3506edb050044;hp=a8f420698eb671054c11bdf52f9bffb92d1eaea9;hpb=b146f9adc80cc2c2cdf2b04bfeec4c861a2a0e23;p=odhcp6c.git diff --git a/src/odhcp6c.h b/src/odhcp6c.h index a8f4206..285f6b1 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 60 + 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, @@ -97,6 +101,12 @@ enum dhcpv6_status { _DHCPV6_Status_Max }; +enum dhcpv6_config { + DHCPV6_STRICT_OPTIONS = 1, + DHCPV6_CLIENT_FQDN = 2, + DHCPV6_ACCEPT_RECONFIGURE = 4, +}; + typedef int(reply_handler)(enum dhcpv6_msg orig, const int rc, const void *opt, const void *end); @@ -203,6 +213,8 @@ enum odhcp6c_state { STATE_RA_PREFIX, STATE_RA_DNS, STATE_AFTR_NAME, + STATE_VENDORCLASS, + STATE_USERCLASS, _STATE_MAX }; @@ -245,7 +257,7 @@ struct odhcp6c_request_prefix { uint16_t length; }; -int init_dhcpv6(const char *ifname, bool strict_options, int sol_timeout); +int init_dhcpv6(const char *ifname, unsigned int client_options, int sol_timeout); void dhcpv6_set_ia_mode(enum odhcp6c_ia_mode na, enum odhcp6c_ia_mode pd); int dhcpv6_request(enum dhcpv6_msg type); int dhcpv6_poll_reconfigure(void);