diff options
author | Kaspar Schleiser <kaspar@schleiser.de> | 2014-01-23 16:39:43 +0100 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-01-27 14:16:44 +0100 |
commit | b146f9adc80cc2c2cdf2b04bfeec4c861a2a0e23 (patch) | |
tree | 270e8c1daa7cb09d8317e05d89a26051b0118354 /src/odhcp6c.h | |
parent | bbcc9cfa44372f58cb33d556d9b7c57f6ee96b61 (diff) | |
download | odhcp6c-b146f9adc80cc2c2cdf2b04bfeec4c861a2a0e23.tar.gz |
add support for multiple prefixes with distinct IAIDs
Changes from v1:
- removed some unneeded changes
- use *_add_state instead of (semantically identical and so unnecessary)
*_append_state
This is missing IAID validation for prefixes.
Contributed by T-Labs, Deutsche Telekom Innovation Laboratories
Diffstat (limited to 'src/odhcp6c.h')
-rw-r--r-- | src/odhcp6c.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/odhcp6c.h b/src/odhcp6c.h index 3f23e64..a8f4206 100644 --- a/src/odhcp6c.h +++ b/src/odhcp6c.h @@ -192,6 +192,7 @@ enum odhcp6c_state { STATE_SEARCH, STATE_IA_NA, STATE_IA_PD, + STATE_IA_PD_INIT, STATE_CUSTOM_OPTS, STATE_SNTP_IP, STATE_NTP_IP, @@ -236,10 +237,15 @@ struct odhcp6c_entry { uint32_t t1; uint32_t t2; uint16_t class; + uint32_t iaid; }; +struct odhcp6c_request_prefix { + uint32_t iaid; + uint16_t length; +}; -int init_dhcpv6(const char *ifname, int request_pd, bool strict_options, int sol_timeout); +int init_dhcpv6(const char *ifname, bool strict_options, 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); @@ -262,6 +268,7 @@ bool odhcp6c_is_bound(void); // State manipulation void odhcp6c_clear_state(enum odhcp6c_state state); void odhcp6c_add_state(enum odhcp6c_state state, const void *data, size_t len); +void odhcp6c_append_state(enum odhcp6c_state state, const void *data, size_t len); void odhcp6c_insert_state(enum odhcp6c_state state, size_t offset, const void *data, size_t len); size_t odhcp6c_remove_state(enum odhcp6c_state state, size_t offset, size_t len); void* odhcp6c_move_state(enum odhcp6c_state state, size_t *len); |