vendor: Update golang.org/x/net/ipv6

This commit is contained in:
Jakob Borg 2017-03-04 07:28:11 +01:00
parent 566c348b00
commit 7260629bc0
81 changed files with 1296 additions and 820 deletions

View File

@ -18,6 +18,9 @@ func TestBPF(t *testing.T) {
if runtime.GOOS != "linux" {
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {
t.Skip("ipv6 is not supported")
}
l, err := net.ListenPacket("udp6", "[::1]:0")
if err != nil {

View File

@ -20,9 +20,9 @@ func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error {
if err != nil {
return err
}
prog := sysSockFProg{
prog := sockFProg{
Len: uint16(len(filter)),
Filter: (*sysSockFilter)(unsafe.Pointer(&filter[0])),
Filter: (*sockFilter)(unsafe.Pointer(&filter[0])),
}
return os.NewSyscallError("setsockopt", setsockopt(s, sysSOL_SOCKET, sysSO_ATTACH_FILTER, unsafe.Pointer(&prog), uint32(unsafe.Sizeof(prog))))
}

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -11,7 +11,7 @@ import (
)
// Note that RFC 3542 obsoletes RFC 2292 but OS X Snow Leopard and the
// former still support RFC 2292 only. Please be aware that almost
// former still support RFC 2292 only. Please be aware that almost
// all protocol implementations prohibit using a combination of RFC
// 2292 and RFC 3542 for some practical reasons.

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -29,9 +29,9 @@ func marshal2292PacketInfo(b []byte, cm *ControlMessage) []byte {
m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
m.Level = iana.ProtocolIPv6
m.Type = sysIPV6_2292PKTINFO
m.SetLen(syscall.CmsgLen(sysSizeofInet6Pktinfo))
m.SetLen(syscall.CmsgLen(sizeofInet6Pktinfo))
if cm != nil {
pi := (*sysInet6Pktinfo)(unsafe.Pointer(&b[syscall.CmsgLen(0)]))
pi := (*inet6Pktinfo)(unsafe.Pointer(&b[syscall.CmsgLen(0)]))
if ip := cm.Src.To16(); ip != nil && ip.To4() == nil {
copy(pi.Addr[:], ip)
}
@ -39,17 +39,17 @@ func marshal2292PacketInfo(b []byte, cm *ControlMessage) []byte {
pi.setIfindex(cm.IfIndex)
}
}
return b[syscall.CmsgSpace(sysSizeofInet6Pktinfo):]
return b[syscall.CmsgSpace(sizeofInet6Pktinfo):]
}
func marshal2292NextHop(b []byte, cm *ControlMessage) []byte {
m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
m.Level = iana.ProtocolIPv6
m.Type = sysIPV6_2292NEXTHOP
m.SetLen(syscall.CmsgLen(sysSizeofSockaddrInet6))
m.SetLen(syscall.CmsgLen(sizeofSockaddrInet6))
if cm != nil {
sa := (*sysSockaddrInet6)(unsafe.Pointer(&b[syscall.CmsgLen(0)]))
sa := (*sockaddrInet6)(unsafe.Pointer(&b[syscall.CmsgLen(0)]))
sa.setSockaddr(cm.NextHop, cm.IfIndex)
}
return b[syscall.CmsgSpace(sysSizeofSockaddrInet6):]
return b[syscall.CmsgSpace(sizeofSockaddrInet6):]
}

View File

@ -1,8 +1,8 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
package ipv6
@ -49,9 +49,9 @@ func marshalPacketInfo(b []byte, cm *ControlMessage) []byte {
m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
m.Level = iana.ProtocolIPv6
m.Type = sysIPV6_PKTINFO
m.SetLen(syscall.CmsgLen(sysSizeofInet6Pktinfo))
m.SetLen(syscall.CmsgLen(sizeofInet6Pktinfo))
if cm != nil {
pi := (*sysInet6Pktinfo)(unsafe.Pointer(&b[syscall.CmsgLen(0)]))
pi := (*inet6Pktinfo)(unsafe.Pointer(&b[syscall.CmsgLen(0)]))
if ip := cm.Src.To16(); ip != nil && ip.To4() == nil {
copy(pi.Addr[:], ip)
}
@ -59,11 +59,11 @@ func marshalPacketInfo(b []byte, cm *ControlMessage) []byte {
pi.setIfindex(cm.IfIndex)
}
}
return b[syscall.CmsgSpace(sysSizeofInet6Pktinfo):]
return b[syscall.CmsgSpace(sizeofInet6Pktinfo):]
}
func parsePacketInfo(cm *ControlMessage, b []byte) {
pi := (*sysInet6Pktinfo)(unsafe.Pointer(&b[0]))
pi := (*inet6Pktinfo)(unsafe.Pointer(&b[0]))
cm.Dst = pi.Addr[:]
cm.IfIndex = int(pi.Ifindex)
}
@ -72,12 +72,12 @@ func marshalNextHop(b []byte, cm *ControlMessage) []byte {
m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
m.Level = iana.ProtocolIPv6
m.Type = sysIPV6_NEXTHOP
m.SetLen(syscall.CmsgLen(sysSizeofSockaddrInet6))
m.SetLen(syscall.CmsgLen(sizeofSockaddrInet6))
if cm != nil {
sa := (*sysSockaddrInet6)(unsafe.Pointer(&b[syscall.CmsgLen(0)]))
sa := (*sockaddrInet6)(unsafe.Pointer(&b[syscall.CmsgLen(0)]))
sa.setSockaddr(cm.NextHop, cm.IfIndex)
}
return b[syscall.CmsgSpace(sysSizeofSockaddrInet6):]
return b[syscall.CmsgSpace(sizeofSockaddrInet6):]
}
func parseNextHop(cm *ControlMessage, b []byte) {
@ -87,12 +87,12 @@ func marshalPathMTU(b []byte, cm *ControlMessage) []byte {
m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
m.Level = iana.ProtocolIPv6
m.Type = sysIPV6_PATHMTU
m.SetLen(syscall.CmsgLen(sysSizeofIPv6Mtuinfo))
return b[syscall.CmsgSpace(sysSizeofIPv6Mtuinfo):]
m.SetLen(syscall.CmsgLen(sizeofIPv6Mtuinfo))
return b[syscall.CmsgSpace(sizeofIPv6Mtuinfo):]
}
func parsePathMTU(cm *ControlMessage, b []byte) {
mi := (*sysIPv6Mtuinfo)(unsafe.Pointer(&b[0]))
mi := (*ipv6Mtuinfo)(unsafe.Pointer(&b[0]))
cm.Dst = mi.Addr.Addr[:]
cm.IfIndex = int(mi.Addr.Scope_id)
cm.MTU = int(mi.Mtu)

View File

@ -1,8 +1,8 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build nacl plan9 solaris
// +build nacl plan9
package ipv6

View File

@ -1,8 +1,8 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
package ipv6
@ -76,19 +76,6 @@ func newControlMessage(opt *rawOpt) (oob []byte) {
}
if l > 0 {
oob = make([]byte, l)
b := oob
if opt.isset(FlagTrafficClass) && ctlOpts[ctlTrafficClass].name > 0 {
b = ctlOpts[ctlTrafficClass].marshal(b, nil)
}
if opt.isset(FlagHopLimit) && ctlOpts[ctlHopLimit].name > 0 {
b = ctlOpts[ctlHopLimit].marshal(b, nil)
}
if opt.isset(flagPacketInfo) && ctlOpts[ctlPacketInfo].name > 0 {
b = ctlOpts[ctlPacketInfo].marshal(b, nil)
}
if opt.isset(FlagPathMTU) && ctlOpts[ctlPathMTU].name > 0 {
b = ctlOpts[ctlPathMTU].marshal(b, nil)
}
}
opt.RUnlock()
return

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@ -83,30 +83,30 @@ const (
sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH
sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW
sysSizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
sysSizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sysSizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
sysSizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
sysSizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
sysSizeofGroupReq = C.sizeof_struct_group_req
sysSizeofGroupSourceReq = C.sizeof_struct_group_source_req
sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
sizeofGroupReq = C.sizeof_struct_group_req
sizeofGroupSourceReq = C.sizeof_struct_group_source_req
sysSizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
)
type sysSockaddrStorage C.struct_sockaddr_storage
type sockaddrStorage C.struct_sockaddr_storage
type sysSockaddrInet6 C.struct_sockaddr_in6
type sockaddrInet6 C.struct_sockaddr_in6
type sysInet6Pktinfo C.struct_in6_pktinfo
type inet6Pktinfo C.struct_in6_pktinfo
type sysIPv6Mtuinfo C.struct_ip6_mtuinfo
type ipv6Mtuinfo C.struct_ip6_mtuinfo
type sysIPv6Mreq C.struct_ipv6_mreq
type ipv6Mreq C.struct_ipv6_mreq
type sysICMPv6Filter C.struct_icmp6_filter
type icmpv6Filter C.struct_icmp6_filter
type sysGroupReq C.struct_group_req
type groupReq C.struct_group_req
type sysGroupSourceReq C.struct_group_source_req
type groupSourceReq C.struct_group_source_req

View File

@ -64,21 +64,21 @@ const (
sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH
sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW
sysSizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sysSizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
sysSizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
sysSizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
sysSizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
)
type sysSockaddrInet6 C.struct_sockaddr_in6
type sockaddrInet6 C.struct_sockaddr_in6
type sysInet6Pktinfo C.struct_in6_pktinfo
type inet6Pktinfo C.struct_in6_pktinfo
type sysIPv6Mtuinfo C.struct_ip6_mtuinfo
type ipv6Mtuinfo C.struct_ip6_mtuinfo
type sysIPv6Mreq C.struct_ipv6_mreq
type ipv6Mreq C.struct_ipv6_mreq
type sysICMPv6Filter C.struct_icmp6_filter
type icmpv6Filter C.struct_icmp6_filter

View File

@ -76,30 +76,30 @@ const (
sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH
sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW
sysSizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
sysSizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sysSizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
sysSizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
sysSizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
sysSizeofGroupReq = C.sizeof_struct_group_req
sysSizeofGroupSourceReq = C.sizeof_struct_group_source_req
sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
sizeofGroupReq = C.sizeof_struct_group_req
sizeofGroupSourceReq = C.sizeof_struct_group_source_req
sysSizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
)
type sysSockaddrStorage C.struct_sockaddr_storage
type sockaddrStorage C.struct_sockaddr_storage
type sysSockaddrInet6 C.struct_sockaddr_in6
type sockaddrInet6 C.struct_sockaddr_in6
type sysInet6Pktinfo C.struct_in6_pktinfo
type inet6Pktinfo C.struct_in6_pktinfo
type sysIPv6Mtuinfo C.struct_ip6_mtuinfo
type ipv6Mtuinfo C.struct_ip6_mtuinfo
type sysIPv6Mreq C.struct_ipv6_mreq
type ipv6Mreq C.struct_ipv6_mreq
type sysGroupReq C.struct_group_req
type groupReq C.struct_group_req
type sysGroupSourceReq C.struct_group_source_req
type groupSourceReq C.struct_group_source_req
type sysICMPv6Filter C.struct_icmp6_filter
type icmpv6Filter C.struct_icmp6_filter

View File

@ -109,37 +109,37 @@ const (
sysSOL_SOCKET = C.SOL_SOCKET
sysSO_ATTACH_FILTER = C.SO_ATTACH_FILTER
sysSizeofKernelSockaddrStorage = C.sizeof_struct___kernel_sockaddr_storage
sysSizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sysSizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
sysSizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
sysSizeofIPv6FlowlabelReq = C.sizeof_struct_in6_flowlabel_req
sizeofKernelSockaddrStorage = C.sizeof_struct___kernel_sockaddr_storage
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
sizeofIPv6FlowlabelReq = C.sizeof_struct_in6_flowlabel_req
sysSizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
sysSizeofGroupReq = C.sizeof_struct_group_req
sysSizeofGroupSourceReq = C.sizeof_struct_group_source_req
sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
sizeofGroupReq = C.sizeof_struct_group_req
sizeofGroupSourceReq = C.sizeof_struct_group_source_req
sysSizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
)
type sysKernelSockaddrStorage C.struct___kernel_sockaddr_storage
type kernelSockaddrStorage C.struct___kernel_sockaddr_storage
type sysSockaddrInet6 C.struct_sockaddr_in6
type sockaddrInet6 C.struct_sockaddr_in6
type sysInet6Pktinfo C.struct_in6_pktinfo
type inet6Pktinfo C.struct_in6_pktinfo
type sysIPv6Mtuinfo C.struct_ip6_mtuinfo
type ipv6Mtuinfo C.struct_ip6_mtuinfo
type sysIPv6FlowlabelReq C.struct_in6_flowlabel_req
type ipv6FlowlabelReq C.struct_in6_flowlabel_req
type sysIPv6Mreq C.struct_ipv6_mreq
type ipv6Mreq C.struct_ipv6_mreq
type sysGroupReq C.struct_group_req
type groupReq C.struct_group_req
type sysGroupSourceReq C.struct_group_source_req
type groupSourceReq C.struct_group_source_req
type sysICMPv6Filter C.struct_icmp6_filter
type icmpv6Filter C.struct_icmp6_filter
type sysSockFProg C.struct_sock_fprog
type sockFProg C.struct_sock_fprog
type sysSockFilter C.struct_sock_filter
type sockFilter C.struct_sock_filter

View File

@ -60,21 +60,21 @@ const (
sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH
sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW
sysSizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sysSizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
sysSizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
sysSizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
sysSizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
)
type sysSockaddrInet6 C.struct_sockaddr_in6
type sockaddrInet6 C.struct_sockaddr_in6
type sysInet6Pktinfo C.struct_in6_pktinfo
type inet6Pktinfo C.struct_in6_pktinfo
type sysIPv6Mtuinfo C.struct_ip6_mtuinfo
type ipv6Mtuinfo C.struct_ip6_mtuinfo
type sysIPv6Mreq C.struct_ipv6_mreq
type ipv6Mreq C.struct_ipv6_mreq
type sysICMPv6Filter C.struct_icmp6_filter
type icmpv6Filter C.struct_icmp6_filter

View File

@ -69,21 +69,21 @@ const (
sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH
sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW
sysSizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sysSizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
sysSizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
sysSizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
sysSizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
)
type sysSockaddrInet6 C.struct_sockaddr_in6
type sockaddrInet6 C.struct_sockaddr_in6
type sysInet6Pktinfo C.struct_in6_pktinfo
type inet6Pktinfo C.struct_in6_pktinfo
type sysIPv6Mtuinfo C.struct_ip6_mtuinfo
type ipv6Mtuinfo C.struct_ip6_mtuinfo
type sysIPv6Mreq C.struct_ipv6_mreq
type ipv6Mreq C.struct_ipv6_mreq
type sysICMPv6Filter C.struct_icmp6_filter
type icmpv6Filter C.struct_icmp6_filter

View File

@ -9,6 +9,8 @@
package ipv6
/*
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/icmp6.h>
*/
@ -53,6 +55,13 @@ const (
sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS
sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP
sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP
sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE
sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE
sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP
sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP
sysIPV6_PREFER_SRC_HOME = C.IPV6_PREFER_SRC_HOME
sysIPV6_PREFER_SRC_COA = C.IPV6_PREFER_SRC_COA
sysIPV6_PREFER_SRC_PUBLIC = C.IPV6_PREFER_SRC_PUBLIC
@ -76,21 +85,30 @@ const (
sysICMP6_FILTER = C.ICMP6_FILTER
sysSizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sysSizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
sysSizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo
sysSizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
sizeofGroupReq = C.sizeof_struct_group_req
sizeofGroupSourceReq = C.sizeof_struct_group_source_req
sysSizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
)
type sysSockaddrInet6 C.struct_sockaddr_in6
type sockaddrStorage C.struct_sockaddr_storage
type sysInet6Pktinfo C.struct_in6_pktinfo
type sockaddrInet6 C.struct_sockaddr_in6
type sysIPv6Mtuinfo C.struct_ip6_mtuinfo
type inet6Pktinfo C.struct_in6_pktinfo
type sysIPv6Mreq C.struct_ipv6_mreq
type ipv6Mtuinfo C.struct_ip6_mtuinfo
type sysICMPv6Filter C.struct_icmp6_filter
type ipv6Mreq C.struct_ipv6_mreq
type groupReq C.struct_group_req
type groupSourceReq C.struct_group_source_req
type icmpv6Filter C.struct_icmp6_filter

View File

@ -1,8 +1,8 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd windows
// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
package ipv6
@ -227,7 +227,7 @@ func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source
}
// Checksum reports whether the kernel will compute, store or verify a
// checksum for both incoming and outgoing packets. If on is true, it
// checksum for both incoming and outgoing packets. If on is true, it
// returns an offset in bytes into the data of where the checksum
// field is located.
func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
@ -248,7 +248,7 @@ func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
return true, offset, nil
}
// SetChecksum enables the kernel checksum processing. If on is ture,
// SetChecksum enables the kernel checksum processing. If on is ture,
// the offset should be an offset in bytes into the data of where the
// checksum field is located.
func (c *dgramOpt) SetChecksum(on bool, offset int) error {

View File

@ -1,8 +1,8 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build nacl plan9 solaris
// +build nacl plan9
package ipv6
@ -94,14 +94,14 @@ func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source
}
// Checksum reports whether the kernel will compute, store or verify a
// checksum for both incoming and outgoing packets. If on is true, it
// checksum for both incoming and outgoing packets. If on is true, it
// returns an offset in bytes into the data of where the checksum
// field is located.
func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
return false, 0, errOpNoSupport
}
// SetChecksum enables the kernel checksum processing. If on is ture,
// SetChecksum enables the kernel checksum processing. If on is ture,
// the offset should be an offset in bytes into the data of where the
// checksum field is located.
func (c *dgramOpt) SetChecksum(on bool, offset int) error {

33
vendor/golang.org/x/net/ipv6/doc.go generated vendored
View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -9,22 +9,23 @@
// manipulation of IPv6 facilities.
//
// The IPv6 protocol is defined in RFC 2460.
// Basic and advanced socket interface extensions are defined in RFC
// 3493 and RFC 3542.
// Socket interface extensions for multicast source filters are
// defined in RFC 3678.
// Socket interface extensions are defined in RFC 3493, RFC 3542 and
// RFC 3678.
// MLDv1 and MLDv2 are defined in RFC 2710 and RFC 3810.
// Source-specific multicast is defined in RFC 4607.
//
// On Darwin, this package requires OS X Mavericks version 10.9 or
// above, or equivalent.
//
//
// Unicasting
//
// The options for unicasting are available for net.TCPConn,
// net.UDPConn and net.IPConn which are created as network connections
// that use the IPv6 transport. When a single TCP connection carrying
// that use the IPv6 transport. When a single TCP connection carrying
// a data flow of multiple packets needs to indicate the flow is
// important, ipv6.Conn is used to set the traffic class field on the
// IPv6 header for each packet.
// important, Conn is used to set the traffic class field on the IPv6
// header for each packet.
//
// ln, err := net.Listen("tcp6", "[::]:1024")
// if err != nil {
@ -56,7 +57,7 @@
//
// The options for multicasting are available for net.UDPConn and
// net.IPconn which are created as network connections that use the
// IPv6 transport. A few network facilities must be prepared before
// IPv6 transport. A few network facilities must be prepared before
// you begin multicasting, at a minimum joining network interfaces and
// multicast groups.
//
@ -80,7 +81,7 @@
// defer c.Close()
//
// Second, the application joins multicast groups, starts listening to
// the groups on the specified network interfaces. Note that the
// the groups on the specified network interfaces. Note that the
// service port for transport layer protocol does not matter with this
// operation as joining groups affects only network and link layer
// protocols, such as IPv6 and Ethernet.
@ -94,10 +95,10 @@
// }
//
// The application might set per packet control message transmissions
// between the protocol stack within the kernel. When the application
// between the protocol stack within the kernel. When the application
// needs a destination address on an incoming packet,
// SetControlMessage of ipv6.PacketConn is used to enable control
// message transmissons.
// SetControlMessage of PacketConn is used to enable control message
// transmissions.
//
// if err := p.SetControlMessage(ipv6.FlagDst, true); err != nil {
// // error handling
@ -143,7 +144,7 @@
// More multicasting
//
// An application that uses PacketConn may join multiple multicast
// groups. For example, a UDP listener with port 1024 might join two
// groups. For example, a UDP listener with port 1024 might join two
// different groups across over two different network interfaces by
// using:
//
@ -164,7 +165,7 @@
// }
//
// It is possible for multiple UDP listeners that listen on the same
// UDP port to join the same multicast group. The net package will
// UDP port to join the same multicast group. The net package will
// provide a socket that listens to a wildcard address with reusable
// UDP port when an appropriate multicast address prefix is passed to
// the net.ListenPacket or net.ListenUDP.
@ -238,3 +239,5 @@
// In the fallback case, ExcludeSourceSpecificGroup and
// IncludeSourceSpecificGroup may return an error.
package ipv6 // import "golang.org/x/net/ipv6"
// BUG(mikio): This package is not implemented on NaCl and Plan 9.

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -12,6 +12,11 @@ import (
"golang.org/x/net/internal/netreflect"
)
// BUG(mikio): On Windows, the JoinSourceSpecificGroup,
// LeaveSourceSpecificGroup, ExcludeSourceSpecificGroup and
// IncludeSourceSpecificGroup methods of PacketConn are not
// implemented.
// A Conn represents a network endpoint that uses IPv6 transport.
// It allows to set basic IP-level socket options such as traffic
// class and hop limit.
@ -50,8 +55,8 @@ func NewConn(c net.Conn) *Conn {
}
// A PacketConn represents a packet network endpoint that uses IPv6
// transport. It is used to control several IP-level socket options
// including IPv6 header manipulation. It also provides datagram
// transport. It is used to control several IP-level socket options
// including IPv6 header manipulation. It also provides datagram
// based network I/O methods specific to the IPv6 and higher layer
// protocols such as OSPF, GRE, and UDP.
type PacketConn struct {

11
vendor/golang.org/x/net/ipv6/gen.go generated vendored
View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -52,15 +52,6 @@ func genzsys() error {
if err != nil {
return err
}
// The ipv6 package still supports go1.2, and so we need to
// take care of additional platforms in go1.3 and above for
// working with go1.2.
switch {
case runtime.GOOS == "dragonfly" || runtime.GOOS == "solaris":
b = bytes.Replace(b, []byte("package ipv6\n"), []byte("// +build "+runtime.GOOS+"\n\npackage ipv6\n"), 1)
case runtime.GOOS == "linux" && (runtime.GOARCH == "arm64" || runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" || runtime.GOARCH == "ppc" || runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le" || runtime.GOARCH == "s390x"):
b = bytes.Replace(b, []byte("package ipv6\n"), []byte("// +build "+runtime.GOOS+","+runtime.GOARCH+"\n\npackage ipv6\n"), 1)
}
b, err = format.Source(b)
if err != nil {
return err

View File

@ -1,8 +1,8 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd windows
// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
package ipv6

View File

@ -1,8 +1,8 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build nacl plan9 solaris
// +build nacl plan9
package ipv6

11
vendor/golang.org/x/net/ipv6/go19_test.go generated vendored Normal file
View File

@ -0,0 +1,11 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.9
package ipv6
func init() {
disableTests = true
}

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -6,6 +6,9 @@ package ipv6
import "golang.org/x/net/internal/iana"
// BUG(mikio): On Windows, methods related to ICMPFilter are not
// implemented.
// An ICMPType represents a type of ICMP message.
type ICMPType int
@ -31,7 +34,7 @@ func (typ ICMPType) Protocol() int {
// packets not explicitly addressed to itself, and a host means a node
// that is not a router.
type ICMPFilter struct {
sysICMPv6Filter
icmpv6Filter
}
// Accept accepts incoming ICMP packets including the type field value

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -6,15 +6,15 @@
package ipv6
func (f *sysICMPv6Filter) accept(typ ICMPType) {
func (f *icmpv6Filter) accept(typ ICMPType) {
f.Filt[typ>>5] |= 1 << (uint32(typ) & 31)
}
func (f *sysICMPv6Filter) block(typ ICMPType) {
func (f *icmpv6Filter) block(typ ICMPType) {
f.Filt[typ>>5] &^= 1 << (uint32(typ) & 31)
}
func (f *sysICMPv6Filter) setAll(block bool) {
func (f *icmpv6Filter) setAll(block bool) {
for i := range f.Filt {
if block {
f.Filt[i] = 0
@ -24,6 +24,6 @@ func (f *sysICMPv6Filter) setAll(block bool) {
}
}
func (f *sysICMPv6Filter) willBlock(typ ICMPType) bool {
func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
return f.Filt[typ>>5]&(1<<(uint32(typ)&31)) == 0
}

View File

@ -1,18 +1,18 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv6
func (f *sysICMPv6Filter) accept(typ ICMPType) {
func (f *icmpv6Filter) accept(typ ICMPType) {
f.Data[typ>>5] &^= 1 << (uint32(typ) & 31)
}
func (f *sysICMPv6Filter) block(typ ICMPType) {
func (f *icmpv6Filter) block(typ ICMPType) {
f.Data[typ>>5] |= 1 << (uint32(typ) & 31)
}
func (f *sysICMPv6Filter) setAll(block bool) {
func (f *icmpv6Filter) setAll(block bool) {
for i := range f.Data {
if block {
f.Data[i] = 1<<32 - 1
@ -22,6 +22,6 @@ func (f *sysICMPv6Filter) setAll(block bool) {
}
}
func (f *sysICMPv6Filter) willBlock(typ ICMPType) bool {
func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
return f.Data[typ>>5]&(1<<(uint32(typ)&31)) != 0
}

View File

@ -1,24 +1,27 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build solaris
package ipv6
func (f *sysICMPv6Filter) accept(typ ICMPType) {
// TODO(mikio): implement this
func (f *icmpv6Filter) accept(typ ICMPType) {
f.X__icmp6_filt[typ>>5] |= 1 << (uint32(typ) & 31)
}
func (f *sysICMPv6Filter) block(typ ICMPType) {
// TODO(mikio): implement this
func (f *icmpv6Filter) block(typ ICMPType) {
f.X__icmp6_filt[typ>>5] &^= 1 << (uint32(typ) & 31)
}
func (f *sysICMPv6Filter) setAll(block bool) {
// TODO(mikio): implement this
func (f *icmpv6Filter) setAll(block bool) {
for i := range f.X__icmp6_filt {
if block {
f.X__icmp6_filt[i] = 0
} else {
f.X__icmp6_filt[i] = 1<<32 - 1
}
}
}
func (f *sysICMPv6Filter) willBlock(typ ICMPType) bool {
// TODO(mikio): implement this
return false
func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
return f.X__icmp6_filt[typ>>5]&(1<<(uint32(typ)&31)) == 0
}

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -6,18 +6,18 @@
package ipv6
type sysICMPv6Filter struct {
type icmpv6Filter struct {
}
func (f *sysICMPv6Filter) accept(typ ICMPType) {
func (f *icmpv6Filter) accept(typ ICMPType) {
}
func (f *sysICMPv6Filter) block(typ ICMPType) {
func (f *icmpv6Filter) block(typ ICMPType) {
}
func (f *sysICMPv6Filter) setAll(block bool) {
func (f *icmpv6Filter) setAll(block bool) {
}
func (f *sysICMPv6Filter) willBlock(typ ICMPType) bool {
func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
return false
}

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -34,7 +34,7 @@ func TestICMPString(t *testing.T) {
func TestICMPFilter(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
@ -61,7 +61,7 @@ func TestICMPFilter(t *testing.T) {
func TestSetICMPFilter(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {

View File

@ -1,22 +1,22 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv6
func (f *sysICMPv6Filter) accept(typ ICMPType) {
func (f *icmpv6Filter) accept(typ ICMPType) {
// TODO(mikio): implement this
}
func (f *sysICMPv6Filter) block(typ ICMPType) {
func (f *icmpv6Filter) block(typ ICMPType) {
// TODO(mikio): implement this
}
func (f *sysICMPv6Filter) setAll(block bool) {
func (f *icmpv6Filter) setAll(block bool) {
// TODO(mikio): implement this
}
func (f *sysICMPv6Filter) willBlock(typ ICMPType) bool {
func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
// TODO(mikio): implement this
return false
}

22
vendor/golang.org/x/net/ipv6/ipv6_test.go generated vendored Normal file
View File

@ -0,0 +1,22 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv6
import (
"fmt"
"os"
"testing"
)
var disableTests = false
func TestMain(m *testing.M) {
if disableTests {
fmt.Fprintf(os.Stderr, "ipv6 tests disabled in Go 1.9 until netreflect is fixed (Issue 19051)\n")
os.Exit(0)
}
// call flag.Parse() here if TestMain uses flags
os.Exit(m.Run())
}

View File

@ -1,27 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv6_test
import (
"flag"
"fmt"
"os"
"os/exec"
"runtime"
"strings"
"testing"
)
func TestMain(m *testing.M) {
flag.Parse()
if runtime.GOOS == "darwin" {
vers, _ := exec.Command("sw_vers", "-productVersion").Output()
if string(vers) == "10.8" || strings.HasPrefix(string(vers), "10.8.") {
fmt.Fprintf(os.Stderr, "# skipping tests on OS X 10.8 to avoid kernel panics; golang.org/issue/17015\n")
os.Exit(0)
}
}
os.Exit(m.Run())
}

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -29,15 +29,15 @@ var packetConnReadWriteMulticastUDPTests = []struct {
func TestPacketConnReadWriteMulticastUDP(t *testing.T) {
switch runtime.GOOS {
case "freebsd": // due to a bug on loopback marking
// See http://www.freebsd.org/cgi/query-pr.cgi?pr=180065.
t.Skipf("not supported on %s", runtime.GOOS)
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {
t.Skip("ipv6 is not supported")
}
if !nettest.SupportsIPv6MulticastDeliveryOnLoopback() {
t.Skipf("multicast delivery doesn't work correctly on %s", runtime.GOOS)
}
ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagMulticast|net.FlagLoopback)
if ifi == nil {
t.Skipf("not available on %s", runtime.GOOS)
@ -129,15 +129,15 @@ var packetConnReadWriteMulticastICMPTests = []struct {
func TestPacketConnReadWriteMulticastICMP(t *testing.T) {
switch runtime.GOOS {
case "freebsd": // due to a bug on loopback marking
// See http://www.freebsd.org/cgi/query-pr.cgi?pr=180065.
t.Skipf("not supported on %s", runtime.GOOS)
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {
t.Skip("ipv6 is not supported")
}
if !nettest.SupportsIPv6MulticastDeliveryOnLoopback() {
t.Skipf("multicast delivery doesn't work correctly on %s", runtime.GOOS)
}
if m, ok := nettest.SupportsRawIPSocket(); !ok {
t.Skip(m)
}
@ -205,7 +205,11 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) {
if toggle {
psh = nil
if err := p.SetChecksum(true, 2); err != nil {
t.Fatal(err)
// Solaris never allows to
// modify ICMP properties.
if runtime.GOOS != "solaris" {
t.Fatal(err)
}
}
} else {
psh = pshicmp

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -22,7 +22,7 @@ var udpMultipleGroupListenerTests = []net.Addr{
func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {
@ -62,7 +62,7 @@ func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) {
func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {
@ -114,7 +114,7 @@ func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) {
func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {
@ -157,7 +157,7 @@ func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
func TestIPSinglePacketConnWithSingleGroupListener(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {
@ -201,7 +201,7 @@ func TestIPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
switch runtime.GOOS {
case "darwin", "dragonfly", "openbsd": // platforms that return fe80::1%lo0: bind: can't assign requested address
t.Skipf("not supported on %s", runtime.GOOS)
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -26,7 +26,7 @@ var packetConnMulticastSocketOptionTests = []struct {
func TestPacketConnMulticastSocketOptions(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -6,6 +6,9 @@ package ipv6
import "net"
// BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo
// methods of PacketConn is not implemented.
// A payloadHandler represents the IPv6 datagram payload handler.
type payloadHandler struct {
net.PacketConn

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -12,7 +12,7 @@ import (
)
// ReadFrom reads a payload of the received IPv6 datagram, from the
// endpoint c, copying the payload into b. It returns the number of
// endpoint c, copying the payload into b. It returns the number of
// bytes copied into b, the control message cm and the source address
// src of the received datagram.
func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
@ -43,9 +43,9 @@ func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.
}
// WriteTo writes a payload of the IPv6 datagram, to the destination
// address dst through the endpoint c, copying the payload from b. It
// returns the number of bytes written. The control message cm allows
// the IPv6 header fields and the datagram path to be specified. The
// address dst through the endpoint c, copying the payload from b. It
// returns the number of bytes written. The control message cm allows
// the IPv6 header fields and the datagram path to be specified. The
// cm may be nil if control of the outgoing datagram is not required.
func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
if !c.ok() {

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -12,7 +12,7 @@ import (
)
// ReadFrom reads a payload of the received IPv6 datagram, from the
// endpoint c, copying the payload into b. It returns the number of
// endpoint c, copying the payload into b. It returns the number of
// bytes copied into b, the control message cm and the source address
// src of the received datagram.
func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
@ -26,9 +26,9 @@ func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.
}
// WriteTo writes a payload of the IPv6 datagram, to the destination
// address dst through the endpoint c, copying the payload from b. It
// returns the number of bytes written. The control message cm allows
// the IPv6 header fields and the datagram path to be specified. The
// address dst through the endpoint c, copying the payload from b. It
// returns the number of bytes written. The control message cm allows
// the IPv6 header fields and the datagram path to be specified. The
// cm may be nil if control of the outgoing datagram is not required.
func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
if !c.ok() {

View File

@ -102,7 +102,7 @@ func benchmarkReadWriteIPv6UDP(b *testing.B, p *ipv6.PacketConn, wb, rb []byte,
func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {

View File

@ -1,8 +1,8 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd windows
// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
package ipv6
@ -13,10 +13,10 @@ import (
)
func setsockoptIPMreq(s uintptr, opt *sockOpt, ifi *net.Interface, grp net.IP) error {
var mreq sysIPv6Mreq
var mreq ipv6Mreq
copy(mreq.Multiaddr[:], grp)
if ifi != nil {
mreq.setIfindex(ifi.Index)
}
return os.NewSyscallError("setsockopt", setsockopt(s, opt.level, opt.name, unsafe.Pointer(&mreq), sysSizeofIPv6Mreq))
return os.NewSyscallError("setsockopt", setsockopt(s, opt.level, opt.name, unsafe.Pointer(&mreq), sizeofIPv6Mreq))
}

View File

@ -1,8 +1,8 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd windows
// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
package ipv6
@ -67,8 +67,8 @@ func getICMPFilter(s uintptr, opt *sockOpt) (*ICMPFilter, error) {
return nil, errOpNoSupport
}
var f ICMPFilter
l := uint32(sysSizeofICMPv6Filter)
if err := getsockopt(s, opt.level, opt.name, unsafe.Pointer(&f.sysICMPv6Filter), &l); err != nil {
l := uint32(sizeofICMPv6Filter)
if err := getsockopt(s, opt.level, opt.name, unsafe.Pointer(&f.icmpv6Filter), &l); err != nil {
return nil, os.NewSyscallError("getsockopt", err)
}
return &f, nil
@ -78,15 +78,15 @@ func setICMPFilter(s uintptr, opt *sockOpt, f *ICMPFilter) error {
if opt.name < 1 || opt.typ != ssoTypeICMPFilter {
return errOpNoSupport
}
return os.NewSyscallError("setsockopt", setsockopt(s, opt.level, opt.name, unsafe.Pointer(&f.sysICMPv6Filter), sysSizeofICMPv6Filter))
return os.NewSyscallError("setsockopt", setsockopt(s, opt.level, opt.name, unsafe.Pointer(&f.icmpv6Filter), sizeofICMPv6Filter))
}
func getMTUInfo(s uintptr, opt *sockOpt) (*net.Interface, int, error) {
if opt.name < 1 || opt.typ != ssoTypeMTUInfo {
return nil, 0, errOpNoSupport
}
var mi sysIPv6Mtuinfo
l := uint32(sysSizeofIPv6Mtuinfo)
var mi ipv6Mtuinfo
l := uint32(sizeofIPv6Mtuinfo)
if err := getsockopt(s, opt.level, opt.name, unsafe.Pointer(&mi), &l); err != nil {
return nil, 0, os.NewSyscallError("getsockopt", err)
}

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !darwin,!freebsd,!linux
// +build !darwin,!freebsd,!linux,!solaris
package ipv6

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin freebsd linux
// +build darwin freebsd linux solaris
package ipv6
@ -15,7 +15,7 @@ import (
var freebsd32o64 bool
func setsockoptGroupReq(s uintptr, opt *sockOpt, ifi *net.Interface, grp net.IP) error {
var gr sysGroupReq
var gr groupReq
if ifi != nil {
gr.Interface = uint32(ifi.Index)
}
@ -23,21 +23,21 @@ func setsockoptGroupReq(s uintptr, opt *sockOpt, ifi *net.Interface, grp net.IP)
var p unsafe.Pointer
var l uint32
if freebsd32o64 {
var d [sysSizeofGroupReq + 4]byte
s := (*[sysSizeofGroupReq]byte)(unsafe.Pointer(&gr))
var d [sizeofGroupReq + 4]byte
s := (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))
copy(d[:4], s[:4])
copy(d[8:], s[4:])
p = unsafe.Pointer(&d[0])
l = sysSizeofGroupReq + 4
l = sizeofGroupReq + 4
} else {
p = unsafe.Pointer(&gr)
l = sysSizeofGroupReq
l = sizeofGroupReq
}
return os.NewSyscallError("setsockopt", setsockopt(s, opt.level, opt.name, p, l))
}
func setsockoptGroupSourceReq(s uintptr, opt *sockOpt, ifi *net.Interface, grp, src net.IP) error {
var gsr sysGroupSourceReq
var gsr groupSourceReq
if ifi != nil {
gsr.Interface = uint32(ifi.Index)
}
@ -45,15 +45,15 @@ func setsockoptGroupSourceReq(s uintptr, opt *sockOpt, ifi *net.Interface, grp,
var p unsafe.Pointer
var l uint32
if freebsd32o64 {
var d [sysSizeofGroupSourceReq + 4]byte
s := (*[sysSizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))
var d [sizeofGroupSourceReq + 4]byte
s := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))
copy(d[:4], s[:4])
copy(d[8:], s[4:])
p = unsafe.Pointer(&d[0])
l = sysSizeofGroupSourceReq + 4
l = sizeofGroupSourceReq + 4
} else {
p = unsafe.Pointer(&gsr)
l = sysSizeofGroupSourceReq
l = sizeofGroupSourceReq
}
return os.NewSyscallError("setsockopt", setsockopt(s, opt.level, opt.name, p, l))
}

View File

@ -1,8 +1,8 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build nacl plan9 solaris
// +build nacl plan9
package ipv6

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -19,7 +19,7 @@ var supportsIPv6 bool = nettest.SupportsIPv6()
func TestConnInitiatorPathMTU(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {
@ -57,7 +57,7 @@ func TestConnInitiatorPathMTU(t *testing.T) {
func TestConnResponderPathMTU(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {
@ -95,7 +95,7 @@ func TestConnResponderPathMTU(t *testing.T) {
func TestPacketConnChecksum(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -17,9 +17,9 @@ var (
ctlOpts = [ctlMax]ctlOpt{
ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
ctlPacketInfo: {sysIPV6_PKTINFO, sysSizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
ctlNextHop: {sysIPV6_NEXTHOP, sysSizeofSockaddrInet6, marshalNextHop, parseNextHop},
ctlPathMTU: {sysIPV6_PATHMTU, sysSizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
ctlNextHop: {sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop},
ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
}
sockOpts = [ssoMax]sockOpt{
@ -40,17 +40,17 @@ var (
}
)
func (sa *sysSockaddrInet6) setSockaddr(ip net.IP, i int) {
sa.Len = sysSizeofSockaddrInet6
func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
sa.Len = sizeofSockaddrInet6
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], ip)
sa.Scope_id = uint32(i)
}
func (pi *sysInet6Pktinfo) setIfindex(i int) {
func (pi *inet6Pktinfo) setIfindex(i int) {
pi.Ifindex = uint32(i)
}
func (mreq *sysIPv6Mreq) setIfindex(i int) {
func (mreq *ipv6Mreq) setIfindex(i int) {
mreq.Interface = uint32(i)
}

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -6,6 +6,8 @@ package ipv6
import (
"net"
"strconv"
"strings"
"syscall"
"unsafe"
@ -15,7 +17,7 @@ import (
var (
ctlOpts = [ctlMax]ctlOpt{
ctlHopLimit: {sysIPV6_2292HOPLIMIT, 4, marshal2292HopLimit, parseHopLimit},
ctlPacketInfo: {sysIPV6_2292PKTINFO, sysSizeofInet6Pktinfo, marshal2292PacketInfo, parsePacketInfo},
ctlPacketInfo: {sysIPV6_2292PKTINFO, sizeofInet6Pktinfo, marshal2292PacketInfo, parsePacketInfo},
}
sockOpts = [ssoMax]sockOpt{
@ -35,99 +37,69 @@ var (
func init() {
// Seems like kern.osreldate is veiled on latest OS X. We use
// kern.osrelease instead.
osver, err := syscall.Sysctl("kern.osrelease")
s, err := syscall.Sysctl("kern.osrelease")
if err != nil {
return
}
var i int
for i = range osver {
if osver[i] == '.' {
break
}
ss := strings.Split(s, ".")
if len(ss) == 0 {
return
}
// The IP_PKTINFO and protocol-independent multicast API were
// introduced in OS X 10.7 (Darwin 11.0.0). But it looks like
// those features require OS X 10.8 (Darwin 12.0.0) and above.
// introduced in OS X 10.7 (Darwin 11). But it looks like
// those features require OS X 10.8 (Darwin 12) or above.
// See http://support.apple.com/kb/HT1633.
if i > 2 || i == 2 && osver[0] >= '1' && osver[1] >= '2' {
ctlOpts[ctlTrafficClass].name = sysIPV6_TCLASS
ctlOpts[ctlTrafficClass].length = 4
ctlOpts[ctlTrafficClass].marshal = marshalTrafficClass
ctlOpts[ctlTrafficClass].parse = parseTrafficClass
ctlOpts[ctlHopLimit].name = sysIPV6_HOPLIMIT
ctlOpts[ctlHopLimit].marshal = marshalHopLimit
ctlOpts[ctlPacketInfo].name = sysIPV6_PKTINFO
ctlOpts[ctlPacketInfo].marshal = marshalPacketInfo
ctlOpts[ctlNextHop].name = sysIPV6_NEXTHOP
ctlOpts[ctlNextHop].length = sysSizeofSockaddrInet6
ctlOpts[ctlNextHop].marshal = marshalNextHop
ctlOpts[ctlNextHop].parse = parseNextHop
ctlOpts[ctlPathMTU].name = sysIPV6_PATHMTU
ctlOpts[ctlPathMTU].length = sysSizeofIPv6Mtuinfo
ctlOpts[ctlPathMTU].marshal = marshalPathMTU
ctlOpts[ctlPathMTU].parse = parsePathMTU
sockOpts[ssoTrafficClass].level = iana.ProtocolIPv6
sockOpts[ssoTrafficClass].name = sysIPV6_TCLASS
sockOpts[ssoTrafficClass].typ = ssoTypeInt
sockOpts[ssoReceiveTrafficClass].level = iana.ProtocolIPv6
sockOpts[ssoReceiveTrafficClass].name = sysIPV6_RECVTCLASS
sockOpts[ssoReceiveTrafficClass].typ = ssoTypeInt
sockOpts[ssoReceiveHopLimit].name = sysIPV6_RECVHOPLIMIT
sockOpts[ssoReceivePacketInfo].name = sysIPV6_RECVPKTINFO
sockOpts[ssoReceivePathMTU].level = iana.ProtocolIPv6
sockOpts[ssoReceivePathMTU].name = sysIPV6_RECVPATHMTU
sockOpts[ssoReceivePathMTU].typ = ssoTypeInt
sockOpts[ssoPathMTU].level = iana.ProtocolIPv6
sockOpts[ssoPathMTU].name = sysIPV6_PATHMTU
sockOpts[ssoPathMTU].typ = ssoTypeMTUInfo
sockOpts[ssoJoinGroup].name = sysMCAST_JOIN_GROUP
sockOpts[ssoJoinGroup].typ = ssoTypeGroupReq
sockOpts[ssoLeaveGroup].name = sysMCAST_LEAVE_GROUP
sockOpts[ssoLeaveGroup].typ = ssoTypeGroupReq
sockOpts[ssoJoinSourceGroup].level = iana.ProtocolIPv6
sockOpts[ssoJoinSourceGroup].name = sysMCAST_JOIN_SOURCE_GROUP
sockOpts[ssoJoinSourceGroup].typ = ssoTypeGroupSourceReq
sockOpts[ssoLeaveSourceGroup].level = iana.ProtocolIPv6
sockOpts[ssoLeaveSourceGroup].name = sysMCAST_LEAVE_SOURCE_GROUP
sockOpts[ssoLeaveSourceGroup].typ = ssoTypeGroupSourceReq
sockOpts[ssoBlockSourceGroup].level = iana.ProtocolIPv6
sockOpts[ssoBlockSourceGroup].name = sysMCAST_BLOCK_SOURCE
sockOpts[ssoBlockSourceGroup].typ = ssoTypeGroupSourceReq
sockOpts[ssoUnblockSourceGroup].level = iana.ProtocolIPv6
sockOpts[ssoUnblockSourceGroup].name = sysMCAST_UNBLOCK_SOURCE
sockOpts[ssoUnblockSourceGroup].typ = ssoTypeGroupSourceReq
if mjver, err := strconv.Atoi(ss[0]); err != nil || mjver < 12 {
return
}
ctlOpts[ctlTrafficClass] = ctlOpt{sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass}
ctlOpts[ctlHopLimit] = ctlOpt{sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit}
ctlOpts[ctlPacketInfo] = ctlOpt{sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo}
ctlOpts[ctlNextHop] = ctlOpt{sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop}
ctlOpts[ctlPathMTU] = ctlOpt{sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU}
sockOpts[ssoTrafficClass] = sockOpt{iana.ProtocolIPv6, sysIPV6_TCLASS, ssoTypeInt}
sockOpts[ssoReceiveTrafficClass] = sockOpt{iana.ProtocolIPv6, sysIPV6_RECVTCLASS, ssoTypeInt}
sockOpts[ssoReceiveHopLimit] = sockOpt{iana.ProtocolIPv6, sysIPV6_RECVHOPLIMIT, ssoTypeInt}
sockOpts[ssoReceivePacketInfo] = sockOpt{iana.ProtocolIPv6, sysIPV6_RECVPKTINFO, ssoTypeInt}
sockOpts[ssoReceivePathMTU] = sockOpt{iana.ProtocolIPv6, sysIPV6_RECVPATHMTU, ssoTypeInt}
sockOpts[ssoPathMTU] = sockOpt{iana.ProtocolIPv6, sysIPV6_PATHMTU, ssoTypeMTUInfo}
sockOpts[ssoJoinGroup] = sockOpt{iana.ProtocolIPv6, sysMCAST_JOIN_GROUP, ssoTypeGroupReq}
sockOpts[ssoLeaveGroup] = sockOpt{iana.ProtocolIPv6, sysMCAST_LEAVE_GROUP, ssoTypeGroupReq}
sockOpts[ssoJoinSourceGroup] = sockOpt{iana.ProtocolIPv6, sysMCAST_JOIN_SOURCE_GROUP, ssoTypeGroupSourceReq}
sockOpts[ssoLeaveSourceGroup] = sockOpt{iana.ProtocolIPv6, sysMCAST_LEAVE_SOURCE_GROUP, ssoTypeGroupSourceReq}
sockOpts[ssoBlockSourceGroup] = sockOpt{iana.ProtocolIPv6, sysMCAST_BLOCK_SOURCE, ssoTypeGroupSourceReq}
sockOpts[ssoUnblockSourceGroup] = sockOpt{iana.ProtocolIPv6, sysMCAST_UNBLOCK_SOURCE, ssoTypeGroupSourceReq}
}
func (sa *sysSockaddrInet6) setSockaddr(ip net.IP, i int) {
sa.Len = sysSizeofSockaddrInet6
func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
sa.Len = sizeofSockaddrInet6
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], ip)
sa.Scope_id = uint32(i)
}
func (pi *sysInet6Pktinfo) setIfindex(i int) {
func (pi *inet6Pktinfo) setIfindex(i int) {
pi.Ifindex = uint32(i)
}
func (mreq *sysIPv6Mreq) setIfindex(i int) {
func (mreq *ipv6Mreq) setIfindex(i int) {
mreq.Interface = uint32(i)
}
func (gr *sysGroupReq) setGroup(grp net.IP) {
sa := (*sysSockaddrInet6)(unsafe.Pointer(&gr.Pad_cgo_0[0]))
sa.Len = sysSizeofSockaddrInet6
func (gr *groupReq) setGroup(grp net.IP) {
sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4))
sa.Len = sizeofSockaddrInet6
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], grp)
}
func (gsr *sysGroupSourceReq) setSourceGroup(grp, src net.IP) {
sa := (*sysSockaddrInet6)(unsafe.Pointer(&gsr.Pad_cgo_0[0]))
sa.Len = sysSizeofSockaddrInet6
func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4))
sa.Len = sizeofSockaddrInet6
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], grp)
sa = (*sysSockaddrInet6)(unsafe.Pointer(&gsr.Pad_cgo_1[0]))
sa.Len = sysSizeofSockaddrInet6
sa = (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 132))
sa.Len = sizeofSockaddrInet6
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], src)
}

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -18,9 +18,9 @@ var (
ctlOpts = [ctlMax]ctlOpt{
ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
ctlPacketInfo: {sysIPV6_PKTINFO, sysSizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
ctlNextHop: {sysIPV6_NEXTHOP, sysSizeofSockaddrInet6, marshalNextHop, parseNextHop},
ctlPathMTU: {sysIPV6_PATHMTU, sysSizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
ctlNextHop: {sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop},
ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
}
sockOpts = [ssoMax]sockOpt{
@ -57,35 +57,35 @@ func init() {
}
}
func (sa *sysSockaddrInet6) setSockaddr(ip net.IP, i int) {
sa.Len = sysSizeofSockaddrInet6
func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
sa.Len = sizeofSockaddrInet6
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], ip)
sa.Scope_id = uint32(i)
}
func (pi *sysInet6Pktinfo) setIfindex(i int) {
func (pi *inet6Pktinfo) setIfindex(i int) {
pi.Ifindex = uint32(i)
}
func (mreq *sysIPv6Mreq) setIfindex(i int) {
func (mreq *ipv6Mreq) setIfindex(i int) {
mreq.Interface = uint32(i)
}
func (gr *sysGroupReq) setGroup(grp net.IP) {
sa := (*sysSockaddrInet6)(unsafe.Pointer(&gr.Group))
sa.Len = sysSizeofSockaddrInet6
func (gr *groupReq) setGroup(grp net.IP) {
sa := (*sockaddrInet6)(unsafe.Pointer(&gr.Group))
sa.Len = sizeofSockaddrInet6
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], grp)
}
func (gsr *sysGroupSourceReq) setSourceGroup(grp, src net.IP) {
sa := (*sysSockaddrInet6)(unsafe.Pointer(&gsr.Group))
sa.Len = sysSizeofSockaddrInet6
func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
sa := (*sockaddrInet6)(unsafe.Pointer(&gsr.Group))
sa.Len = sizeofSockaddrInet6
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], grp)
sa = (*sysSockaddrInet6)(unsafe.Pointer(&gsr.Source))
sa.Len = sysSizeofSockaddrInet6
sa = (*sockaddrInet6)(unsafe.Pointer(&gsr.Source))
sa.Len = sizeofSockaddrInet6
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], src)
}

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -16,8 +16,8 @@ var (
ctlOpts = [ctlMax]ctlOpt{
ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
ctlPacketInfo: {sysIPV6_PKTINFO, sysSizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
ctlPathMTU: {sysIPV6_PATHMTU, sysSizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
}
sockOpts = [ssoMax]sockOpt{
@ -42,31 +42,31 @@ var (
}
)
func (sa *sysSockaddrInet6) setSockaddr(ip net.IP, i int) {
func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], ip)
sa.Scope_id = uint32(i)
}
func (pi *sysInet6Pktinfo) setIfindex(i int) {
func (pi *inet6Pktinfo) setIfindex(i int) {
pi.Ifindex = int32(i)
}
func (mreq *sysIPv6Mreq) setIfindex(i int) {
func (mreq *ipv6Mreq) setIfindex(i int) {
mreq.Ifindex = int32(i)
}
func (gr *sysGroupReq) setGroup(grp net.IP) {
sa := (*sysSockaddrInet6)(unsafe.Pointer(&gr.Group))
func (gr *groupReq) setGroup(grp net.IP) {
sa := (*sockaddrInet6)(unsafe.Pointer(&gr.Group))
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], grp)
}
func (gsr *sysGroupSourceReq) setSourceGroup(grp, src net.IP) {
sa := (*sysSockaddrInet6)(unsafe.Pointer(&gsr.Group))
func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
sa := (*sockaddrInet6)(unsafe.Pointer(&gsr.Group))
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], grp)
sa = (*sysSockaddrInet6)(unsafe.Pointer(&gsr.Source))
sa = (*sockaddrInet6)(unsafe.Pointer(&gsr.Source))
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], src)
}

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.2
#include "textflag.h"
TEXT ·socketcall(SB),4,$0-36
TEXT ·socketcall(SB),NOSPLIT,$0-36
JMP syscall·socketcall(SB)

73
vendor/golang.org/x/net/ipv6/sys_solaris.go generated vendored Normal file
View File

@ -0,0 +1,73 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv6
import (
"net"
"syscall"
"unsafe"
"golang.org/x/net/internal/iana"
)
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},
}
sockOpts = [ssoMax]sockOpt{
ssoTrafficClass: {iana.ProtocolIPv6, sysIPV6_TCLASS, ssoTypeInt},
ssoHopLimit: {iana.ProtocolIPv6, sysIPV6_UNICAST_HOPS, ssoTypeInt},
ssoMulticastInterface: {iana.ProtocolIPv6, sysIPV6_MULTICAST_IF, ssoTypeInterface},
ssoMulticastHopLimit: {iana.ProtocolIPv6, sysIPV6_MULTICAST_HOPS, ssoTypeInt},
ssoMulticastLoopback: {iana.ProtocolIPv6, sysIPV6_MULTICAST_LOOP, ssoTypeInt},
ssoReceiveTrafficClass: {iana.ProtocolIPv6, sysIPV6_RECVTCLASS, ssoTypeInt},
ssoReceiveHopLimit: {iana.ProtocolIPv6, sysIPV6_RECVHOPLIMIT, ssoTypeInt},
ssoReceivePacketInfo: {iana.ProtocolIPv6, sysIPV6_RECVPKTINFO, ssoTypeInt},
ssoReceivePathMTU: {iana.ProtocolIPv6, sysIPV6_RECVPATHMTU, ssoTypeInt},
ssoPathMTU: {iana.ProtocolIPv6, sysIPV6_PATHMTU, ssoTypeMTUInfo},
ssoChecksum: {iana.ProtocolIPv6, sysIPV6_CHECKSUM, ssoTypeInt},
ssoICMPFilter: {iana.ProtocolIPv6ICMP, sysICMP6_FILTER, ssoTypeICMPFilter},
ssoJoinGroup: {iana.ProtocolIPv6, sysMCAST_JOIN_GROUP, ssoTypeGroupReq},
ssoLeaveGroup: {iana.ProtocolIPv6, sysMCAST_LEAVE_GROUP, ssoTypeGroupReq},
ssoJoinSourceGroup: {iana.ProtocolIPv6, sysMCAST_JOIN_SOURCE_GROUP, ssoTypeGroupSourceReq},
ssoLeaveSourceGroup: {iana.ProtocolIPv6, sysMCAST_LEAVE_SOURCE_GROUP, ssoTypeGroupSourceReq},
ssoBlockSourceGroup: {iana.ProtocolIPv6, sysMCAST_BLOCK_SOURCE, ssoTypeGroupSourceReq},
ssoUnblockSourceGroup: {iana.ProtocolIPv6, sysMCAST_UNBLOCK_SOURCE, ssoTypeGroupSourceReq},
}
)
func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], ip)
sa.Scope_id = uint32(i)
}
func (pi *inet6Pktinfo) setIfindex(i int) {
pi.Ifindex = uint32(i)
}
func (mreq *ipv6Mreq) setIfindex(i int) {
mreq.Interface = uint32(i)
}
func (gr *groupReq) setGroup(grp net.IP) {
sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4))
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], grp)
}
func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4))
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], grp)
sa = (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 260))
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], src)
}

8
vendor/golang.org/x/net/ipv6/sys_solaris_amd64.s generated vendored Normal file
View File

@ -0,0 +1,8 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "textflag.h"
TEXT ·sysvicall6(SB),NOSPLIT,$0-88
JMP syscall·sysvicall6(SB)

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build nacl plan9 solaris
// +build nacl plan9
package ipv6

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -21,14 +21,14 @@ const (
sysIPV6_LEAVE_GROUP = 0xd
sysIPV6_PKTINFO = 0x13
sysSizeofSockaddrInet6 = 0x1c
sizeofSockaddrInet6 = 0x1c
sysSizeofIPv6Mreq = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sysSizeofICMPv6Filter = 0
sizeofIPv6Mreq = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofICMPv6Filter = 0
)
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
@ -36,17 +36,17 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
// TODO(mikio): implement this
}
@ -63,12 +63,12 @@ var (
}
)
func (sa *sysSockaddrInet6) setSockaddr(ip net.IP, i int) {
func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
sa.Family = syscall.AF_INET6
copy(sa.Addr[:], ip)
sa.Scope_id = uint32(i)
}
func (mreq *sysIPv6Mreq) setIfindex(i int) {
func (mreq *ipv6Mreq) setIfindex(i int) {
mreq.Interface = uint32(i)
}

38
vendor/golang.org/x/net/ipv6/syscall_solaris.go generated vendored Normal file
View File

@ -0,0 +1,38 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv6
import (
"syscall"
"unsafe"
)
//go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so"
//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
//go:linkname procGetsockopt libc___xnet_getsockopt
//go:linkname procSetsockopt libc_setsockopt
var (
procGetsockopt uintptr
procSetsockopt uintptr
)
func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno)
func getsockopt(s uintptr, level, name int, v unsafe.Pointer, l *uint32) error {
_, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procGetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(v), uintptr(unsafe.Pointer(l)), 0)
if errno != 0 {
return error(errno)
}
return nil
}
func setsockopt(s uintptr, level, name int, v unsafe.Pointer, l uint32) error {
if _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procSetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(v), uintptr(l), 0); errno != 0 {
return error(errno)
}
return nil
}

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -20,7 +20,7 @@ import (
func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {
@ -81,7 +81,7 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {
@ -127,7 +127,11 @@ func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
if toggle {
psh = nil
if err := p.SetChecksum(true, 2); err != nil {
t.Fatal(err)
// Solaris never allows to modify
// ICMP properties.
if runtime.GOOS != "solaris" {
t.Fatal(err)
}
}
} else {
psh = pshicmp

View File

@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -16,7 +16,7 @@ import (
func TestConnUnicastSocketOptions(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {
@ -29,8 +29,15 @@ func TestConnUnicastSocketOptions(t *testing.T) {
}
defer ln.Close()
done := make(chan bool)
go acceptor(t, ln, done)
errc := make(chan error, 1)
go func() {
c, err := ln.Accept()
if err != nil {
errc <- err
return
}
errc <- c.Close()
}()
c, err := net.Dial("tcp6", ln.Addr().String())
if err != nil {
@ -40,7 +47,9 @@ func TestConnUnicastSocketOptions(t *testing.T) {
testUnicastSocketOptions(t, ipv6.NewConn(c))
<-done
if err := <-errc; err != nil {
t.Errorf("server: %v", err)
}
}
var packetConnUnicastSocketOptionTests = []struct {
@ -52,7 +61,7 @@ var packetConnUnicastSocketOptionTests = []struct {
func TestPacketConnUnicastSocketOptions(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {

View File

@ -71,19 +71,19 @@ const (
sysIPV6_PORTRANGE_HIGH = 0x1
sysIPV6_PORTRANGE_LOW = 0x2
sysSizeofSockaddrStorage = 0x80
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sizeofSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6Mreq = 0x14
sysSizeofGroupReq = 0x84
sysSizeofGroupSourceReq = 0x104
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x84
sizeofGroupSourceReq = 0x104
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysSockaddrStorage struct {
type sockaddrStorage struct {
Len uint8
Family uint8
X__ss_pad1 [6]int8
@ -91,7 +91,7 @@ type sysSockaddrStorage struct {
X__ss_pad2 [112]int8
}
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Len uint8
Family uint8
Port uint16
@ -100,31 +100,31 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex uint32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Filt [8]uint32
}
type sysGroupReq struct {
type groupReq struct {
Interface uint32
Pad_cgo_0 [128]byte
}
type sysGroupSourceReq struct {
type groupSourceReq struct {
Interface uint32
Pad_cgo_0 [128]byte
Pad_cgo_1 [128]byte

View File

@ -1,8 +1,6 @@
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_dragonfly.go
// +build dragonfly
package ipv6
const (
@ -52,16 +50,16 @@ const (
sysIPV6_PORTRANGE_HIGH = 0x1
sysIPV6_PORTRANGE_LOW = 0x2
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6Mreq = 0x14
sizeofIPv6Mreq = 0x14
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Len uint8
Family uint8
Port uint16
@ -70,21 +68,21 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex uint32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Filt [8]uint32
}

View File

@ -62,19 +62,19 @@ const (
sysIPV6_PORTRANGE_HIGH = 0x1
sysIPV6_PORTRANGE_LOW = 0x2
sysSizeofSockaddrStorage = 0x80
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sizeofSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6Mreq = 0x14
sysSizeofGroupReq = 0x84
sysSizeofGroupSourceReq = 0x104
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x84
sizeofGroupSourceReq = 0x104
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysSockaddrStorage struct {
type sockaddrStorage struct {
Len uint8
Family uint8
X__ss_pad1 [6]int8
@ -82,7 +82,7 @@ type sysSockaddrStorage struct {
X__ss_pad2 [112]int8
}
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Len uint8
Family uint8
Port uint16
@ -91,32 +91,32 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex uint32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
}
type sysGroupReq struct {
type groupReq struct {
Interface uint32
Group sysSockaddrStorage
Group sockaddrStorage
}
type sysGroupSourceReq struct {
type groupSourceReq struct {
Interface uint32
Group sysSockaddrStorage
Source sysSockaddrStorage
Group sockaddrStorage
Source sockaddrStorage
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Filt [8]uint32
}

View File

@ -62,19 +62,19 @@ const (
sysIPV6_PORTRANGE_HIGH = 0x1
sysIPV6_PORTRANGE_LOW = 0x2
sysSizeofSockaddrStorage = 0x80
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sizeofSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6Mreq = 0x14
sysSizeofGroupReq = 0x88
sysSizeofGroupSourceReq = 0x108
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x88
sizeofGroupSourceReq = 0x108
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysSockaddrStorage struct {
type sockaddrStorage struct {
Len uint8
Family uint8
X__ss_pad1 [6]int8
@ -82,7 +82,7 @@ type sysSockaddrStorage struct {
X__ss_pad2 [112]int8
}
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Len uint8
Family uint8
Port uint16
@ -91,34 +91,34 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex uint32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
}
type sysGroupReq struct {
type groupReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysSockaddrStorage
Group sockaddrStorage
}
type sysGroupSourceReq struct {
type groupSourceReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysSockaddrStorage
Source sysSockaddrStorage
Group sockaddrStorage
Source sockaddrStorage
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Filt [8]uint32
}

View File

@ -62,19 +62,19 @@ const (
sysIPV6_PORTRANGE_HIGH = 0x1
sysIPV6_PORTRANGE_LOW = 0x2
sysSizeofSockaddrStorage = 0x80
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sizeofSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6Mreq = 0x14
sysSizeofGroupReq = 0x88
sysSizeofGroupSourceReq = 0x108
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x88
sizeofGroupSourceReq = 0x108
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysSockaddrStorage struct {
type sockaddrStorage struct {
Len uint8
Family uint8
X__ss_pad1 [6]int8
@ -82,7 +82,7 @@ type sysSockaddrStorage struct {
X__ss_pad2 [112]int8
}
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Len uint8
Family uint8
Port uint16
@ -91,34 +91,34 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex uint32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
}
type sysGroupReq struct {
type groupReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysSockaddrStorage
Group sockaddrStorage
}
type sysGroupSourceReq struct {
type groupSourceReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysSockaddrStorage
Source sysSockaddrStorage
Group sockaddrStorage
Source sockaddrStorage
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Filt [8]uint32
}

View File

@ -87,25 +87,25 @@ const (
sysSOL_SOCKET = 0x1
sysSO_ATTACH_FILTER = 0x1a
sysSizeofKernelSockaddrStorage = 0x80
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6FlowlabelReq = 0x20
sizeofKernelSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofIPv6FlowlabelReq = 0x20
sysSizeofIPv6Mreq = 0x14
sysSizeofGroupReq = 0x84
sysSizeofGroupSourceReq = 0x104
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x84
sizeofGroupSourceReq = 0x104
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysKernelSockaddrStorage struct {
type kernelSockaddrStorage struct {
Family uint16
X__data [126]int8
}
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
@ -113,17 +113,17 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex int32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6FlowlabelReq struct {
type ipv6FlowlabelReq struct {
Dst [16]byte /* in6_addr */
Label uint32
Action uint8
@ -134,33 +134,33 @@ type sysIPv6FlowlabelReq struct {
X__flr_pad uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Ifindex int32
}
type sysGroupReq struct {
type groupReq struct {
Interface uint32
Group sysKernelSockaddrStorage
Group kernelSockaddrStorage
}
type sysGroupSourceReq struct {
type groupSourceReq struct {
Interface uint32
Group sysKernelSockaddrStorage
Source sysKernelSockaddrStorage
Group kernelSockaddrStorage
Source kernelSockaddrStorage
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Data [8]uint32
}
type sysSockFProg struct {
type sockFProg struct {
Len uint16
Pad_cgo_0 [2]byte
Filter *sysSockFilter
Filter *sockFilter
}
type sysSockFilter struct {
type sockFilter struct {
Code uint16
Jt uint8
Jf uint8

View File

@ -87,25 +87,25 @@ const (
sysSOL_SOCKET = 0x1
sysSO_ATTACH_FILTER = 0x1a
sysSizeofKernelSockaddrStorage = 0x80
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6FlowlabelReq = 0x20
sizeofKernelSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofIPv6FlowlabelReq = 0x20
sysSizeofIPv6Mreq = 0x14
sysSizeofGroupReq = 0x88
sysSizeofGroupSourceReq = 0x108
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x88
sizeofGroupSourceReq = 0x108
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysKernelSockaddrStorage struct {
type kernelSockaddrStorage struct {
Family uint16
X__data [126]int8
}
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
@ -113,17 +113,17 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex int32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6FlowlabelReq struct {
type ipv6FlowlabelReq struct {
Dst [16]byte /* in6_addr */
Label uint32
Action uint8
@ -134,35 +134,35 @@ type sysIPv6FlowlabelReq struct {
X__flr_pad uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Ifindex int32
}
type sysGroupReq struct {
type groupReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysKernelSockaddrStorage
Group kernelSockaddrStorage
}
type sysGroupSourceReq struct {
type groupSourceReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysKernelSockaddrStorage
Source sysKernelSockaddrStorage
Group kernelSockaddrStorage
Source kernelSockaddrStorage
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Data [8]uint32
}
type sysSockFProg struct {
type sockFProg struct {
Len uint16
Pad_cgo_0 [6]byte
Filter *sysSockFilter
Filter *sockFilter
}
type sysSockFilter struct {
type sockFilter struct {
Code uint16
Jt uint8
Jf uint8

View File

@ -87,25 +87,25 @@ const (
sysSOL_SOCKET = 0x1
sysSO_ATTACH_FILTER = 0x1a
sysSizeofKernelSockaddrStorage = 0x80
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6FlowlabelReq = 0x20
sizeofKernelSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofIPv6FlowlabelReq = 0x20
sysSizeofIPv6Mreq = 0x14
sysSizeofGroupReq = 0x84
sysSizeofGroupSourceReq = 0x104
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x84
sizeofGroupSourceReq = 0x104
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysKernelSockaddrStorage struct {
type kernelSockaddrStorage struct {
Family uint16
X__data [126]int8
}
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
@ -113,17 +113,17 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex int32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6FlowlabelReq struct {
type ipv6FlowlabelReq struct {
Dst [16]byte /* in6_addr */
Label uint32
Action uint8
@ -134,33 +134,33 @@ type sysIPv6FlowlabelReq struct {
X__flr_pad uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Ifindex int32
}
type sysGroupReq struct {
type groupReq struct {
Interface uint32
Group sysKernelSockaddrStorage
Group kernelSockaddrStorage
}
type sysGroupSourceReq struct {
type groupSourceReq struct {
Interface uint32
Group sysKernelSockaddrStorage
Source sysKernelSockaddrStorage
Group kernelSockaddrStorage
Source kernelSockaddrStorage
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Data [8]uint32
}
type sysSockFProg struct {
type sockFProg struct {
Len uint16
Pad_cgo_0 [2]byte
Filter *sysSockFilter
Filter *sockFilter
}
type sysSockFilter struct {
type sockFilter struct {
Code uint16
Jt uint8
Jf uint8

View File

@ -1,8 +1,6 @@
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_linux.go
// +build linux,arm64
package ipv6
const (
@ -89,25 +87,25 @@ const (
sysSOL_SOCKET = 0x1
sysSO_ATTACH_FILTER = 0x1a
sysSizeofKernelSockaddrStorage = 0x80
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6FlowlabelReq = 0x20
sizeofKernelSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofIPv6FlowlabelReq = 0x20
sysSizeofIPv6Mreq = 0x14
sysSizeofGroupReq = 0x88
sysSizeofGroupSourceReq = 0x108
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x88
sizeofGroupSourceReq = 0x108
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysKernelSockaddrStorage struct {
type kernelSockaddrStorage struct {
Family uint16
X__data [126]int8
}
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
@ -115,17 +113,17 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex int32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6FlowlabelReq struct {
type ipv6FlowlabelReq struct {
Dst [16]byte /* in6_addr */
Label uint32
Action uint8
@ -136,35 +134,35 @@ type sysIPv6FlowlabelReq struct {
X__flr_pad uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Ifindex int32
}
type sysGroupReq struct {
type groupReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysKernelSockaddrStorage
Group kernelSockaddrStorage
}
type sysGroupSourceReq struct {
type groupSourceReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysKernelSockaddrStorage
Source sysKernelSockaddrStorage
Group kernelSockaddrStorage
Source kernelSockaddrStorage
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Data [8]uint32
}
type sysSockFProg struct {
type sockFProg struct {
Len uint16
Pad_cgo_0 [6]byte
Filter *sysSockFilter
Filter *sockFilter
}
type sysSockFilter struct {
type sockFilter struct {
Code uint16
Jt uint8
Jf uint8

168
vendor/golang.org/x/net/ipv6/zsys_linux_mips.go generated vendored Normal file
View File

@ -0,0 +1,168 @@
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_linux.go
package ipv6
const (
sysIPV6_ADDRFORM = 0x1
sysIPV6_2292PKTINFO = 0x2
sysIPV6_2292HOPOPTS = 0x3
sysIPV6_2292DSTOPTS = 0x4
sysIPV6_2292RTHDR = 0x5
sysIPV6_2292PKTOPTIONS = 0x6
sysIPV6_CHECKSUM = 0x7
sysIPV6_2292HOPLIMIT = 0x8
sysIPV6_NEXTHOP = 0x9
sysIPV6_FLOWINFO = 0xb
sysIPV6_UNICAST_HOPS = 0x10
sysIPV6_MULTICAST_IF = 0x11
sysIPV6_MULTICAST_HOPS = 0x12
sysIPV6_MULTICAST_LOOP = 0x13
sysIPV6_ADD_MEMBERSHIP = 0x14
sysIPV6_DROP_MEMBERSHIP = 0x15
sysMCAST_JOIN_GROUP = 0x2a
sysMCAST_LEAVE_GROUP = 0x2d
sysMCAST_JOIN_SOURCE_GROUP = 0x2e
sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
sysMCAST_BLOCK_SOURCE = 0x2b
sysMCAST_UNBLOCK_SOURCE = 0x2c
sysMCAST_MSFILTER = 0x30
sysIPV6_ROUTER_ALERT = 0x16
sysIPV6_MTU_DISCOVER = 0x17
sysIPV6_MTU = 0x18
sysIPV6_RECVERR = 0x19
sysIPV6_V6ONLY = 0x1a
sysIPV6_JOIN_ANYCAST = 0x1b
sysIPV6_LEAVE_ANYCAST = 0x1c
sysIPV6_FLOWLABEL_MGR = 0x20
sysIPV6_FLOWINFO_SEND = 0x21
sysIPV6_IPSEC_POLICY = 0x22
sysIPV6_XFRM_POLICY = 0x23
sysIPV6_RECVPKTINFO = 0x31
sysIPV6_PKTINFO = 0x32
sysIPV6_RECVHOPLIMIT = 0x33
sysIPV6_HOPLIMIT = 0x34
sysIPV6_RECVHOPOPTS = 0x35
sysIPV6_HOPOPTS = 0x36
sysIPV6_RTHDRDSTOPTS = 0x37
sysIPV6_RECVRTHDR = 0x38
sysIPV6_RTHDR = 0x39
sysIPV6_RECVDSTOPTS = 0x3a
sysIPV6_DSTOPTS = 0x3b
sysIPV6_RECVPATHMTU = 0x3c
sysIPV6_PATHMTU = 0x3d
sysIPV6_DONTFRAG = 0x3e
sysIPV6_RECVTCLASS = 0x42
sysIPV6_TCLASS = 0x43
sysIPV6_ADDR_PREFERENCES = 0x48
sysIPV6_PREFER_SRC_TMP = 0x1
sysIPV6_PREFER_SRC_PUBLIC = 0x2
sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
sysIPV6_PREFER_SRC_COA = 0x4
sysIPV6_PREFER_SRC_HOME = 0x400
sysIPV6_PREFER_SRC_CGA = 0x8
sysIPV6_PREFER_SRC_NONCGA = 0x800
sysIPV6_MINHOPCOUNT = 0x49
sysIPV6_ORIGDSTADDR = 0x4a
sysIPV6_RECVORIGDSTADDR = 0x4a
sysIPV6_TRANSPARENT = 0x4b
sysIPV6_UNICAST_IF = 0x4c
sysICMPV6_FILTER = 0x1
sysICMPV6_FILTER_BLOCK = 0x1
sysICMPV6_FILTER_PASS = 0x2
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
sysICMPV6_FILTER_PASSONLY = 0x4
sysSOL_SOCKET = 0x1
sysSO_ATTACH_FILTER = 0x1a
sizeofKernelSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofIPv6FlowlabelReq = 0x20
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x84
sizeofGroupSourceReq = 0x104
sizeofICMPv6Filter = 0x20
)
type kernelSockaddrStorage struct {
Family uint16
X__data [126]int8
}
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
Addr [16]byte /* in6_addr */
Scope_id uint32
}
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex int32
}
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type ipv6FlowlabelReq struct {
Dst [16]byte /* in6_addr */
Label uint32
Action uint8
Share uint8
Flags uint16
Expires uint16
Linger uint16
X__flr_pad uint32
}
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Ifindex int32
}
type groupReq struct {
Interface uint32
Group kernelSockaddrStorage
}
type groupSourceReq struct {
Interface uint32
Group kernelSockaddrStorage
Source kernelSockaddrStorage
}
type icmpv6Filter struct {
Data [8]uint32
}
type sockFProg struct {
Len uint16
Pad_cgo_0 [2]byte
Filter *sockFilter
}
type sockFilter struct {
Code uint16
Jt uint8
Jf uint8
K uint32
}

View File

@ -1,8 +1,6 @@
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_linux.go
// +build linux,mips64
package ipv6
const (
@ -89,25 +87,25 @@ const (
sysSOL_SOCKET = 0x1
sysSO_ATTACH_FILTER = 0x1a
sysSizeofKernelSockaddrStorage = 0x80
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6FlowlabelReq = 0x20
sizeofKernelSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofIPv6FlowlabelReq = 0x20
sysSizeofIPv6Mreq = 0x14
sysSizeofGroupReq = 0x88
sysSizeofGroupSourceReq = 0x108
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x88
sizeofGroupSourceReq = 0x108
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysKernelSockaddrStorage struct {
type kernelSockaddrStorage struct {
Family uint16
X__data [126]int8
}
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
@ -115,17 +113,17 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex int32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6FlowlabelReq struct {
type ipv6FlowlabelReq struct {
Dst [16]byte /* in6_addr */
Label uint32
Action uint8
@ -136,35 +134,35 @@ type sysIPv6FlowlabelReq struct {
X__flr_pad uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Ifindex int32
}
type sysGroupReq struct {
type groupReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysKernelSockaddrStorage
Group kernelSockaddrStorage
}
type sysGroupSourceReq struct {
type groupSourceReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysKernelSockaddrStorage
Source sysKernelSockaddrStorage
Group kernelSockaddrStorage
Source kernelSockaddrStorage
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Data [8]uint32
}
type sysSockFProg struct {
type sockFProg struct {
Len uint16
Pad_cgo_0 [6]byte
Filter *sysSockFilter
Filter *sockFilter
}
type sysSockFilter struct {
type sockFilter struct {
Code uint16
Jt uint8
Jf uint8

View File

@ -1,8 +1,6 @@
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_linux.go
// +build linux,mips64le
package ipv6
const (
@ -89,25 +87,25 @@ const (
sysSOL_SOCKET = 0x1
sysSO_ATTACH_FILTER = 0x1a
sysSizeofKernelSockaddrStorage = 0x80
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6FlowlabelReq = 0x20
sizeofKernelSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofIPv6FlowlabelReq = 0x20
sysSizeofIPv6Mreq = 0x14
sysSizeofGroupReq = 0x88
sysSizeofGroupSourceReq = 0x108
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x88
sizeofGroupSourceReq = 0x108
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysKernelSockaddrStorage struct {
type kernelSockaddrStorage struct {
Family uint16
X__data [126]int8
}
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
@ -115,17 +113,17 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex int32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6FlowlabelReq struct {
type ipv6FlowlabelReq struct {
Dst [16]byte /* in6_addr */
Label uint32
Action uint8
@ -136,35 +134,35 @@ type sysIPv6FlowlabelReq struct {
X__flr_pad uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Ifindex int32
}
type sysGroupReq struct {
type groupReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysKernelSockaddrStorage
Group kernelSockaddrStorage
}
type sysGroupSourceReq struct {
type groupSourceReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysKernelSockaddrStorage
Source sysKernelSockaddrStorage
Group kernelSockaddrStorage
Source kernelSockaddrStorage
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Data [8]uint32
}
type sysSockFProg struct {
type sockFProg struct {
Len uint16
Pad_cgo_0 [6]byte
Filter *sysSockFilter
Filter *sockFilter
}
type sysSockFilter struct {
type sockFilter struct {
Code uint16
Jt uint8
Jf uint8

168
vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go generated vendored Normal file
View File

@ -0,0 +1,168 @@
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_linux.go
package ipv6
const (
sysIPV6_ADDRFORM = 0x1
sysIPV6_2292PKTINFO = 0x2
sysIPV6_2292HOPOPTS = 0x3
sysIPV6_2292DSTOPTS = 0x4
sysIPV6_2292RTHDR = 0x5
sysIPV6_2292PKTOPTIONS = 0x6
sysIPV6_CHECKSUM = 0x7
sysIPV6_2292HOPLIMIT = 0x8
sysIPV6_NEXTHOP = 0x9
sysIPV6_FLOWINFO = 0xb
sysIPV6_UNICAST_HOPS = 0x10
sysIPV6_MULTICAST_IF = 0x11
sysIPV6_MULTICAST_HOPS = 0x12
sysIPV6_MULTICAST_LOOP = 0x13
sysIPV6_ADD_MEMBERSHIP = 0x14
sysIPV6_DROP_MEMBERSHIP = 0x15
sysMCAST_JOIN_GROUP = 0x2a
sysMCAST_LEAVE_GROUP = 0x2d
sysMCAST_JOIN_SOURCE_GROUP = 0x2e
sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
sysMCAST_BLOCK_SOURCE = 0x2b
sysMCAST_UNBLOCK_SOURCE = 0x2c
sysMCAST_MSFILTER = 0x30
sysIPV6_ROUTER_ALERT = 0x16
sysIPV6_MTU_DISCOVER = 0x17
sysIPV6_MTU = 0x18
sysIPV6_RECVERR = 0x19
sysIPV6_V6ONLY = 0x1a
sysIPV6_JOIN_ANYCAST = 0x1b
sysIPV6_LEAVE_ANYCAST = 0x1c
sysIPV6_FLOWLABEL_MGR = 0x20
sysIPV6_FLOWINFO_SEND = 0x21
sysIPV6_IPSEC_POLICY = 0x22
sysIPV6_XFRM_POLICY = 0x23
sysIPV6_RECVPKTINFO = 0x31
sysIPV6_PKTINFO = 0x32
sysIPV6_RECVHOPLIMIT = 0x33
sysIPV6_HOPLIMIT = 0x34
sysIPV6_RECVHOPOPTS = 0x35
sysIPV6_HOPOPTS = 0x36
sysIPV6_RTHDRDSTOPTS = 0x37
sysIPV6_RECVRTHDR = 0x38
sysIPV6_RTHDR = 0x39
sysIPV6_RECVDSTOPTS = 0x3a
sysIPV6_DSTOPTS = 0x3b
sysIPV6_RECVPATHMTU = 0x3c
sysIPV6_PATHMTU = 0x3d
sysIPV6_DONTFRAG = 0x3e
sysIPV6_RECVTCLASS = 0x42
sysIPV6_TCLASS = 0x43
sysIPV6_ADDR_PREFERENCES = 0x48
sysIPV6_PREFER_SRC_TMP = 0x1
sysIPV6_PREFER_SRC_PUBLIC = 0x2
sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
sysIPV6_PREFER_SRC_COA = 0x4
sysIPV6_PREFER_SRC_HOME = 0x400
sysIPV6_PREFER_SRC_CGA = 0x8
sysIPV6_PREFER_SRC_NONCGA = 0x800
sysIPV6_MINHOPCOUNT = 0x49
sysIPV6_ORIGDSTADDR = 0x4a
sysIPV6_RECVORIGDSTADDR = 0x4a
sysIPV6_TRANSPARENT = 0x4b
sysIPV6_UNICAST_IF = 0x4c
sysICMPV6_FILTER = 0x1
sysICMPV6_FILTER_BLOCK = 0x1
sysICMPV6_FILTER_PASS = 0x2
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
sysICMPV6_FILTER_PASSONLY = 0x4
sysSOL_SOCKET = 0x1
sysSO_ATTACH_FILTER = 0x1a
sizeofKernelSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofIPv6FlowlabelReq = 0x20
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x84
sizeofGroupSourceReq = 0x104
sizeofICMPv6Filter = 0x20
)
type kernelSockaddrStorage struct {
Family uint16
X__data [126]int8
}
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
Addr [16]byte /* in6_addr */
Scope_id uint32
}
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex int32
}
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type ipv6FlowlabelReq struct {
Dst [16]byte /* in6_addr */
Label uint32
Action uint8
Share uint8
Flags uint16
Expires uint16
Linger uint16
X__flr_pad uint32
}
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Ifindex int32
}
type groupReq struct {
Interface uint32
Group kernelSockaddrStorage
}
type groupSourceReq struct {
Interface uint32
Group kernelSockaddrStorage
Source kernelSockaddrStorage
}
type icmpv6Filter struct {
Data [8]uint32
}
type sockFProg struct {
Len uint16
Pad_cgo_0 [2]byte
Filter *sockFilter
}
type sockFilter struct {
Code uint16
Jt uint8
Jf uint8
K uint32
}

View File

@ -1,8 +1,6 @@
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_linux.go
// +build linux,ppc
package ipv6
const (
@ -89,25 +87,25 @@ const (
sysSOL_SOCKET = 0x1
sysSO_ATTACH_FILTER = 0x1a
sysSizeofKernelSockaddrStorage = 0x80
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6FlowlabelReq = 0x20
sizeofKernelSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofIPv6FlowlabelReq = 0x20
sysSizeofIPv6Mreq = 0x14
sysSizeofGroupReq = 0x84
sysSizeofGroupSourceReq = 0x104
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x84
sizeofGroupSourceReq = 0x104
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysKernelSockaddrStorage struct {
type kernelSockaddrStorage struct {
Family uint16
X__data [126]uint8
}
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
@ -115,17 +113,17 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex int32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6FlowlabelReq struct {
type ipv6FlowlabelReq struct {
Dst [16]byte /* in6_addr */
Label uint32
Action uint8
@ -136,33 +134,33 @@ type sysIPv6FlowlabelReq struct {
X__flr_pad uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Ifindex int32
}
type sysGroupReq struct {
type groupReq struct {
Interface uint32
Group sysKernelSockaddrStorage
Group kernelSockaddrStorage
}
type sysGroupSourceReq struct {
type groupSourceReq struct {
Interface uint32
Group sysKernelSockaddrStorage
Source sysKernelSockaddrStorage
Group kernelSockaddrStorage
Source kernelSockaddrStorage
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Data [8]uint32
}
type sysSockFProg struct {
type sockFProg struct {
Len uint16
Pad_cgo_0 [2]byte
Filter *sysSockFilter
Filter *sockFilter
}
type sysSockFilter struct {
type sockFilter struct {
Code uint16
Jt uint8
Jf uint8

View File

@ -1,8 +1,6 @@
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_linux.go
// +build linux,ppc64
package ipv6
const (
@ -89,25 +87,25 @@ const (
sysSOL_SOCKET = 0x1
sysSO_ATTACH_FILTER = 0x1a
sysSizeofKernelSockaddrStorage = 0x80
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6FlowlabelReq = 0x20
sizeofKernelSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofIPv6FlowlabelReq = 0x20
sysSizeofIPv6Mreq = 0x14
sysSizeofGroupReq = 0x88
sysSizeofGroupSourceReq = 0x108
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x88
sizeofGroupSourceReq = 0x108
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysKernelSockaddrStorage struct {
type kernelSockaddrStorage struct {
Family uint16
X__data [126]int8
}
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
@ -115,17 +113,17 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex int32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6FlowlabelReq struct {
type ipv6FlowlabelReq struct {
Dst [16]byte /* in6_addr */
Label uint32
Action uint8
@ -136,35 +134,35 @@ type sysIPv6FlowlabelReq struct {
X__flr_pad uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Ifindex int32
}
type sysGroupReq struct {
type groupReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysKernelSockaddrStorage
Group kernelSockaddrStorage
}
type sysGroupSourceReq struct {
type groupSourceReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysKernelSockaddrStorage
Source sysKernelSockaddrStorage
Group kernelSockaddrStorage
Source kernelSockaddrStorage
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Data [8]uint32
}
type sysSockFProg struct {
type sockFProg struct {
Len uint16
Pad_cgo_0 [6]byte
Filter *sysSockFilter
Filter *sockFilter
}
type sysSockFilter struct {
type sockFilter struct {
Code uint16
Jt uint8
Jf uint8

View File

@ -1,8 +1,6 @@
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_linux.go
// +build linux,ppc64le
package ipv6
const (
@ -89,25 +87,25 @@ const (
sysSOL_SOCKET = 0x1
sysSO_ATTACH_FILTER = 0x1a
sysSizeofKernelSockaddrStorage = 0x80
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6FlowlabelReq = 0x20
sizeofKernelSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofIPv6FlowlabelReq = 0x20
sysSizeofIPv6Mreq = 0x14
sysSizeofGroupReq = 0x88
sysSizeofGroupSourceReq = 0x108
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x88
sizeofGroupSourceReq = 0x108
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysKernelSockaddrStorage struct {
type kernelSockaddrStorage struct {
Family uint16
X__data [126]int8
}
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
@ -115,17 +113,17 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex int32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6FlowlabelReq struct {
type ipv6FlowlabelReq struct {
Dst [16]byte /* in6_addr */
Label uint32
Action uint8
@ -136,35 +134,35 @@ type sysIPv6FlowlabelReq struct {
X__flr_pad uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Ifindex int32
}
type sysGroupReq struct {
type groupReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysKernelSockaddrStorage
Group kernelSockaddrStorage
}
type sysGroupSourceReq struct {
type groupSourceReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysKernelSockaddrStorage
Source sysKernelSockaddrStorage
Group kernelSockaddrStorage
Source kernelSockaddrStorage
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Data [8]uint32
}
type sysSockFProg struct {
type sockFProg struct {
Len uint16
Pad_cgo_0 [6]byte
Filter *sysSockFilter
Filter *sockFilter
}
type sysSockFilter struct {
type sockFilter struct {
Code uint16
Jt uint8
Jf uint8

View File

@ -1,8 +1,6 @@
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_linux.go
// +build linux,s390x
package ipv6
const (
@ -89,25 +87,25 @@ const (
sysSOL_SOCKET = 0x1
sysSO_ATTACH_FILTER = 0x1a
sysSizeofKernelSockaddrStorage = 0x80
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6FlowlabelReq = 0x20
sizeofKernelSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofIPv6FlowlabelReq = 0x20
sysSizeofIPv6Mreq = 0x14
sysSizeofGroupReq = 0x88
sysSizeofGroupSourceReq = 0x108
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x88
sizeofGroupSourceReq = 0x108
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysKernelSockaddrStorage struct {
type kernelSockaddrStorage struct {
Family uint16
X__data [126]int8
}
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
@ -115,17 +113,17 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex int32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6FlowlabelReq struct {
type ipv6FlowlabelReq struct {
Dst [16]byte /* in6_addr */
Label uint32
Action uint8
@ -136,35 +134,35 @@ type sysIPv6FlowlabelReq struct {
X__flr_pad uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Ifindex int32
}
type sysGroupReq struct {
type groupReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysKernelSockaddrStorage
Group kernelSockaddrStorage
}
type sysGroupSourceReq struct {
type groupSourceReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group sysKernelSockaddrStorage
Source sysKernelSockaddrStorage
Group kernelSockaddrStorage
Source kernelSockaddrStorage
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Data [8]uint32
}
type sysSockFProg struct {
type sockFProg struct {
Len uint16
Pad_cgo_0 [6]byte
Filter *sysSockFilter
Filter *sockFilter
}
type sysSockFilter struct {
type sockFilter struct {
Code uint16
Jt uint8
Jf uint8

View File

@ -46,16 +46,16 @@ const (
sysIPV6_PORTRANGE_HIGH = 0x1
sysIPV6_PORTRANGE_LOW = 0x2
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6Mreq = 0x14
sizeofIPv6Mreq = 0x14
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Len uint8
Family uint8
Port uint16
@ -64,21 +64,21 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex uint32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Filt [8]uint32
}

View File

@ -55,16 +55,16 @@ const (
sysIPV6_PORTRANGE_HIGH = 0x1
sysIPV6_PORTRANGE_LOW = 0x2
sysSizeofSockaddrInet6 = 0x1c
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x20
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sysSizeofIPv6Mreq = 0x14
sizeofIPv6Mreq = 0x14
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysSockaddrInet6 struct {
type sockaddrInet6 struct {
Len uint8
Family uint8
Port uint16
@ -73,21 +73,21 @@ type sysSockaddrInet6 struct {
Scope_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex uint32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
}
type sysICMPv6Filter struct {
type icmpv6Filter struct {
Filt [8]uint32
}

View File

@ -1,8 +1,6 @@
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_solaris.go
// +build solaris
package ipv6
const (
@ -44,6 +42,13 @@ const (
sysIPV6_RECVDSTOPTS = 0x28
sysMCAST_JOIN_GROUP = 0x29
sysMCAST_LEAVE_GROUP = 0x2a
sysMCAST_BLOCK_SOURCE = 0x2b
sysMCAST_UNBLOCK_SOURCE = 0x2c
sysMCAST_JOIN_SOURCE_GROUP = 0x2d
sysMCAST_LEAVE_SOURCE_GROUP = 0x2e
sysIPV6_PREFER_SRC_HOME = 0x1
sysIPV6_PREFER_SRC_COA = 0x2
sysIPV6_PREFER_SRC_PUBLIC = 0x4
@ -67,16 +72,26 @@ const (
sysICMP6_FILTER = 0x1
sysSizeofSockaddrInet6 = 0x20
sysSizeofInet6Pktinfo = 0x14
sysSizeofIPv6Mtuinfo = 0x24
sizeofSockaddrStorage = 0x100
sizeofSockaddrInet6 = 0x20
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x24
sysSizeofIPv6Mreq = 0x14
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x104
sizeofGroupSourceReq = 0x204
sysSizeofICMPv6Filter = 0x20
sizeofICMPv6Filter = 0x20
)
type sysSockaddrInet6 struct {
type sockaddrStorage struct {
Family uint16
X_ss_pad1 [6]int8
X_ss_align float64
X_ss_pad2 [240]int8
}
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
@ -85,21 +100,32 @@ type sysSockaddrInet6 struct {
X__sin6_src_id uint32
}
type sysInet6Pktinfo struct {
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex uint32
}
type sysIPv6Mtuinfo struct {
Addr sysSockaddrInet6
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type sysIPv6Mreq struct {
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
}
type sysICMPv6Filter struct {
type groupReq struct {
Interface uint32
Pad_cgo_0 [256]byte
}
type groupSourceReq struct {
Interface uint32
Pad_cgo_0 [256]byte
Pad_cgo_1 [256]byte
}
type icmpv6Filter struct {
X__icmp6_filt [8]uint32
}

4
vendor/manifest vendored
View File

@ -359,8 +359,8 @@
{
"importpath": "golang.org/x/net/ipv6",
"repository": "https://go.googlesource.com/net",
"vcs": "",
"revision": "749a502dd1eaf3e5bfd4f8956748c502357c0bbe",
"vcs": "git",
"revision": "d379faa25cbdc04d653984913a2ceb43b0bc46d7",
"branch": "master",
"path": "/ipv6"
},