DHCPV6_OPT_PD_EXCLUDE = 67,
DHCPV6_OPT_SOL_MAX_RT = 82,
DHCPV6_OPT_INF_MAX_RT = 83,
-#ifdef EXT_PREFIX_CLASS
- /* 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,
};
typedef int(reply_handler)(enum dhcpv6_msg orig, const int rc,
- const void *opt, const void *end);
+ const void *opt, const void *end, const struct sockaddr_in6 *from);
// retransmission strategy
struct dhcpv6_retx {
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;
STATE_CLIENT_ID,
STATE_SERVER_ID,
STATE_SERVER_CAND,
+ STATE_SERVER_ADDR,
STATE_ORO,
STATE_DNS,
STATE_SEARCH,
STATE_RA_ROUTE,
STATE_RA_PREFIX,
STATE_RA_DNS,
+ STATE_RA_SEARCH,
STATE_AFTR_NAME,
STATE_VENDORCLASS,
STATE_USERCLASS,
struct odhcp6c_entry {
struct in6_addr router;
- uint16_t length;
+ uint8_t auxlen;
+ uint8_t length;
int16_t priority;
struct in6_addr target;
uint32_t valid;
uint32_t preferred;
uint32_t t1;
uint32_t t2;
- uint16_t class;
uint32_t iaid;
+ uint8_t auxtarget[];
};
struct odhcp6c_request_prefix {
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 script_init(const char *path, const char *ifname);
ssize_t script_unhexlify(uint8_t *dst, size_t len, const char *src);
void script_call(const char *status);
-void script_delay_call(const char *status, int timeout);
bool odhcp6c_signal_process(void);
uint64_t odhcp6c_get_milli_time(void);
-void odhcp6c_random(void *buf, size_t len);
+int odhcp6c_random(void *buf, size_t len);
bool odhcp6c_is_bound(void);
// State manipulation
void* odhcp6c_get_state(enum odhcp6c_state state, size_t *len);
// Entry manipulation
-struct odhcp6c_entry* odhcp6c_find_entry(enum odhcp6c_state state, const struct odhcp6c_entry *new);
-bool odhcp6c_update_entry(enum odhcp6c_state state, struct odhcp6c_entry *new);
-bool odhcp6c_update_entry_safe(enum odhcp6c_state state, struct odhcp6c_entry *new, uint32_t safe);
+bool odhcp6c_update_entry(enum odhcp6c_state state, struct odhcp6c_entry *new, uint32_t safe, bool filterexcess);
void odhcp6c_expire(void);
uint32_t odhcp6c_elapsed(void);