/*
- * Copyright (c) 2011, 2013 Nicira, Inc.
+ * Copyright (c) 2011, 2013, 2014, 2015 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
extern const struct in6_addr in6addr_any;
+/* Ditto, for IPv6. */
+struct sockaddr_in6 {
+ sa_family_t sin6_family;
+ in_port_t sin6_port; /* Transport layer port # */
+ uint32_t sin6_flowinfo; /* IPv6 flow information */
+ struct in6_addr sin6_addr; /* IPv6 address */
+ uint32_t sin6_scope_id; /* IPv6 scope-id */
+};
+
#define IPPROTO_IP 0
+#define IPPROTO_IPV6 41
#define IPPROTO_HOPOPTS 0
#define IPPROTO_ICMP 1
+#define IPPROTO_IGMP 2
#define IPPROTO_TCP 6
#define IPPROTO_UDP 17
#define IPPROTO_ROUTING 43
#define IPPROTO_FRAGMENT 44
+#define IPPROTO_GRE 47
+#define IPPROTO_ESP 50
#define IPPROTO_AH 51
#define IPPROTO_ICMPV6 58
#define IPPROTO_NONE 59
#define INADDR_ANY 0x00000000
#define INADDR_BROADCAST 0xffffffff
+#define INADDR_LOOPBACK 0x7f000001
#define INADDR_NONE 0xffffffff
+#define IN6_IS_ADDR_V4MAPPED(X) \
+ ((X)->s6_addr[0] == 0 && \
+ (X)->s6_addr[1] == 0 && \
+ (X)->s6_addr[2] == 0 && \
+ (X)->s6_addr[3] == 0 && \
+ (X)->s6_addr[4] == 0 && \
+ (X)->s6_addr[5] == 0 && \
+ (X)->s6_addr[6] == 0 && \
+ (X)->s6_addr[7] == 0 && \
+ (X)->s6_addr[8] == 0 && \
+ (X)->s6_addr[9] == 0 && \
+ (X)->s6_addr[10] == 0xff && \
+ (X)->s6_addr[11] == 0xff)
+
#define INET6_ADDRSTRLEN 46
+#define IPV6_TCLASS 67
+
static inline ovs_be32 htonl(uint32_t x)
{
return (OVS_FORCE ovs_be32) x;