summaryrefslogtreecommitdiff
path: root/src/odhcp6c.h
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2013-10-23 12:04:38 +0000
committerSteven Barth <steven@midlink.org>2013-10-23 19:22:01 +0200
commitd77cbea57d1b7dd9c25421bb13c90e65bb54a6bc (patch)
tree2febdfc6997d785c8b233433f7d20d298f459f9a /src/odhcp6c.h
parent0c764d13ba834d6be53c4312007584613dec3a1e (diff)
downloadodhcp6c-d77cbea57d1b7dd9c25421bb13c90e65bb54a6bc.tar.gz
odhpc6c: status code support in reply
The patch implements support for status code handling in reply messages as described in RFC3313 paragraph 18.1.8. The client will *log the status codes returned by the client *send a request if no binding status code is returned for a given IA *send further renew/rebind if the IA was not present in the reply *terminate message exchange when no prefix/no address status code is returned in reponse to a request *terminate message exchange when unspec fail status code is returned *calculate t1/t2/t3 when all IA's have been processed and based on recorded t1/t2/valid timer values per IA Without this patch I have seen issues with request messages send without any IA_PD/IA_NA and t1/t2/t3 timer values which were not correct. These changes have been tested intensive against an ISC DHCPv6 server Signed-off-by: Hans Dedecker <hans.dedecker@gmail.com>
Diffstat (limited to 'src/odhcp6c.h')
-rw-r--r--src/odhcp6c.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/odhcp6c.h b/src/odhcp6c.h
index 5b9b78f..183ed44 100644
--- a/src/odhcp6c.h
+++ b/src/odhcp6c.h
@@ -81,8 +81,14 @@ enum dhcpv6_msg {
};
enum dhcpv6_status {
+ DHCPV6_Success = 0,
+ DHCPV6_UnspecFail = 1,
DHCPV6_NoAddrsAvail = 2,
+ DHCPV6_NoBinding = 3,
+ DHCPV6_NotOnLink = 4,
+ DHCPV6_UseMulticast = 5,
DHCPV6_NoPrefixAvail = 6,
+ _DHCPV6_Status_Max
};
typedef int(reply_handler)(enum dhcpv6_msg orig, const int rc,
@@ -219,6 +225,8 @@ struct odhcp6c_entry {
struct in6_addr target;
uint32_t valid;
uint32_t preferred;
+ uint32_t t1;
+ uint32_t t2;
uint16_t class;
};
@@ -240,6 +248,7 @@ 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);
+bool odhcp6c_is_bound(void);
// State manipulation
void odhcp6c_clear_state(enum odhcp6c_state state);