summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/dhcp6-internal.h
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2014-06-19 15:39:20 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2014-06-19 15:44:43 +0300
commitf12ed3bf0b315fc88d5fbdf5bdca14b218c86e0c (patch)
tree0199a8e65a8c285052dca77d0349394ae85523d1 /src/libsystemd-network/dhcp6-internal.h
parentd1b0afe3653b4316a6361d204169620726d468a0 (diff)
sd-dhcp6-client: Add basic DHCPv6 option handling
Add option appending and parsing. DHCPv6 options are not aligned, thus the option handling code must be able to handle options starting at any byte boundary. Add a test case for the basic option handling.
Diffstat (limited to 'src/libsystemd-network/dhcp6-internal.h')
-rw-r--r--src/libsystemd-network/dhcp6-internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsystemd-network/dhcp6-internal.h b/src/libsystemd-network/dhcp6-internal.h
index 1cdb912548..30b624d54c 100644
--- a/src/libsystemd-network/dhcp6-internal.h
+++ b/src/libsystemd-network/dhcp6-internal.h
@@ -59,3 +59,9 @@ typedef struct DHCP6IA DHCP6IA;
int dhcp_network_icmp6_bind_router_solicitation(int index);
int dhcp_network_icmp6_send_router_solicitation(int s, const struct ether_addr *ether_addr);
+
+int dhcp6_option_append(uint8_t **buf, size_t *buflen, uint16_t code,
+ size_t optlen, const void *optval);
+int dhcp6_option_append_ia(uint8_t **buf, size_t *buflen, DHCP6IA *ia);
+int dhcp6_option_parse(uint8_t **buf, size_t *buflen, uint16_t *optcode,
+ size_t *optlen, uint8_t **optvalue);