]> git.decadent.org.uk Git - odhcp6c.git/blobdiff - src/odhcp6c.h
Don't apply excess filter to DHCPv6 and unify odhcp6c_update_entry
[odhcp6c.git] / src / odhcp6c.h
index 59c4a42b973d2b53c142f1e320d720ce5a98f2b4..1fda72a2ae32f6b5e005a7ad22e782ff3895683f 100644 (file)
@@ -123,7 +123,7 @@ enum dhcpv6_config {
 };
 
 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 {
@@ -188,9 +188,6 @@ struct dhcpv6_auth_reconfigure {
 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;
 
@@ -246,6 +243,7 @@ enum odhcp6c_state {
        STATE_CLIENT_ID,
        STATE_SERVER_ID,
        STATE_SERVER_CAND,
+       STATE_SERVER_ADDR,
        STATE_ORO,
        STATE_DNS,
        STATE_SEARCH,
@@ -324,7 +322,6 @@ int set_rtnetlink_addr(int ifindex, const struct in6_addr *addr,
 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);
@@ -342,8 +339,7 @@ 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);