X-Git-Url: https://git.decadent.org.uk/gitweb/?p=odhcp6c.git;a=blobdiff_plain;f=src%2Fodhcp6c.h;h=5b9b78fd1faa200c73e9f6f8e4ca9dbf70158bdc;hp=b6f0ff2331d33588b39d9ee0273d6e4a066b8c43;hb=24c064ccbf819f85c8709ea60acb3b278377b408;hpb=d2c90000292f62962276579fa6b2eac1ff4b76e6 diff --git a/src/odhcp6c.h b/src/odhcp6c.h index b6f0ff2..5b9b78f 100644 --- a/src/odhcp6c.h +++ b/src/odhcp6c.h @@ -85,7 +85,7 @@ enum dhcpv6_status { DHCPV6_NoPrefixAvail = 6, }; -typedef int(reply_handler)(enum dhcpv6_msg orig, +typedef int(reply_handler)(enum dhcpv6_msg orig, const int rc, const void *opt, const void *end); // retransmission strategy @@ -93,12 +93,12 @@ struct dhcpv6_retx { bool delay; uint8_t init_timeo; uint16_t max_timeo; + uint8_t max_rc; char name[8]; reply_handler *handler_reply; int(*handler_finish)(void); }; - // DHCPv6 Protocol Headers struct dhcpv6_header { uint8_t msg_type; @@ -223,7 +223,7 @@ struct odhcp6c_entry { }; -int init_dhcpv6(const char *ifname, int request_pd); +int init_dhcpv6(const char *ifname, int request_pd, 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); @@ -250,8 +250,8 @@ 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); -void odhcp6c_update_entry(enum odhcp6c_state state, struct odhcp6c_entry *new); -void 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); +bool odhcp6c_update_entry_safe(enum odhcp6c_state state, struct odhcp6c_entry *new, uint32_t safe); void odhcp6c_expire(void); uint32_t odhcp6c_elapsed(void);