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:08 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2014-06-19 15:44:43 +0300
commitf12abb48fc510b8b349c05e35ba048134debaf25 (patch)
treeb272cc2b0174ec6790ca68721548b742921b12ca /src/libsystemd-network/dhcp6-internal.h
parentfc5414305d04799e0bdb6f8ca46ec70acd487f89 (diff)
sd-dhcp6-client: Add DHCPv6 IAID functionality
Create structures describing Identity Association IDentifiers and IPv6 lease addresses. [tomegun: initialize the IAID when client is started. Base this off of the predictable udev names, if available, as these satisfy the requirement of the IAID, and base it off the mac addres otherwise, as that is the best we have.]
Diffstat (limited to 'src/libsystemd-network/dhcp6-internal.h')
-rw-r--r--src/libsystemd-network/dhcp6-internal.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/libsystemd-network/dhcp6-internal.h b/src/libsystemd-network/dhcp6-internal.h
index 52283d7f6d..1cdb912548 100644
--- a/src/libsystemd-network/dhcp6-internal.h
+++ b/src/libsystemd-network/dhcp6-internal.h
@@ -22,6 +22,38 @@
***/
#include <net/ethernet.h>
+#include <netinet/in.h>
+
+#include "sparse-endian.h"
+#include "sd-event.h"
+#include "list.h"
+
+typedef struct DHCP6Address DHCP6Address;
+
+struct DHCP6Address {
+ LIST_FIELDS(DHCP6Address, addresses);
+
+ struct {
+ struct in6_addr address;
+ be32_t lifetime_preferred;
+ be32_t lifetime_valid;
+ } _packed_;
+};
+
+struct DHCP6IA {
+ uint16_t type;
+ struct {
+ be32_t id;
+ be32_t lifetime_t1;
+ be32_t lifetime_t2;
+ } _packed_;
+ sd_event_source *timeout_t1;
+ sd_event_source *timeout_t2;
+
+ LIST_HEAD(DHCP6Address, addresses);
+};
+
+typedef struct DHCP6IA DHCP6IA;
#define log_dhcp6_client(p, fmt, ...) log_meta(LOG_DEBUG, __FILE__, __LINE__, __func__, "DHCPv6 CLIENT: " fmt, ##__VA_ARGS__)