X-Git-Url: https://git.decadent.org.uk/gitweb/?p=odhcp6c.git;a=blobdiff_plain;f=src%2Fodhcp6c.h;h=5b9b78fd1faa200c73e9f6f8e4ca9dbf70158bdc;hp=669b33d4149172b8240b3c90aedc422e92e546c2;hb=24c064ccbf819f85c8709ea60acb3b278377b408;hpb=2037bd1f310239f1982f3bd2f541ba409ee16b6a diff --git a/src/odhcp6c.h b/src/odhcp6c.h index 669b33d..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; @@ -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);