ipv6: use socket option consts from x/sys/unix on netbsd, openbsd and dragonfly

Use the socket option constants defined in the golang.org/x/sys/unix
package instead of duplicating them in this package.

Note that for now, sysIPV6_TCLASS, sysIPV6_PATHMTU, sysIPV6_PKTINFO,
sysIPV6_HOPLIMIT and sysIPV6_NEXTHOP still need to be defined because
they are used in code shared with other platforms.

Change-Id: I40896c6c191aade35e3f9f1fb1a624f772e7479a
Reviewed-on: https://go-review.googlesource.com/c/net/+/306071
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/ipv6/defs_dragonfly.go b/ipv6/defs_dragonfly.go
index 0cba5d4..76aa071 100644
--- a/ipv6/defs_dragonfly.go
+++ b/ipv6/defs_dragonfly.go
@@ -19,49 +19,11 @@
 import "C"
 
 const (
-	sysIPV6_UNICAST_HOPS   = C.IPV6_UNICAST_HOPS
-	sysIPV6_MULTICAST_IF   = C.IPV6_MULTICAST_IF
-	sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS
-	sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP
-	sysIPV6_JOIN_GROUP     = C.IPV6_JOIN_GROUP
-	sysIPV6_LEAVE_GROUP    = C.IPV6_LEAVE_GROUP
-	sysIPV6_PORTRANGE      = C.IPV6_PORTRANGE
-	sysICMP6_FILTER        = C.ICMP6_FILTER
-
-	sysIPV6_CHECKSUM = C.IPV6_CHECKSUM
-	sysIPV6_V6ONLY   = C.IPV6_V6ONLY
-
-	sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS
-	sysIPV6_RECVPKTINFO  = C.IPV6_RECVPKTINFO
-	sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT
-	sysIPV6_RECVRTHDR    = C.IPV6_RECVRTHDR
-	sysIPV6_RECVHOPOPTS  = C.IPV6_RECVHOPOPTS
-	sysIPV6_RECVDSTOPTS  = C.IPV6_RECVDSTOPTS
-
-	sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU
-	sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU
-
-	sysIPV6_PATHMTU = C.IPV6_PATHMTU
-
+	sysIPV6_PATHMTU  = C.IPV6_PATHMTU
 	sysIPV6_PKTINFO  = C.IPV6_PKTINFO
 	sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT
 	sysIPV6_NEXTHOP  = C.IPV6_NEXTHOP
-	sysIPV6_HOPOPTS  = C.IPV6_HOPOPTS
-	sysIPV6_DSTOPTS  = C.IPV6_DSTOPTS
-	sysIPV6_RTHDR    = C.IPV6_RTHDR
-
-	sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS
-
-	sysIPV6_AUTOFLOWLABEL = C.IPV6_AUTOFLOWLABEL
-
 	sysIPV6_TCLASS   = C.IPV6_TCLASS
-	sysIPV6_DONTFRAG = C.IPV6_DONTFRAG
-
-	sysIPV6_PREFER_TEMPADDR = C.IPV6_PREFER_TEMPADDR
-
-	sysIPV6_PORTRANGE_DEFAULT = C.IPV6_PORTRANGE_DEFAULT
-	sysIPV6_PORTRANGE_HIGH    = C.IPV6_PORTRANGE_HIGH
-	sysIPV6_PORTRANGE_LOW     = C.IPV6_PORTRANGE_LOW
 
 	sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
 	sizeofInet6Pktinfo  = C.sizeof_struct_in6_pktinfo
diff --git a/ipv6/defs_netbsd.go b/ipv6/defs_netbsd.go
index f760978..76aa071 100644
--- a/ipv6/defs_netbsd.go
+++ b/ipv6/defs_netbsd.go
@@ -19,47 +19,11 @@
 import "C"
 
 const (
-	sysIPV6_UNICAST_HOPS   = C.IPV6_UNICAST_HOPS
-	sysIPV6_MULTICAST_IF   = C.IPV6_MULTICAST_IF
-	sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS
-	sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP
-	sysIPV6_JOIN_GROUP     = C.IPV6_JOIN_GROUP
-	sysIPV6_LEAVE_GROUP    = C.IPV6_LEAVE_GROUP
-	sysIPV6_PORTRANGE      = C.IPV6_PORTRANGE
-	sysICMP6_FILTER        = C.ICMP6_FILTER
-
-	sysIPV6_CHECKSUM = C.IPV6_CHECKSUM
-	sysIPV6_V6ONLY   = C.IPV6_V6ONLY
-
-	sysIPV6_IPSEC_POLICY = C.IPV6_IPSEC_POLICY
-
-	sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS
-
-	sysIPV6_RECVPKTINFO  = C.IPV6_RECVPKTINFO
-	sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT
-	sysIPV6_RECVRTHDR    = C.IPV6_RECVRTHDR
-	sysIPV6_RECVHOPOPTS  = C.IPV6_RECVHOPOPTS
-	sysIPV6_RECVDSTOPTS  = C.IPV6_RECVDSTOPTS
-
-	sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU
-	sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU
-	sysIPV6_PATHMTU     = C.IPV6_PATHMTU
-
+	sysIPV6_PATHMTU  = C.IPV6_PATHMTU
 	sysIPV6_PKTINFO  = C.IPV6_PKTINFO
 	sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT
 	sysIPV6_NEXTHOP  = C.IPV6_NEXTHOP
-	sysIPV6_HOPOPTS  = C.IPV6_HOPOPTS
-	sysIPV6_DSTOPTS  = C.IPV6_DSTOPTS
-	sysIPV6_RTHDR    = C.IPV6_RTHDR
-
-	sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS
-
 	sysIPV6_TCLASS   = C.IPV6_TCLASS
-	sysIPV6_DONTFRAG = C.IPV6_DONTFRAG
-
-	sysIPV6_PORTRANGE_DEFAULT = C.IPV6_PORTRANGE_DEFAULT
-	sysIPV6_PORTRANGE_HIGH    = C.IPV6_PORTRANGE_HIGH
-	sysIPV6_PORTRANGE_LOW     = C.IPV6_PORTRANGE_LOW
 
 	sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
 	sizeofInet6Pktinfo  = C.sizeof_struct_in6_pktinfo
diff --git a/ipv6/defs_openbsd.go b/ipv6/defs_openbsd.go
index 70bed53..76aa071 100644
--- a/ipv6/defs_openbsd.go
+++ b/ipv6/defs_openbsd.go
@@ -19,56 +19,11 @@
 import "C"
 
 const (
-	sysIPV6_UNICAST_HOPS   = C.IPV6_UNICAST_HOPS
-	sysIPV6_MULTICAST_IF   = C.IPV6_MULTICAST_IF
-	sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS
-	sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP
-	sysIPV6_JOIN_GROUP     = C.IPV6_JOIN_GROUP
-	sysIPV6_LEAVE_GROUP    = C.IPV6_LEAVE_GROUP
-	sysIPV6_PORTRANGE      = C.IPV6_PORTRANGE
-	sysICMP6_FILTER        = C.ICMP6_FILTER
-
-	sysIPV6_CHECKSUM = C.IPV6_CHECKSUM
-	sysIPV6_V6ONLY   = C.IPV6_V6ONLY
-
-	sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS
-
-	sysIPV6_RECVPKTINFO  = C.IPV6_RECVPKTINFO
-	sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT
-	sysIPV6_RECVRTHDR    = C.IPV6_RECVRTHDR
-	sysIPV6_RECVHOPOPTS  = C.IPV6_RECVHOPOPTS
-	sysIPV6_RECVDSTOPTS  = C.IPV6_RECVDSTOPTS
-
-	sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU
-	sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU
-
-	sysIPV6_PATHMTU = C.IPV6_PATHMTU
-
+	sysIPV6_PATHMTU  = C.IPV6_PATHMTU
 	sysIPV6_PKTINFO  = C.IPV6_PKTINFO
 	sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT
 	sysIPV6_NEXTHOP  = C.IPV6_NEXTHOP
-	sysIPV6_HOPOPTS  = C.IPV6_HOPOPTS
-	sysIPV6_DSTOPTS  = C.IPV6_DSTOPTS
-	sysIPV6_RTHDR    = C.IPV6_RTHDR
-
-	sysIPV6_AUTH_LEVEL        = C.IPV6_AUTH_LEVEL
-	sysIPV6_ESP_TRANS_LEVEL   = C.IPV6_ESP_TRANS_LEVEL
-	sysIPV6_ESP_NETWORK_LEVEL = C.IPV6_ESP_NETWORK_LEVEL
-	sysIPSEC6_OUTSA           = C.IPSEC6_OUTSA
-	sysIPV6_RECVTCLASS        = C.IPV6_RECVTCLASS
-
-	sysIPV6_AUTOFLOWLABEL = C.IPV6_AUTOFLOWLABEL
-	sysIPV6_IPCOMP_LEVEL  = C.IPV6_IPCOMP_LEVEL
-
 	sysIPV6_TCLASS   = C.IPV6_TCLASS
-	sysIPV6_DONTFRAG = C.IPV6_DONTFRAG
-	sysIPV6_PIPEX    = C.IPV6_PIPEX
-
-	sysIPV6_RTABLE = C.IPV6_RTABLE
-
-	sysIPV6_PORTRANGE_DEFAULT = C.IPV6_PORTRANGE_DEFAULT
-	sysIPV6_PORTRANGE_HIGH    = C.IPV6_PORTRANGE_HIGH
-	sysIPV6_PORTRANGE_LOW     = C.IPV6_PORTRANGE_LOW
 
 	sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
 	sizeofInet6Pktinfo  = C.sizeof_struct_in6_pktinfo
diff --git a/ipv6/sys_bsd.go b/ipv6/sys_bsd.go
index 63e5ee2..bde41a6 100644
--- a/ipv6/sys_bsd.go
+++ b/ipv6/sys_bsd.go
@@ -13,32 +13,34 @@
 
 	"golang.org/x/net/internal/iana"
 	"golang.org/x/net/internal/socket"
+
+	"golang.org/x/sys/unix"
 )
 
 var (
 	ctlOpts = [ctlMax]ctlOpt{
-		ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
-		ctlHopLimit:     {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
-		ctlPacketInfo:   {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
-		ctlNextHop:      {sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop},
-		ctlPathMTU:      {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
+		ctlTrafficClass: {unix.IPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
+		ctlHopLimit:     {unix.IPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
+		ctlPacketInfo:   {unix.IPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
+		ctlNextHop:      {unix.IPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop},
+		ctlPathMTU:      {unix.IPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
 	}
 
 	sockOpts = map[int]*sockOpt{
-		ssoTrafficClass:        {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}},
-		ssoHopLimit:            {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}},
-		ssoMulticastInterface:  {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}},
-		ssoMulticastHopLimit:   {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}},
-		ssoMulticastLoopback:   {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}},
-		ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}},
-		ssoReceiveHopLimit:     {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}},
-		ssoReceivePacketInfo:   {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}},
-		ssoReceivePathMTU:      {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}},
-		ssoPathMTU:             {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
-		ssoChecksum:            {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}},
-		ssoICMPFilter:          {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}},
-		ssoJoinGroup:           {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
-		ssoLeaveGroup:          {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
+		ssoTrafficClass:        {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_TCLASS, Len: 4}},
+		ssoHopLimit:            {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_UNICAST_HOPS, Len: 4}},
+		ssoMulticastInterface:  {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_IF, Len: 4}},
+		ssoMulticastHopLimit:   {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_HOPS, Len: 4}},
+		ssoMulticastLoopback:   {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_LOOP, Len: 4}},
+		ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVTCLASS, Len: 4}},
+		ssoReceiveHopLimit:     {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVHOPLIMIT, Len: 4}},
+		ssoReceivePacketInfo:   {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPKTINFO, Len: 4}},
+		ssoReceivePathMTU:      {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPATHMTU, Len: 4}},
+		ssoPathMTU:             {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
+		ssoChecksum:            {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_CHECKSUM, Len: 4}},
+		ssoICMPFilter:          {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: unix.ICMP6_FILTER, Len: sizeofICMPv6Filter}},
+		ssoJoinGroup:           {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
+		ssoLeaveGroup:          {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
 	}
 )
 
diff --git a/ipv6/zsys_dragonfly.go b/ipv6/zsys_dragonfly.go
index cf3cc10..512db65 100644
--- a/ipv6/zsys_dragonfly.go
+++ b/ipv6/zsys_dragonfly.go
@@ -4,51 +4,11 @@
 package ipv6
 
 const (
-	sysIPV6_UNICAST_HOPS   = 0x4
-	sysIPV6_MULTICAST_IF   = 0x9
-	sysIPV6_MULTICAST_HOPS = 0xa
-	sysIPV6_MULTICAST_LOOP = 0xb
-	sysIPV6_JOIN_GROUP     = 0xc
-	sysIPV6_LEAVE_GROUP    = 0xd
-	sysIPV6_PORTRANGE      = 0xe
-	sysICMP6_FILTER        = 0x12
-
-	sysIPV6_CHECKSUM = 0x1a
-	sysIPV6_V6ONLY   = 0x1b
-
-	sysIPV6_IPSEC_POLICY = 0x1c
-
-	sysIPV6_RTHDRDSTOPTS = 0x23
-	sysIPV6_RECVPKTINFO  = 0x24
-	sysIPV6_RECVHOPLIMIT = 0x25
-	sysIPV6_RECVRTHDR    = 0x26
-	sysIPV6_RECVHOPOPTS  = 0x27
-	sysIPV6_RECVDSTOPTS  = 0x28
-
-	sysIPV6_USE_MIN_MTU = 0x2a
-	sysIPV6_RECVPATHMTU = 0x2b
-
-	sysIPV6_PATHMTU = 0x2c
-
+	sysIPV6_PATHMTU  = 0x2c
 	sysIPV6_PKTINFO  = 0x2e
 	sysIPV6_HOPLIMIT = 0x2f
 	sysIPV6_NEXTHOP  = 0x30
-	sysIPV6_HOPOPTS  = 0x31
-	sysIPV6_DSTOPTS  = 0x32
-	sysIPV6_RTHDR    = 0x33
-
-	sysIPV6_RECVTCLASS = 0x39
-
-	sysIPV6_AUTOFLOWLABEL = 0x3b
-
 	sysIPV6_TCLASS   = 0x3d
-	sysIPV6_DONTFRAG = 0x3e
-
-	sysIPV6_PREFER_TEMPADDR = 0x3f
-
-	sysIPV6_PORTRANGE_DEFAULT = 0x0
-	sysIPV6_PORTRANGE_HIGH    = 0x1
-	sysIPV6_PORTRANGE_LOW     = 0x2
 
 	sizeofSockaddrInet6 = 0x1c
 	sizeofInet6Pktinfo  = 0x14
diff --git a/ipv6/zsys_netbsd.go b/ipv6/zsys_netbsd.go
index e39571e..524c97f 100644
--- a/ipv6/zsys_netbsd.go
+++ b/ipv6/zsys_netbsd.go
@@ -4,47 +4,11 @@
 package ipv6
 
 const (
-	sysIPV6_UNICAST_HOPS   = 0x4
-	sysIPV6_MULTICAST_IF   = 0x9
-	sysIPV6_MULTICAST_HOPS = 0xa
-	sysIPV6_MULTICAST_LOOP = 0xb
-	sysIPV6_JOIN_GROUP     = 0xc
-	sysIPV6_LEAVE_GROUP    = 0xd
-	sysIPV6_PORTRANGE      = 0xe
-	sysICMP6_FILTER        = 0x12
-
-	sysIPV6_CHECKSUM = 0x1a
-	sysIPV6_V6ONLY   = 0x1b
-
-	sysIPV6_IPSEC_POLICY = 0x1c
-
-	sysIPV6_RTHDRDSTOPTS = 0x23
-
-	sysIPV6_RECVPKTINFO  = 0x24
-	sysIPV6_RECVHOPLIMIT = 0x25
-	sysIPV6_RECVRTHDR    = 0x26
-	sysIPV6_RECVHOPOPTS  = 0x27
-	sysIPV6_RECVDSTOPTS  = 0x28
-
-	sysIPV6_USE_MIN_MTU = 0x2a
-	sysIPV6_RECVPATHMTU = 0x2b
-	sysIPV6_PATHMTU     = 0x2c
-
+	sysIPV6_PATHMTU  = 0x2c
 	sysIPV6_PKTINFO  = 0x2e
 	sysIPV6_HOPLIMIT = 0x2f
 	sysIPV6_NEXTHOP  = 0x30
-	sysIPV6_HOPOPTS  = 0x31
-	sysIPV6_DSTOPTS  = 0x32
-	sysIPV6_RTHDR    = 0x33
-
-	sysIPV6_RECVTCLASS = 0x39
-
 	sysIPV6_TCLASS   = 0x3d
-	sysIPV6_DONTFRAG = 0x3e
-
-	sysIPV6_PORTRANGE_DEFAULT = 0x0
-	sysIPV6_PORTRANGE_HIGH    = 0x1
-	sysIPV6_PORTRANGE_LOW     = 0x2
 
 	sizeofSockaddrInet6 = 0x1c
 	sizeofInet6Pktinfo  = 0x14
diff --git a/ipv6/zsys_openbsd.go b/ipv6/zsys_openbsd.go
index cc1899a..5e7bded 100644
--- a/ipv6/zsys_openbsd.go
+++ b/ipv6/zsys_openbsd.go
@@ -4,56 +4,11 @@
 package ipv6
 
 const (
-	sysIPV6_UNICAST_HOPS   = 0x4
-	sysIPV6_MULTICAST_IF   = 0x9
-	sysIPV6_MULTICAST_HOPS = 0xa
-	sysIPV6_MULTICAST_LOOP = 0xb
-	sysIPV6_JOIN_GROUP     = 0xc
-	sysIPV6_LEAVE_GROUP    = 0xd
-	sysIPV6_PORTRANGE      = 0xe
-	sysICMP6_FILTER        = 0x12
-
-	sysIPV6_CHECKSUM = 0x1a
-	sysIPV6_V6ONLY   = 0x1b
-
-	sysIPV6_RTHDRDSTOPTS = 0x23
-
-	sysIPV6_RECVPKTINFO  = 0x24
-	sysIPV6_RECVHOPLIMIT = 0x25
-	sysIPV6_RECVRTHDR    = 0x26
-	sysIPV6_RECVHOPOPTS  = 0x27
-	sysIPV6_RECVDSTOPTS  = 0x28
-
-	sysIPV6_USE_MIN_MTU = 0x2a
-	sysIPV6_RECVPATHMTU = 0x2b
-
-	sysIPV6_PATHMTU = 0x2c
-
+	sysIPV6_PATHMTU  = 0x2c
 	sysIPV6_PKTINFO  = 0x2e
 	sysIPV6_HOPLIMIT = 0x2f
 	sysIPV6_NEXTHOP  = 0x30
-	sysIPV6_HOPOPTS  = 0x31
-	sysIPV6_DSTOPTS  = 0x32
-	sysIPV6_RTHDR    = 0x33
-
-	sysIPV6_AUTH_LEVEL        = 0x35
-	sysIPV6_ESP_TRANS_LEVEL   = 0x36
-	sysIPV6_ESP_NETWORK_LEVEL = 0x37
-	sysIPSEC6_OUTSA           = 0x38
-	sysIPV6_RECVTCLASS        = 0x39
-
-	sysIPV6_AUTOFLOWLABEL = 0x3b
-	sysIPV6_IPCOMP_LEVEL  = 0x3c
-
 	sysIPV6_TCLASS   = 0x3d
-	sysIPV6_DONTFRAG = 0x3e
-	sysIPV6_PIPEX    = 0x3f
-
-	sysIPV6_RTABLE = 0x1021
-
-	sysIPV6_PORTRANGE_DEFAULT = 0x0
-	sysIPV6_PORTRANGE_HIGH    = 0x1
-	sysIPV6_PORTRANGE_LOW     = 0x2
 
 	sizeofSockaddrInet6 = 0x1c
 	sizeofInet6Pktinfo  = 0x14