DHCPV6_OPT_RAPID_COMMIT = 14,
DHCPV6_OPT_USER_CLASS = 15,
DHCPV6_OPT_VENDOR_CLASS = 16,
+ DHCPV6_OPT_INTERFACE_ID = 18,
DHCPV6_OPT_RECONF_MESSAGE = 19,
DHCPV6_OPT_RECONF_ACCEPT = 20,
DHCPV6_OPT_DNS_SERVERS = 23,
DHCPV6_STRICT_OPTIONS = 1,
DHCPV6_CLIENT_FQDN = 2,
DHCPV6_ACCEPT_RECONFIGURE = 4,
+ DHCPV6_IGNORE_OPT_UNICAST = 8,
};
typedef int(reply_handler)(enum dhcpv6_msg orig, const int rc,
STATE_RA_DNS,
STATE_RA_SEARCH,
STATE_AFTR_NAME,
- STATE_VENDORCLASS,
- STATE_USERCLASS,
+ STATE_OPTS,
STATE_CER,
STATE_S46_MAPT,
STATE_S46_MAPE,
uint16_t length;
};
+enum odhcp6c_opt_flags {
+ OPT_U8 = 0,
+ OPT_IP6,
+ OPT_STR,
+ OPT_DNS_STR,
+ OPT_USER_CLASS,
+ OPT_MASK_SIZE = 0x0F,
+ OPT_ARRAY = 0x10,
+ OPT_INTERNAL = 0x20,
+ OPT_NO_PASSTHRU = 0x40,
+};
+
+struct odhcp6c_opt {
+ uint16_t code;
+ uint8_t flags;
+ const char *str;
+};
+
int init_dhcpv6(const char *ifname, unsigned int client_options, int sol_timeout);
int dhcpv6_set_ia_mode(enum odhcp6c_ia_mode na, enum odhcp6c_ia_mode pd);
int dhcpv6_request(enum dhcpv6_msg type);
int set_rtnetlink_addr(int ifindex, const struct in6_addr *addr,
uint32_t pref, uint32_t valid);
-int ra_conf_hoplimit(int newvalue);
-int ra_conf_mtu(int newvalue);
-int ra_conf_reachable(int newvalue);
-int ra_conf_retransmit(int newvalue);
+int ra_get_hoplimit(void);
+int ra_get_mtu(void);
+int ra_get_reachable(void);
+int ra_get_retransmit(void);
int script_init(const char *path, const char *ifname);
ssize_t script_unhexlify(uint8_t *dst, size_t len, const char *src);
void odhcp6c_expire(void);
uint32_t odhcp6c_elapsed(void);
+struct odhcp6c_opt *odhcp6c_find_opt(const uint16_t code);