chiark / gitweb /
sd-icmp6-nd: Add function to stop ongoing ICMPv6 discovery
[elogind.git] / src / libsystemd-network / dhcp6-protocol.h
index c58a07b17603f6a7cff1467e5258d1a830c9377b..8b3a81911e50e4a383b0ff223e12f30bb81a218f 100644 (file)
@@ -21,6 +21,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <netinet/ip6.h>
+#include <netinet/udp.h>
+
 #include "macro.h"
 #include "sparse-endian.h"
 
@@ -36,6 +39,9 @@ struct DHCP6Message {
 
 typedef struct DHCP6Message DHCP6Message;
 
+#define DHCP6_MIN_OPTIONS_SIZE \
+        1280 - sizeof(struct ip6_hdr) - sizeof(struct udphdr)
+
 #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 } } }
@@ -48,6 +54,9 @@ enum {
 #define DHCP6_SOL_MAX_DELAY                     1 * USEC_PER_SEC
 #define DHCP6_SOL_TIMEOUT                       1 * USEC_PER_SEC
 #define DHCP6_SOL_MAX_RT                        120 * USEC_PER_SEC
+#define DHCP6_REQ_TIMEOUT                       1 * USEC_PER_SEC
+#define DHCP6_REQ_MAX_RT                        120 * USEC_PER_SEC
+#define DHCP6_REQ_MAX_RC                        10
 
 enum {
         DHCP6_DUID_LLT                          = 1,
@@ -60,6 +69,8 @@ enum DHCP6State {
         DHCP6_STATE_STOPPED                     = 0,
         DHCP6_STATE_RS                          = 1,
         DHCP6_STATE_SOLICITATION                = 2,
+        DHCP6_STATE_REQUEST                     = 3,
+        DHCP6_STATE_BOUND                       = 4,
 };
 
 enum {