summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/dhcp6-protocol.h
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2014-06-19 15:39:23 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2014-06-19 15:44:44 +0300
commit34e8c5a23cd1c53ef3c1169388dabe1f6dfd7319 (patch)
tree742eb792c6d3e3e23551cb3a665edf8219c3d2d6 /src/libsystemd-network/dhcp6-protocol.h
parentf12ed3bf0b315fc88d5fbdf5bdca14b218c86e0c (diff)
sd-dhcp6-client: Add functions to bind to DHCPv6 UDP socket
Add a function that creates a UDP socket bound to the given interface and optionally to an IPv6 address. Add another function that will send the DHCPv6 UDP packet to its destination. Using IPV6_PKTINFO in setsockopt to bind the IPv6 socket to an interface is documented in section 4. of RFC 3542, "Advanced Sockets Application Program Interface (API) for IPv6" Add a define for DHCPv6 Relay Agents and Servers multicast address as its not available elsewhere.
Diffstat (limited to 'src/libsystemd-network/dhcp6-protocol.h')
-rw-r--r--src/libsystemd-network/dhcp6-protocol.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsystemd-network/dhcp6-protocol.h b/src/libsystemd-network/dhcp6-protocol.h
index 6ca72ec151..c58a07b176 100644
--- a/src/libsystemd-network/dhcp6-protocol.h
+++ b/src/libsystemd-network/dhcp6-protocol.h
@@ -36,6 +36,10 @@ struct DHCP6Message {
typedef struct DHCP6Message DHCP6Message;
+#define IN6ADDR_ALL_DHCP6_RELAY_AGENTS_AND_SERVERS_INIT \
+ { { { 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02 } } }
+
enum {
DHCP6_PORT_SERVER = 547,
DHCP6_PORT_CLIENT = 546,