aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/net/internal
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/net/internal')
-rw-r--r--vendor/golang.org/x/net/internal/iana/const.go109
-rw-r--r--vendor/golang.org/x/net/internal/iana/gen.go293
-rw-r--r--vendor/golang.org/x/net/internal/socket/cmsghdr.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go21
-rw-r--r--vendor/golang.org/x/net/internal/socket/cmsghdr_zos_s390x.go25
-rw-r--r--vendor/golang.org/x/net/internal/socket/defs_darwin.go44
-rw-r--r--vendor/golang.org/x/net/internal/socket/defs_dragonfly.go44
-rw-r--r--vendor/golang.org/x/net/internal/socket/defs_freebsd.go44
-rw-r--r--vendor/golang.org/x/net/internal/socket/defs_linux.go49
-rw-r--r--vendor/golang.org/x/net/internal/socket/defs_netbsd.go47
-rw-r--r--vendor/golang.org/x/net/internal/socket/defs_openbsd.go44
-rw-r--r--vendor/golang.org/x/net/internal/socket/defs_solaris.go44
-rw-r--r--vendor/golang.org/x/net/internal/socket/empty.s7
-rw-r--r--vendor/golang.org/x/net/internal/socket/error_unix.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/iovec_64bit.go4
-rw-r--r--vendor/golang.org/x/net/internal/socket/iovec_stub.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/msghdr_bsd.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/msghdr_stub.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go36
-rw-r--r--vendor/golang.org/x/net/internal/socket/norace.go12
-rw-r--r--vendor/golang.org/x/net/internal/socket/race.go37
-rw-r--r--vendor/golang.org/x/net/internal/socket/rawconn.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go7
-rw-r--r--vendor/golang.org/x/net/internal/socket/rawconn_msg.go10
-rw-r--r--vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go7
-rw-r--r--vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go9
-rw-r--r--vendor/golang.org/x/net/internal/socket/rawconn_stub.go25
-rw-r--r--vendor/golang.org/x/net/internal/socket/reflect.go62
-rw-r--r--vendor/golang.org/x/net/internal/socket/socket.go13
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys.go14
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_bsd.go8
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_bsdvar.go14
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_const_unix.go17
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_const_zos.go17
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_darwin.go7
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_dragonfly.go7
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linkname.go42
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux.go5
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_386.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go12
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_posix.go45
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_solaris.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_stub.go33
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_unix.go2
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_windows.go19
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_zos_s390x.go38
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_zos_s390x.s11
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go59
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm64.go52
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_386.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go57
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go20
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm64.go58
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm64.go52
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_openbsd_mips64.go50
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_zos_s390x.go32
88 files changed, 898 insertions, 1214 deletions
diff --git a/vendor/golang.org/x/net/internal/iana/const.go b/vendor/golang.org/x/net/internal/iana/const.go
index c9df24d..cea712f 100644
--- a/vendor/golang.org/x/net/internal/iana/const.go
+++ b/vendor/golang.org/x/net/internal/iana/const.go
@@ -1,44 +1,40 @@
// go generate gen.go
-// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
+// Code generated by the command above; DO NOT EDIT.
// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).
package iana // import "golang.org/x/net/internal/iana"
-// Differentiated Services Field Codepoints (DSCP), Updated: 2017-05-12
+// Differentiated Services Field Codepoints (DSCP), Updated: 2018-05-04
const (
- DiffServCS0 = 0x0 // CS0
- DiffServCS1 = 0x20 // CS1
- DiffServCS2 = 0x40 // CS2
- DiffServCS3 = 0x60 // CS3
- DiffServCS4 = 0x80 // CS4
- DiffServCS5 = 0xa0 // CS5
- DiffServCS6 = 0xc0 // CS6
- DiffServCS7 = 0xe0 // CS7
- DiffServAF11 = 0x28 // AF11
- DiffServAF12 = 0x30 // AF12
- DiffServAF13 = 0x38 // AF13
- DiffServAF21 = 0x48 // AF21
- DiffServAF22 = 0x50 // AF22
- DiffServAF23 = 0x58 // AF23
- DiffServAF31 = 0x68 // AF31
- DiffServAF32 = 0x70 // AF32
- DiffServAF33 = 0x78 // AF33
- DiffServAF41 = 0x88 // AF41
- DiffServAF42 = 0x90 // AF42
- DiffServAF43 = 0x98 // AF43
- DiffServEF = 0xb8 // EF
- DiffServVOICEADMIT = 0xb0 // VOICE-ADMIT
+ DiffServCS0 = 0x00 // CS0
+ DiffServCS1 = 0x20 // CS1
+ DiffServCS2 = 0x40 // CS2
+ DiffServCS3 = 0x60 // CS3
+ DiffServCS4 = 0x80 // CS4
+ DiffServCS5 = 0xa0 // CS5
+ DiffServCS6 = 0xc0 // CS6
+ DiffServCS7 = 0xe0 // CS7
+ DiffServAF11 = 0x28 // AF11
+ DiffServAF12 = 0x30 // AF12
+ DiffServAF13 = 0x38 // AF13
+ DiffServAF21 = 0x48 // AF21
+ DiffServAF22 = 0x50 // AF22
+ DiffServAF23 = 0x58 // AF23
+ DiffServAF31 = 0x68 // AF31
+ DiffServAF32 = 0x70 // AF32
+ DiffServAF33 = 0x78 // AF33
+ DiffServAF41 = 0x88 // AF41
+ DiffServAF42 = 0x90 // AF42
+ DiffServAF43 = 0x98 // AF43
+ DiffServEF = 0xb8 // EF
+ DiffServVOICEADMIT = 0xb0 // VOICE-ADMIT
+ NotECNTransport = 0x00 // Not-ECT (Not ECN-Capable Transport)
+ ECNTransport1 = 0x01 // ECT(1) (ECN-Capable Transport(1))
+ ECNTransport0 = 0x02 // ECT(0) (ECN-Capable Transport(0))
+ CongestionExperienced = 0x03 // CE (Congestion Experienced)
)
-// IPv4 TOS Byte and IPv6 Traffic Class Octet, Updated: 2001-09-06
-const (
- NotECNTransport = 0x0 // Not-ECT (Not ECN-Capable Transport)
- ECNTransport1 = 0x1 // ECT(1) (ECN-Capable Transport(1))
- ECNTransport0 = 0x2 // ECT(0) (ECN-Capable Transport(0))
- CongestionExperienced = 0x3 // CE (Congestion Experienced)
-)
-
-// Protocol Numbers, Updated: 2016-06-22
+// Protocol Numbers, Updated: 2017-10-13
const (
ProtocolIP = 0 // IPv4 encapsulation, pseudo protocol number
ProtocolHOPOPT = 0 // IPv6 Hop-by-Hop Option
@@ -178,3 +174,50 @@ const (
ProtocolROHC = 142 // Robust Header Compression
ProtocolReserved = 255 // Reserved
)
+
+// Address Family Numbers, Updated: 2018-04-02
+const (
+ AddrFamilyIPv4 = 1 // IP (IP version 4)
+ AddrFamilyIPv6 = 2 // IP6 (IP version 6)
+ AddrFamilyNSAP = 3 // NSAP
+ AddrFamilyHDLC = 4 // HDLC (8-bit multidrop)
+ AddrFamilyBBN1822 = 5 // BBN 1822
+ AddrFamily802 = 6 // 802 (includes all 802 media plus Ethernet "canonical format")
+ AddrFamilyE163 = 7 // E.163
+ AddrFamilyE164 = 8 // E.164 (SMDS, Frame Relay, ATM)
+ AddrFamilyF69 = 9 // F.69 (Telex)
+ AddrFamilyX121 = 10 // X.121 (X.25, Frame Relay)
+ AddrFamilyIPX = 11 // IPX
+ AddrFamilyAppletalk = 12 // Appletalk
+ AddrFamilyDecnetIV = 13 // Decnet IV
+ AddrFamilyBanyanVines = 14 // Banyan Vines
+ AddrFamilyE164withSubaddress = 15 // E.164 with NSAP format subaddress
+ AddrFamilyDNS = 16 // DNS (Domain Name System)
+ AddrFamilyDistinguishedName = 17 // Distinguished Name
+ AddrFamilyASNumber = 18 // AS Number
+ AddrFamilyXTPoverIPv4 = 19 // XTP over IP version 4
+ AddrFamilyXTPoverIPv6 = 20 // XTP over IP version 6
+ AddrFamilyXTPnativemodeXTP = 21 // XTP native mode XTP
+ AddrFamilyFibreChannelWorldWidePortName = 22 // Fibre Channel World-Wide Port Name
+ AddrFamilyFibreChannelWorldWideNodeName = 23 // Fibre Channel World-Wide Node Name
+ AddrFamilyGWID = 24 // GWID
+ AddrFamilyL2VPN = 25 // AFI for L2VPN information
+ AddrFamilyMPLSTPSectionEndpointID = 26 // MPLS-TP Section Endpoint Identifier
+ AddrFamilyMPLSTPLSPEndpointID = 27 // MPLS-TP LSP Endpoint Identifier
+ AddrFamilyMPLSTPPseudowireEndpointID = 28 // MPLS-TP Pseudowire Endpoint Identifier
+ AddrFamilyMTIPv4 = 29 // MT IP: Multi-Topology IP version 4
+ AddrFamilyMTIPv6 = 30 // MT IPv6: Multi-Topology IP version 6
+ AddrFamilyEIGRPCommonServiceFamily = 16384 // EIGRP Common Service Family
+ AddrFamilyEIGRPIPv4ServiceFamily = 16385 // EIGRP IPv4 Service Family
+ AddrFamilyEIGRPIPv6ServiceFamily = 16386 // EIGRP IPv6 Service Family
+ AddrFamilyLISPCanonicalAddressFormat = 16387 // LISP Canonical Address Format (LCAF)
+ AddrFamilyBGPLS = 16388 // BGP-LS
+ AddrFamily48bitMAC = 16389 // 48-bit MAC
+ AddrFamily64bitMAC = 16390 // 64-bit MAC
+ AddrFamilyOUI = 16391 // OUI
+ AddrFamilyMACFinal24bits = 16392 // MAC/24
+ AddrFamilyMACFinal40bits = 16393 // MAC/40
+ AddrFamilyIPv6Initial64bits = 16394 // IPv6/64
+ AddrFamilyRBridgePortID = 16395 // RBridge Port ID
+ AddrFamilyTRILLNickname = 16396 // TRILL Nickname
+)
diff --git a/vendor/golang.org/x/net/internal/iana/gen.go b/vendor/golang.org/x/net/internal/iana/gen.go
deleted file mode 100644
index 2a5c310..0000000
--- a/vendor/golang.org/x/net/internal/iana/gen.go
+++ /dev/null
@@ -1,293 +0,0 @@
-// 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 ignore
-
-//go:generate go run gen.go
-
-// This program generates internet protocol constants and tables by
-// reading IANA protocol registries.
-package main
-
-import (
- "bytes"
- "encoding/xml"
- "fmt"
- "go/format"
- "io"
- "io/ioutil"
- "net/http"
- "os"
- "strconv"
- "strings"
-)
-
-var registries = []struct {
- url string
- parse func(io.Writer, io.Reader) error
-}{
- {
- "https://www.iana.org/assignments/dscp-registry/dscp-registry.xml",
- parseDSCPRegistry,
- },
- {
- "https://www.iana.org/assignments/ipv4-tos-byte/ipv4-tos-byte.xml",
- parseTOSTCByte,
- },
- {
- "https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml",
- parseProtocolNumbers,
- },
-}
-
-func main() {
- var bb bytes.Buffer
- fmt.Fprintf(&bb, "// go generate gen.go\n")
- fmt.Fprintf(&bb, "// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT\n\n")
- fmt.Fprintf(&bb, "// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).\n")
- fmt.Fprintf(&bb, `package iana // import "golang.org/x/net/internal/iana"`+"\n\n")
- for _, r := range registries {
- resp, err := http.Get(r.url)
- if err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
- defer resp.Body.Close()
- if resp.StatusCode != http.StatusOK {
- fmt.Fprintf(os.Stderr, "got HTTP status code %v for %v\n", resp.StatusCode, r.url)
- os.Exit(1)
- }
- if err := r.parse(&bb, resp.Body); err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
- fmt.Fprintf(&bb, "\n")
- }
- b, err := format.Source(bb.Bytes())
- if err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
- if err := ioutil.WriteFile("const.go", b, 0644); err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
-}
-
-func parseDSCPRegistry(w io.Writer, r io.Reader) error {
- dec := xml.NewDecoder(r)
- var dr dscpRegistry
- if err := dec.Decode(&dr); err != nil {
- return err
- }
- drs := dr.escape()
- fmt.Fprintf(w, "// %s, Updated: %s\n", dr.Title, dr.Updated)
- fmt.Fprintf(w, "const (\n")
- for _, dr := range drs {
- fmt.Fprintf(w, "DiffServ%s = %#x", dr.Name, dr.Value)
- fmt.Fprintf(w, "// %s\n", dr.OrigName)
- }
- fmt.Fprintf(w, ")\n")
- return nil
-}
-
-type dscpRegistry struct {
- XMLName xml.Name `xml:"registry"`
- Title string `xml:"title"`
- Updated string `xml:"updated"`
- Note string `xml:"note"`
- RegTitle string `xml:"registry>title"`
- PoolRecords []struct {
- Name string `xml:"name"`
- Space string `xml:"space"`
- } `xml:"registry>record"`
- Records []struct {
- Name string `xml:"name"`
- Space string `xml:"space"`
- } `xml:"registry>registry>record"`
-}
-
-type canonDSCPRecord struct {
- OrigName string
- Name string
- Value int
-}
-
-func (drr *dscpRegistry) escape() []canonDSCPRecord {
- drs := make([]canonDSCPRecord, len(drr.Records))
- sr := strings.NewReplacer(
- "+", "",
- "-", "",
- "/", "",
- ".", "",
- " ", "",
- )
- for i, dr := range drr.Records {
- s := strings.TrimSpace(dr.Name)
- drs[i].OrigName = s
- drs[i].Name = sr.Replace(s)
- n, err := strconv.ParseUint(dr.Space, 2, 8)
- if err != nil {
- continue
- }
- drs[i].Value = int(n) << 2
- }
- return drs
-}
-
-func parseTOSTCByte(w io.Writer, r io.Reader) error {
- dec := xml.NewDecoder(r)
- var ttb tosTCByte
- if err := dec.Decode(&ttb); err != nil {
- return err
- }
- trs := ttb.escape()
- fmt.Fprintf(w, "// %s, Updated: %s\n", ttb.Title, ttb.Updated)
- fmt.Fprintf(w, "const (\n")
- for _, tr := range trs {
- fmt.Fprintf(w, "%s = %#x", tr.Keyword, tr.Value)
- fmt.Fprintf(w, "// %s\n", tr.OrigKeyword)
- }
- fmt.Fprintf(w, ")\n")
- return nil
-}
-
-type tosTCByte struct {
- XMLName xml.Name `xml:"registry"`
- Title string `xml:"title"`
- Updated string `xml:"updated"`
- Note string `xml:"note"`
- RegTitle string `xml:"registry>title"`
- Records []struct {
- Binary string `xml:"binary"`
- Keyword string `xml:"keyword"`
- } `xml:"registry>record"`
-}
-
-type canonTOSTCByteRecord struct {
- OrigKeyword string
- Keyword string
- Value int
-}
-
-func (ttb *tosTCByte) escape() []canonTOSTCByteRecord {
- trs := make([]canonTOSTCByteRecord, len(ttb.Records))
- sr := strings.NewReplacer(
- "Capable", "",
- "(", "",
- ")", "",
- "+", "",
- "-", "",
- "/", "",
- ".", "",
- " ", "",
- )
- for i, tr := range ttb.Records {
- s := strings.TrimSpace(tr.Keyword)
- trs[i].OrigKeyword = s
- ss := strings.Split(s, " ")
- if len(ss) > 1 {
- trs[i].Keyword = strings.Join(ss[1:], " ")
- } else {
- trs[i].Keyword = ss[0]
- }
- trs[i].Keyword = sr.Replace(trs[i].Keyword)
- n, err := strconv.ParseUint(tr.Binary, 2, 8)
- if err != nil {
- continue
- }
- trs[i].Value = int(n)
- }
- return trs
-}
-
-func parseProtocolNumbers(w io.Writer, r io.Reader) error {
- dec := xml.NewDecoder(r)
- var pn protocolNumbers
- if err := dec.Decode(&pn); err != nil {
- return err
- }
- prs := pn.escape()
- prs = append([]canonProtocolRecord{{
- Name: "IP",
- Descr: "IPv4 encapsulation, pseudo protocol number",
- Value: 0,
- }}, prs...)
- fmt.Fprintf(w, "// %s, Updated: %s\n", pn.Title, pn.Updated)
- fmt.Fprintf(w, "const (\n")
- for _, pr := range prs {
- if pr.Name == "" {
- continue
- }
- fmt.Fprintf(w, "Protocol%s = %d", pr.Name, pr.Value)
- s := pr.Descr
- if s == "" {
- s = pr.OrigName
- }
- fmt.Fprintf(w, "// %s\n", s)
- }
- fmt.Fprintf(w, ")\n")
- return nil
-}
-
-type protocolNumbers struct {
- XMLName xml.Name `xml:"registry"`
- Title string `xml:"title"`
- Updated string `xml:"updated"`
- RegTitle string `xml:"registry>title"`
- Note string `xml:"registry>note"`
- Records []struct {
- Value string `xml:"value"`
- Name string `xml:"name"`
- Descr string `xml:"description"`
- } `xml:"registry>record"`
-}
-
-type canonProtocolRecord struct {
- OrigName string
- Name string
- Descr string
- Value int
-}
-
-func (pn *protocolNumbers) escape() []canonProtocolRecord {
- prs := make([]canonProtocolRecord, len(pn.Records))
- sr := strings.NewReplacer(
- "-in-", "in",
- "-within-", "within",
- "-over-", "over",
- "+", "P",
- "-", "",
- "/", "",
- ".", "",
- " ", "",
- )
- for i, pr := range pn.Records {
- if strings.Contains(pr.Name, "Deprecated") ||
- strings.Contains(pr.Name, "deprecated") {
- continue
- }
- prs[i].OrigName = pr.Name
- s := strings.TrimSpace(pr.Name)
- switch pr.Name {
- case "ISIS over IPv4":
- prs[i].Name = "ISIS"
- case "manet":
- prs[i].Name = "MANET"
- default:
- prs[i].Name = sr.Replace(s)
- }
- ss := strings.Split(pr.Descr, "\n")
- for i := range ss {
- ss[i] = strings.TrimSpace(ss[i])
- }
- if len(ss) > 1 {
- prs[i].Descr = strings.Join(ss, " ")
- } else {
- prs[i].Descr = ss[0]
- }
- prs[i].Value, _ = strconv.Atoi(pr.Value)
- }
- return prs
-}
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr.go b/vendor/golang.org/x/net/internal/socket/cmsghdr.go
index 1eb07d2..0cde35a 100644
--- a/vendor/golang.org/x/net/internal/socket/cmsghdr.go
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr.go
@@ -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 dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package socket
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go
index d1d0c2d..14dbb3a 100644
--- a/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go
@@ -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 dragonfly freebsd netbsd openbsd
+// +build aix darwin dragonfly freebsd netbsd openbsd
package socket
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go
index 63f0534..27be0ef 100644
--- a/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go
@@ -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 arm64 amd64 ppc64 ppc64le mips64 mips64le s390x
+// +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
// +build linux
package socket
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go
index a4e7122..83c35ec 100644
--- a/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go
@@ -2,13 +2,23 @@
// 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,!solaris
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
package socket
-type cmsghdr struct{}
+func controlHeaderLen() int {
+ return 0
+}
+
+func controlMessageLen(dataLen int) int {
+ return 0
+}
-const sizeofCmsghdr = 0
+func controlMessageSpace(dataLen int) int {
+ return 0
+}
+
+type cmsghdr struct{}
func (h *cmsghdr) len() int { return 0 }
func (h *cmsghdr) lvl() int { return 0 }
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go
new file mode 100644
index 0000000..c2b2b65
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go
@@ -0,0 +1,21 @@
+// Copyright 2020 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 aix darwin dragonfly freebsd linux netbsd openbsd solaris
+
+package socket
+
+import "golang.org/x/sys/unix"
+
+func controlHeaderLen() int {
+ return unix.CmsgLen(0)
+}
+
+func controlMessageLen(dataLen int) int {
+ return unix.CmsgLen(dataLen)
+}
+
+func controlMessageSpace(dataLen int) int {
+ return unix.CmsgSpace(dataLen)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_zos_s390x.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_zos_s390x.go
new file mode 100644
index 0000000..98be146
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_zos_s390x.go
@@ -0,0 +1,25 @@
+// Copyright 2020 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 socket
+
+import "syscall"
+
+func (h *cmsghdr) set(l, lvl, typ int) {
+ h.Len = int32(l)
+ h.Level = int32(lvl)
+ h.Type = int32(typ)
+}
+
+func controlHeaderLen() int {
+ return syscall.CmsgLen(0)
+}
+
+func controlMessageLen(dataLen int) int {
+ return syscall.CmsgLen(dataLen)
+}
+
+func controlMessageSpace(dataLen int) int {
+ return syscall.CmsgSpace(dataLen)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/defs_darwin.go b/vendor/golang.org/x/net/internal/socket/defs_darwin.go
deleted file mode 100644
index 14e28c0..0000000
--- a/vendor/golang.org/x/net/internal/socket/defs_darwin.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// 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 ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package socket
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-)
-
-type iovec C.struct_iovec
-
-type msghdr C.struct_msghdr
-
-type cmsghdr C.struct_cmsghdr
-
-type sockaddrInet C.struct_sockaddr_in
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-const (
- sizeofIovec = C.sizeof_struct_iovec
- sizeofMsghdr = C.sizeof_struct_msghdr
- sizeofCmsghdr = C.sizeof_struct_cmsghdr
-
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/golang.org/x/net/internal/socket/defs_dragonfly.go b/vendor/golang.org/x/net/internal/socket/defs_dragonfly.go
deleted file mode 100644
index 14e28c0..0000000
--- a/vendor/golang.org/x/net/internal/socket/defs_dragonfly.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// 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 ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package socket
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-)
-
-type iovec C.struct_iovec
-
-type msghdr C.struct_msghdr
-
-type cmsghdr C.struct_cmsghdr
-
-type sockaddrInet C.struct_sockaddr_in
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-const (
- sizeofIovec = C.sizeof_struct_iovec
- sizeofMsghdr = C.sizeof_struct_msghdr
- sizeofCmsghdr = C.sizeof_struct_cmsghdr
-
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/golang.org/x/net/internal/socket/defs_freebsd.go b/vendor/golang.org/x/net/internal/socket/defs_freebsd.go
deleted file mode 100644
index 14e28c0..0000000
--- a/vendor/golang.org/x/net/internal/socket/defs_freebsd.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// 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 ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package socket
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-)
-
-type iovec C.struct_iovec
-
-type msghdr C.struct_msghdr
-
-type cmsghdr C.struct_cmsghdr
-
-type sockaddrInet C.struct_sockaddr_in
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-const (
- sizeofIovec = C.sizeof_struct_iovec
- sizeofMsghdr = C.sizeof_struct_msghdr
- sizeofCmsghdr = C.sizeof_struct_cmsghdr
-
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/golang.org/x/net/internal/socket/defs_linux.go b/vendor/golang.org/x/net/internal/socket/defs_linux.go
deleted file mode 100644
index ce9ec2f..0000000
--- a/vendor/golang.org/x/net/internal/socket/defs_linux.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// 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 ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package socket
-
-/*
-#include <linux/in.h>
-#include <linux/in6.h>
-
-#define _GNU_SOURCE
-#include <sys/socket.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-)
-
-type iovec C.struct_iovec
-
-type msghdr C.struct_msghdr
-
-type mmsghdr C.struct_mmsghdr
-
-type cmsghdr C.struct_cmsghdr
-
-type sockaddrInet C.struct_sockaddr_in
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-const (
- sizeofIovec = C.sizeof_struct_iovec
- sizeofMsghdr = C.sizeof_struct_msghdr
- sizeofMmsghdr = C.sizeof_struct_mmsghdr
- sizeofCmsghdr = C.sizeof_struct_cmsghdr
-
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/golang.org/x/net/internal/socket/defs_netbsd.go b/vendor/golang.org/x/net/internal/socket/defs_netbsd.go
deleted file mode 100644
index 3f84335..0000000
--- a/vendor/golang.org/x/net/internal/socket/defs_netbsd.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// 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 ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package socket
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-)
-
-type iovec C.struct_iovec
-
-type msghdr C.struct_msghdr
-
-type mmsghdr C.struct_mmsghdr
-
-type cmsghdr C.struct_cmsghdr
-
-type sockaddrInet C.struct_sockaddr_in
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-const (
- sizeofIovec = C.sizeof_struct_iovec
- sizeofMsghdr = C.sizeof_struct_msghdr
- sizeofMmsghdr = C.sizeof_struct_mmsghdr
- sizeofCmsghdr = C.sizeof_struct_cmsghdr
-
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/golang.org/x/net/internal/socket/defs_openbsd.go b/vendor/golang.org/x/net/internal/socket/defs_openbsd.go
deleted file mode 100644
index 14e28c0..0000000
--- a/vendor/golang.org/x/net/internal/socket/defs_openbsd.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// 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 ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package socket
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-)
-
-type iovec C.struct_iovec
-
-type msghdr C.struct_msghdr
-
-type cmsghdr C.struct_cmsghdr
-
-type sockaddrInet C.struct_sockaddr_in
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-const (
- sizeofIovec = C.sizeof_struct_iovec
- sizeofMsghdr = C.sizeof_struct_msghdr
- sizeofCmsghdr = C.sizeof_struct_cmsghdr
-
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/golang.org/x/net/internal/socket/defs_solaris.go b/vendor/golang.org/x/net/internal/socket/defs_solaris.go
deleted file mode 100644
index 14e28c0..0000000
--- a/vendor/golang.org/x/net/internal/socket/defs_solaris.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// 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 ignore
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package socket
-
-/*
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-const (
- sysAF_UNSPEC = C.AF_UNSPEC
- sysAF_INET = C.AF_INET
- sysAF_INET6 = C.AF_INET6
-
- sysSOCK_RAW = C.SOCK_RAW
-)
-
-type iovec C.struct_iovec
-
-type msghdr C.struct_msghdr
-
-type cmsghdr C.struct_cmsghdr
-
-type sockaddrInet C.struct_sockaddr_in
-
-type sockaddrInet6 C.struct_sockaddr_in6
-
-const (
- sizeofIovec = C.sizeof_struct_iovec
- sizeofMsghdr = C.sizeof_struct_msghdr
- sizeofCmsghdr = C.sizeof_struct_cmsghdr
-
- sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
-)
diff --git a/vendor/golang.org/x/net/internal/socket/empty.s b/vendor/golang.org/x/net/internal/socket/empty.s
new file mode 100644
index 0000000..bff0231
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/empty.s
@@ -0,0 +1,7 @@
+// Copyright 2018 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,go1.12
+
+// This exists solely so we can linkname in symbols from syscall.
diff --git a/vendor/golang.org/x/net/internal/socket/error_unix.go b/vendor/golang.org/x/net/internal/socket/error_unix.go
index 93dff91..47f0d6e 100644
--- a/vendor/golang.org/x/net/internal/socket/error_unix.go
+++ b/vendor/golang.org/x/net/internal/socket/error_unix.go
@@ -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 dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package socket
diff --git a/vendor/golang.org/x/net/internal/socket/iovec_64bit.go b/vendor/golang.org/x/net/internal/socket/iovec_64bit.go
index afb34ad..0309e10 100644
--- a/vendor/golang.org/x/net/internal/socket/iovec_64bit.go
+++ b/vendor/golang.org/x/net/internal/socket/iovec_64bit.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build arm64 amd64 ppc64 ppc64le mips64 mips64le s390x
-// +build darwin dragonfly freebsd linux netbsd openbsd
+// +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
+// +build aix darwin dragonfly freebsd linux netbsd openbsd zos
package socket
diff --git a/vendor/golang.org/x/net/internal/socket/iovec_stub.go b/vendor/golang.org/x/net/internal/socket/iovec_stub.go
index c87d2a9..f44d4f5 100644
--- a/vendor/golang.org/x/net/internal/socket/iovec_stub.go
+++ b/vendor/golang.org/x/net/internal/socket/iovec_stub.go
@@ -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,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
package socket
diff --git a/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go b/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go
index 2e80a9c..1a7f279 100644
--- a/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go
+++ b/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go
@@ -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 !linux,!netbsd
+// +build !aix,!linux,!netbsd
package socket
diff --git a/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go b/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go
index 3c42ea7..f110068 100644
--- a/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go
+++ b/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go
@@ -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 linux netbsd
+// +build aix linux netbsd
package socket
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go b/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go
index 5567afc..77f44c1 100644
--- a/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go
@@ -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 dragonfly freebsd netbsd openbsd
+// +build aix darwin dragonfly freebsd netbsd openbsd
package socket
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go b/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go
index b8c87b7..c5562dd 100644
--- a/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go
@@ -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 dragonfly freebsd netbsd
+// +build aix darwin dragonfly freebsd netbsd
package socket
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go b/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go
index 610fc4f..e731833 100644
--- a/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go
@@ -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 arm64 amd64 ppc64 ppc64le mips64 mips64le s390x
+// +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
// +build linux
package socket
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_stub.go b/vendor/golang.org/x/net/internal/socket/msghdr_stub.go
index 64e8173..1a253d2 100644
--- a/vendor/golang.org/x/net/internal/socket/msghdr_stub.go
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_stub.go
@@ -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,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
package socket
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go b/vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go
new file mode 100644
index 0000000..eb1a99a
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go
@@ -0,0 +1,36 @@
+// Copyright 2020 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 s390x
+// +build zos
+
+package socket
+
+import "unsafe"
+
+func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
+ for i := range vs {
+ vs[i].set(bs[i])
+ }
+ if len(vs) > 0 {
+ h.Iov = &vs[0]
+ h.Iovlen = int32(len(vs))
+ }
+ if len(oob) > 0 {
+ h.Control = (*byte)(unsafe.Pointer(&oob[0]))
+ h.Controllen = uint32(len(oob))
+ }
+ if sa != nil {
+ h.Name = (*byte)(unsafe.Pointer(&sa[0]))
+ h.Namelen = uint32(len(sa))
+ }
+}
+
+func (h *msghdr) controllen() int {
+ return int(h.Controllen)
+}
+
+func (h *msghdr) flags() int {
+ return int(h.Flags)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/norace.go b/vendor/golang.org/x/net/internal/socket/norace.go
new file mode 100644
index 0000000..9519ffb
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/norace.go
@@ -0,0 +1,12 @@
+// Copyright 2019 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 !race
+
+package socket
+
+func (m *Message) raceRead() {
+}
+func (m *Message) raceWrite() {
+}
diff --git a/vendor/golang.org/x/net/internal/socket/race.go b/vendor/golang.org/x/net/internal/socket/race.go
new file mode 100644
index 0000000..df60c62
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/race.go
@@ -0,0 +1,37 @@
+// Copyright 2019 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 race
+
+package socket
+
+import (
+ "runtime"
+ "unsafe"
+)
+
+// This package reads and writes the Message buffers using a
+// direct system call, which the race detector can't see.
+// These functions tell the race detector what is going on during the syscall.
+
+func (m *Message) raceRead() {
+ for _, b := range m.Buffers {
+ if len(b) > 0 {
+ runtime.RaceReadRange(unsafe.Pointer(&b[0]), len(b))
+ }
+ }
+ if b := m.OOB; len(b) > 0 {
+ runtime.RaceReadRange(unsafe.Pointer(&b[0]), len(b))
+ }
+}
+func (m *Message) raceWrite() {
+ for _, b := range m.Buffers {
+ if len(b) > 0 {
+ runtime.RaceWriteRange(unsafe.Pointer(&b[0]), len(b))
+ }
+ }
+ if b := m.OOB; len(b) > 0 {
+ runtime.RaceWriteRange(unsafe.Pointer(&b[0]), len(b))
+ }
+}
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn.go b/vendor/golang.org/x/net/internal/socket/rawconn.go
index d6871d5..b07b890 100644
--- a/vendor/golang.org/x/net/internal/socket/rawconn.go
+++ b/vendor/golang.org/x/net/internal/socket/rawconn.go
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build go1.9
-
package socket
import (
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go b/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go
index 499164a..d01fc4c 100644
--- a/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go
+++ b/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build go1.9
// +build linux
package socket
@@ -14,6 +13,9 @@ import (
)
func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
+ for i := range ms {
+ ms[i].raceWrite()
+ }
hs := make(mmsghdrs, len(ms))
var parseFn func([]byte, string) (net.Addr, error)
if c.network != "tcp" {
@@ -44,6 +46,9 @@ func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
}
func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) {
+ for i := range ms {
+ ms[i].raceRead()
+ }
hs := make(mmsghdrs, len(ms))
var marshalFn func(net.Addr) []byte
if c.network != "tcp" {
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn_msg.go b/vendor/golang.org/x/net/internal/socket/rawconn_msg.go
index b21d2e6..610b1a1 100644
--- a/vendor/golang.org/x/net/internal/socket/rawconn_msg.go
+++ b/vendor/golang.org/x/net/internal/socket/rawconn_msg.go
@@ -2,17 +2,18 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build go1.9
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
package socket
import (
"os"
+ "runtime"
"syscall"
)
func (c *Conn) recvMsg(m *Message, flags int) error {
+ m.raceWrite()
var h msghdr
vs := make([]iovec, len(m.Buffers))
var sa []byte
@@ -24,7 +25,7 @@ func (c *Conn) recvMsg(m *Message, flags int) error {
var n int
fn := func(s uintptr) bool {
n, operr = recvmsg(s, &h, flags)
- if operr == syscall.EAGAIN {
+ if operr == syscall.EAGAIN || (runtime.GOOS == "zos" && operr == syscall.EWOULDBLOCK) {
return false
}
return true
@@ -49,6 +50,7 @@ func (c *Conn) recvMsg(m *Message, flags int) error {
}
func (c *Conn) sendMsg(m *Message, flags int) error {
+ m.raceRead()
var h msghdr
vs := make([]iovec, len(m.Buffers))
var sa []byte
@@ -60,7 +62,7 @@ func (c *Conn) sendMsg(m *Message, flags int) error {
var n int
fn := func(s uintptr) bool {
n, operr = sendmsg(s, &h, flags)
- if operr == syscall.EAGAIN {
+ if operr == syscall.EAGAIN || (runtime.GOOS == "zos" && operr == syscall.EWOULDBLOCK) {
return false
}
return true
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go b/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go
index f78832a..fe5bb94 100644
--- a/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go
+++ b/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go
@@ -2,17 +2,14 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build go1.9
// +build !linux
package socket
-import "errors"
-
func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go b/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go
index 96733cb..e51b60d 100644
--- a/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go
+++ b/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go
@@ -2,17 +2,14 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build go1.9
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
package socket
-import "errors"
-
func (c *Conn) recvMsg(m *Message, flags int) error {
- return errors.New("not implemented")
+ return errNotImplemented
}
func (c *Conn) sendMsg(m *Message, flags int) error {
- return errors.New("not implemented")
+ return errNotImplemented
}
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn_stub.go b/vendor/golang.org/x/net/internal/socket/rawconn_stub.go
deleted file mode 100644
index d2add1a..0000000
--- a/vendor/golang.org/x/net/internal/socket/rawconn_stub.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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 socket
-
-import "errors"
-
-func (c *Conn) recvMsg(m *Message, flags int) error {
- return errors.New("not implemented")
-}
-
-func (c *Conn) sendMsg(m *Message, flags int) error {
- return errors.New("not implemented")
-}
-
-func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
-
-func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) {
- return 0, errors.New("not implemented")
-}
diff --git a/vendor/golang.org/x/net/internal/socket/reflect.go b/vendor/golang.org/x/net/internal/socket/reflect.go
deleted file mode 100644
index bb179f1..0000000
--- a/vendor/golang.org/x/net/internal/socket/reflect.go
+++ /dev/null
@@ -1,62 +0,0 @@
-// 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 socket
-
-import (
- "errors"
- "net"
- "os"
- "reflect"
- "runtime"
-)
-
-// A Conn represents a raw connection.
-type Conn struct {
- c net.Conn
-}
-
-// NewConn returns a new raw connection.
-func NewConn(c net.Conn) (*Conn, error) {
- return &Conn{c: c}, nil
-}
-
-func (o *Option) get(c *Conn, b []byte) (int, error) {
- s, err := socketOf(c.c)
- if err != nil {
- return 0, err
- }
- n, err := getsockopt(s, o.Level, o.Name, b)
- return n, os.NewSyscallError("getsockopt", err)
-}
-
-func (o *Option) set(c *Conn, b []byte) error {
- s, err := socketOf(c.c)
- if err != nil {
- return err
- }
- return os.NewSyscallError("setsockopt", setsockopt(s, o.Level, o.Name, b))
-}
-
-func socketOf(c net.Conn) (uintptr, error) {
- switch c.(type) {
- case *net.TCPConn, *net.UDPConn, *net.IPConn:
- v := reflect.ValueOf(c)
- switch e := v.Elem(); e.Kind() {
- case reflect.Struct:
- fd := e.FieldByName("conn").FieldByName("fd")
- switch e := fd.Elem(); e.Kind() {
- case reflect.Struct:
- sysfd := e.FieldByName("sysfd")
- if runtime.GOOS == "windows" {
- return uintptr(sysfd.Uint()), nil
- }
- return uintptr(sysfd.Int()), nil
- }
- }
- }
- return 0, errors.New("invalid type")
-}
diff --git a/vendor/golang.org/x/net/internal/socket/socket.go b/vendor/golang.org/x/net/internal/socket/socket.go
index 5f9730e..dba47bf 100644
--- a/vendor/golang.org/x/net/internal/socket/socket.go
+++ b/vendor/golang.org/x/net/internal/socket/socket.go
@@ -9,9 +9,12 @@ package socket // import "golang.org/x/net/internal/socket"
import (
"errors"
"net"
+ "runtime"
"unsafe"
)
+var errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH)
+
// An Option represents a sticky socket option.
type Option struct {
Level int // level
@@ -87,17 +90,9 @@ func (o *Option) SetInt(c *Conn, v int) error {
return o.set(c, b)
}
-func controlHeaderLen() int {
- return roundup(sizeofCmsghdr)
-}
-
-func controlMessageLen(dataLen int) int {
- return roundup(sizeofCmsghdr) + dataLen
-}
-
// ControlMessageSpace returns the whole length of control message.
func ControlMessageSpace(dataLen int) int {
- return roundup(sizeofCmsghdr) + roundup(dataLen)
+ return controlMessageSpace(dataLen)
}
// A ControlMessage represents the head message in a stream of control
diff --git a/vendor/golang.org/x/net/internal/socket/sys.go b/vendor/golang.org/x/net/internal/socket/sys.go
index 4f0eead..4a26af1 100644
--- a/vendor/golang.org/x/net/internal/socket/sys.go
+++ b/vendor/golang.org/x/net/internal/socket/sys.go
@@ -9,13 +9,8 @@ import (
"unsafe"
)
-var (
- // NativeEndian is the machine native endian implementation of
- // ByteOrder.
- NativeEndian binary.ByteOrder
-
- kernelAlign int
-)
+// NativeEndian is the machine native endian implementation of ByteOrder.
+var NativeEndian binary.ByteOrder
func init() {
i := uint32(1)
@@ -25,9 +20,4 @@ func init() {
} else {
NativeEndian = binary.BigEndian
}
- kernelAlign = probeProtocolStack()
-}
-
-func roundup(l int) int {
- return (l + kernelAlign - 1) & ^(kernelAlign - 1)
}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_bsd.go b/vendor/golang.org/x/net/internal/socket/sys_bsd.go
index f13e14f..d432835 100644
--- a/vendor/golang.org/x/net/internal/socket/sys_bsd.go
+++ b/vendor/golang.org/x/net/internal/socket/sys_bsd.go
@@ -2,16 +2,14 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd openbsd
+// +build aix darwin dragonfly freebsd openbsd
package socket
-import "errors"
-
func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go b/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go
deleted file mode 100644
index f723fa3..0000000
--- a/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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 freebsd netbsd openbsd
-
-package socket
-
-import "unsafe"
-
-func probeProtocolStack() int {
- var p uintptr
- return int(unsafe.Sizeof(p))
-}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_const_unix.go b/vendor/golang.org/x/net/internal/socket/sys_const_unix.go
new file mode 100644
index 0000000..43797d6
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_const_unix.go
@@ -0,0 +1,17 @@
+// Copyright 2019 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 aix darwin dragonfly freebsd linux netbsd openbsd solaris
+
+package socket
+
+import "golang.org/x/sys/unix"
+
+const (
+ sysAF_UNSPEC = unix.AF_UNSPEC
+ sysAF_INET = unix.AF_INET
+ sysAF_INET6 = unix.AF_INET6
+
+ sysSOCK_RAW = unix.SOCK_RAW
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_const_zos.go b/vendor/golang.org/x/net/internal/socket/sys_const_zos.go
new file mode 100644
index 0000000..01b6372
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_const_zos.go
@@ -0,0 +1,17 @@
+// Copyright 2020 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 zos
+
+package socket
+
+import "syscall"
+
+const (
+ sysAF_UNSPEC = syscall.AF_UNSPEC
+ sysAF_INET = syscall.AF_INET
+ sysAF_INET6 = syscall.AF_INET6
+
+ sysSOCK_RAW = syscall.SOCK_RAW
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_darwin.go b/vendor/golang.org/x/net/internal/socket/sys_darwin.go
deleted file mode 100644
index b17d223..0000000
--- a/vendor/golang.org/x/net/internal/socket/sys_darwin.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// 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 socket
-
-func probeProtocolStack() int { return 4 }
diff --git a/vendor/golang.org/x/net/internal/socket/sys_dragonfly.go b/vendor/golang.org/x/net/internal/socket/sys_dragonfly.go
deleted file mode 100644
index b17d223..0000000
--- a/vendor/golang.org/x/net/internal/socket/sys_dragonfly.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// 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 socket
-
-func probeProtocolStack() int { return 4 }
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linkname.go b/vendor/golang.org/x/net/internal/socket/sys_linkname.go
new file mode 100644
index 0000000..61c3f38
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linkname.go
@@ -0,0 +1,42 @@
+// Copyright 2018 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 aix go1.12,darwin
+
+package socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+//go:linkname syscall_getsockopt syscall.getsockopt
+func syscall_getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *uint32) error
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ l := uint32(len(b))
+ err := syscall_getsockopt(int(s), level, name, unsafe.Pointer(&b[0]), &l)
+ return int(l), err
+}
+
+//go:linkname syscall_setsockopt syscall.setsockopt
+func syscall_setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ return syscall_setsockopt(int(s), level, name, unsafe.Pointer(&b[0]), uintptr(len(b)))
+}
+
+//go:linkname syscall_recvmsg syscall.recvmsg
+func syscall_recvmsg(s int, msg *syscall.Msghdr, flags int) (n int, err error)
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ return syscall_recvmsg(int(s), (*syscall.Msghdr)(unsafe.Pointer(h)), flags)
+}
+
+//go:linkname syscall_sendmsg syscall.sendmsg
+func syscall_sendmsg(s int, msg *syscall.Msghdr, flags int) (n int, err error)
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ return syscall_sendmsg(int(s), (*syscall.Msghdr)(unsafe.Pointer(h)), flags)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux.go b/vendor/golang.org/x/net/internal/socket/sys_linux.go
index 1559521..8b03cd6 100644
--- a/vendor/golang.org/x/net/internal/socket/sys_linux.go
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux.go
@@ -11,11 +11,6 @@ import (
"unsafe"
)
-func probeProtocolStack() int {
- var p uintptr
- return int(unsafe.Sizeof(p))
-}
-
func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
return int(n), errnoErr(errno)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_386.go b/vendor/golang.org/x/net/internal/socket/sys_linux_386.go
index 235b2cc..6512153 100644
--- a/vendor/golang.org/x/net/internal/socket/sys_linux_386.go
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_386.go
@@ -9,8 +9,6 @@ import (
"unsafe"
)
-func probeProtocolStack() int { return 4 }
-
const (
sysSETSOCKOPT = 0xe
sysGETSOCKOPT = 0xf
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go b/vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go
new file mode 100644
index 0000000..64f69f1
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go
@@ -0,0 +1,12 @@
+// Copyright 2019 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 riscv64
+
+package socket
+
+const (
+ sysRECVMMSG = 0xf3
+ sysSENDMMSG = 0x10d
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go b/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go
index 327979e..6512153 100644
--- a/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go
@@ -9,8 +9,6 @@ import (
"unsafe"
)
-func probeProtocolStack() int { return 8 }
-
const (
sysSETSOCKOPT = 0xe
sysGETSOCKOPT = 0xf
diff --git a/vendor/golang.org/x/net/internal/socket/sys_posix.go b/vendor/golang.org/x/net/internal/socket/sys_posix.go
index dc130c2..05ded23 100644
--- a/vendor/golang.org/x/net/internal/socket/sys_posix.go
+++ b/vendor/golang.org/x/net/internal/socket/sys_posix.go
@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build go1.9
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
package socket
@@ -34,7 +33,7 @@ func marshalSockaddr(ip net.IP, port int, zone string) []byte {
if ip4 := ip.To4(); ip4 != nil {
b := make([]byte, sizeofSockaddrInet)
switch runtime.GOOS {
- case "android", "linux", "solaris", "windows":
+ case "android", "illumos", "linux", "solaris", "windows":
NativeEndian.PutUint16(b[:2], uint16(sysAF_INET))
default:
b[0] = sizeofSockaddrInet
@@ -47,7 +46,7 @@ func marshalSockaddr(ip net.IP, port int, zone string) []byte {
if ip6 := ip.To16(); ip6 != nil && ip.To4() == nil {
b := make([]byte, sizeofSockaddrInet6)
switch runtime.GOOS {
- case "android", "linux", "solaris", "windows":
+ case "android", "illumos", "linux", "solaris", "windows":
NativeEndian.PutUint16(b[:2], uint16(sysAF_INET6))
default:
b[0] = sizeofSockaddrInet6
@@ -69,7 +68,7 @@ func parseInetAddr(b []byte, network string) (net.Addr, error) {
}
var af int
switch runtime.GOOS {
- case "android", "linux", "solaris", "windows":
+ case "android", "illumos", "linux", "solaris", "windows":
af = int(NativeEndian.Uint16(b[:2]))
default:
af = int(b[1])
@@ -121,18 +120,21 @@ var zoneCache = ipv6ZoneCache{
toName: make(map[int]string),
}
-func (zc *ipv6ZoneCache) update(ift []net.Interface) {
+// update refreshes the network interface information if the cache was last
+// updated more than 1 minute ago, or if force is set. It returns whether the
+// cache was updated.
+func (zc *ipv6ZoneCache) update(ift []net.Interface, force bool) (updated bool) {
zc.Lock()
defer zc.Unlock()
now := time.Now()
- if zc.lastFetched.After(now.Add(-60 * time.Second)) {
- return
+ if !force && zc.lastFetched.After(now.Add(-60*time.Second)) {
+ return false
}
zc.lastFetched = now
if len(ift) == 0 {
var err error
if ift, err = net.Interfaces(); err != nil {
- return
+ return false
}
}
zc.toIndex = make(map[string]int, len(ift))
@@ -143,25 +145,38 @@ func (zc *ipv6ZoneCache) update(ift []net.Interface) {
zc.toName[ifi.Index] = ifi.Name
}
}
+ return true
}
func (zc *ipv6ZoneCache) name(zone int) string {
- zoneCache.update(nil)
+ updated := zoneCache.update(nil, false)
zoneCache.RLock()
- defer zoneCache.RUnlock()
name, ok := zoneCache.toName[zone]
- if !ok {
+ zoneCache.RUnlock()
+ if !ok && !updated {
+ zoneCache.update(nil, true)
+ zoneCache.RLock()
+ name, ok = zoneCache.toName[zone]
+ zoneCache.RUnlock()
+ }
+ if !ok { // last resort
name = strconv.Itoa(zone)
}
return name
}
func (zc *ipv6ZoneCache) index(zone string) int {
- zoneCache.update(nil)
+ updated := zoneCache.update(nil, false)
zoneCache.RLock()
- defer zoneCache.RUnlock()
index, ok := zoneCache.toIndex[zone]
- if !ok {
+ zoneCache.RUnlock()
+ if !ok && !updated {
+ zoneCache.update(nil, true)
+ zoneCache.RLock()
+ index, ok = zoneCache.toIndex[zone]
+ zoneCache.RUnlock()
+ }
+ if !ok { // last resort
index, _ = strconv.Atoi(zone)
}
return index
diff --git a/vendor/golang.org/x/net/internal/socket/sys_solaris.go b/vendor/golang.org/x/net/internal/socket/sys_solaris.go
index cced74e..e79ca95 100644
--- a/vendor/golang.org/x/net/internal/socket/sys_solaris.go
+++ b/vendor/golang.org/x/net/internal/socket/sys_solaris.go
@@ -5,22 +5,10 @@
package socket
import (
- "errors"
- "runtime"
"syscall"
"unsafe"
)
-func probeProtocolStack() int {
- switch runtime.GOARCH {
- case "amd64":
- return 4
- default:
- var p uintptr
- return int(unsafe.Sizeof(p))
- }
-}
-
//go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so"
//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
//go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so"
@@ -63,9 +51,9 @@ func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
}
func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_stub.go b/vendor/golang.org/x/net/internal/socket/sys_stub.go
index d9f06d0..3c97008 100644
--- a/vendor/golang.org/x/net/internal/socket/sys_stub.go
+++ b/vendor/golang.org/x/net/internal/socket/sys_stub.go
@@ -2,16 +2,11 @@
// 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,!solaris,!windows
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
package socket
-import (
- "errors"
- "net"
- "runtime"
- "unsafe"
-)
+import "net"
const (
sysAF_UNSPEC = 0x0
@@ -21,44 +16,34 @@ const (
sysSOCK_RAW = 0x3
)
-func probeProtocolStack() int {
- switch runtime.GOARCH {
- case "amd64p32", "mips64p32":
- return 4
- default:
- var p uintptr
- return int(unsafe.Sizeof(p))
- }
-}
-
func marshalInetAddr(ip net.IP, port int, zone string) []byte {
return nil
}
func parseInetAddr(b []byte, network string) (net.Addr, error) {
- return nil, errors.New("not implemented")
+ return nil, errNotImplemented
}
func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
func setsockopt(s uintptr, level, name int, b []byte) error {
- return errors.New("not implemented")
+ return errNotImplemented
}
func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_unix.go b/vendor/golang.org/x/net/internal/socket/sys_unix.go
index 18eba30..0eb7128 100644
--- a/vendor/golang.org/x/net/internal/socket/sys_unix.go
+++ b/vendor/golang.org/x/net/internal/socket/sys_unix.go
@@ -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 dragonfly freebsd linux,!s390x,!386 netbsd openbsd
+// +build dragonfly freebsd linux,!s390x,!386 netbsd openbsd
package socket
diff --git a/vendor/golang.org/x/net/internal/socket/sys_windows.go b/vendor/golang.org/x/net/internal/socket/sys_windows.go
index 54a470e..d556a44 100644
--- a/vendor/golang.org/x/net/internal/socket/sys_windows.go
+++ b/vendor/golang.org/x/net/internal/socket/sys_windows.go
@@ -5,9 +5,10 @@
package socket
import (
- "errors"
"syscall"
"unsafe"
+
+ "golang.org/x/sys/windows"
)
func probeProtocolStack() int {
@@ -16,11 +17,11 @@ func probeProtocolStack() int {
}
const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x17
+ sysAF_UNSPEC = windows.AF_UNSPEC
+ sysAF_INET = windows.AF_INET
+ sysAF_INET6 = windows.AF_INET6
- sysSOCK_RAW = 0x3
+ sysSOCK_RAW = windows.SOCK_RAW
)
type sockaddrInet struct {
@@ -54,17 +55,17 @@ func setsockopt(s uintptr, level, name int, b []byte) error {
}
func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
- return 0, errors.New("not implemented")
+ return 0, errNotImplemented
}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_zos_s390x.go b/vendor/golang.org/x/net/internal/socket/sys_zos_s390x.go
new file mode 100644
index 0000000..1e38b92
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_zos_s390x.go
@@ -0,0 +1,38 @@
+// Copyright 2020 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 socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+func syscall_syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
+func syscall_syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
+
+func probeProtocolStack() int {
+ return 4 // sizeof(int) on GOOS=zos GOARCH=s390x
+}
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ l := uint32(len(b))
+ _, _, errno := syscall_syscall6(syscall.SYS_GETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0)
+ return int(l), errnoErr(errno)
+}
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ _, _, errno := syscall_syscall6(syscall.SYS_SETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0)
+ return errnoErr(errno)
+}
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, _, errno := syscall_syscall(syscall.SYS___RECVMSG_A, s, uintptr(unsafe.Pointer(h)), uintptr(flags))
+ return int(n), errnoErr(errno)
+}
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, _, errno := syscall_syscall(syscall.SYS___SENDMSG_A, s, uintptr(unsafe.Pointer(h)), uintptr(flags))
+ return int(n), errnoErr(errno)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_zos_s390x.s b/vendor/golang.org/x/net/internal/socket/sys_zos_s390x.s
new file mode 100644
index 0000000..60d5839
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_zos_s390x.s
@@ -0,0 +1,11 @@
+// Copyright 2020 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 ·syscall_syscall(SB),NOSPLIT,$0
+ JMP syscall·_syscall(SB)
+
+TEXT ·syscall_syscall6(SB),NOSPLIT,$0
+ JMP syscall·_syscall6(SB)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go b/vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go
new file mode 100644
index 0000000..93d923a
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go
@@ -0,0 +1,59 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_aix.go
+
+// Added for go1.11 compatibility
+// +build aix
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]uint8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go b/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go
index 26f8fef..150f980 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_darwin.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1e
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint32
@@ -50,9 +42,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go
index e2987f7..a686c95 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_darwin.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1e
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint64
@@ -52,9 +44,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x30
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go
index 26f8fef..150f980 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_darwin.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1e
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint32
@@ -50,9 +42,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go b/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go
index e2987f7..a686c95 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_darwin.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1e
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint64
@@ -52,9 +44,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x30
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go
index c582abd..d45c197 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_dragonfly.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1c
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint64
@@ -52,9 +44,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x30
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go
index 04a2488..ffec860 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_freebsd.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1c
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint32
@@ -50,9 +42,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go
index 35c7cb9..aa701ab 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_freebsd.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1c
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint64
@@ -52,9 +44,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x30
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go
index 04a2488..ffec860 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_freebsd.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1c
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint32
@@ -50,9 +42,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm64.go b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm64.go
new file mode 100644
index 0000000..aa701ab
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm64.go
@@ -0,0 +1,52 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_freebsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go
index 4302069..0c847be 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_linux.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint32
@@ -53,10 +45,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go
index 1502f6c..15e2aec 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_linux.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint64
@@ -56,10 +48,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0x10
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go
index 4302069..0c847be 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_linux.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint32
@@ -53,10 +45,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go
index 1502f6c..15e2aec 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_linux.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint64
@@ -56,10 +48,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0x10
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go
index 4302069..0c847be 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_linux.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint32
@@ -53,10 +45,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go
index 1502f6c..15e2aec 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_linux.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint64
@@ -56,10 +48,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0x10
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go
index 1502f6c..15e2aec 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_linux.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint64
@@ -56,10 +48,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0x10
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go
index 4302069..0c847be 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_linux.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint32
@@ -53,10 +45,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go
index 1502f6c..15e2aec 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_linux.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint64
@@ -56,10 +48,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0x10
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go
index 1502f6c..15e2aec 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_linux.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint64
@@ -56,10 +48,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0x10
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go
new file mode 100644
index 0000000..8640c03
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go
@@ -0,0 +1,57 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+// +build riscv64
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_0 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go
index 1502f6c..15e2aec 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_linux.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0xa
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint64
@@ -56,10 +48,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0x10
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go
index db60491..6b72d24 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_netbsd.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x18
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint32
@@ -55,10 +47,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go
index 2a1a799..9aaa4ab 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_netbsd.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x18
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint64
@@ -58,10 +50,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x30
- sizeofMmsghdr = 0x40
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go
index 206ea2d..6b72d24 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_netbsd.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x18
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint32
@@ -26,6 +18,11 @@ type msghdr struct {
Flags int32
}
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+}
+
type cmsghdr struct {
Len uint32
Level int32
@@ -50,9 +47,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm64.go b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm64.go
new file mode 100644
index 0000000..9aaa4ab
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm64.go
@@ -0,0 +1,58 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_netbsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go
index 1c83636..3ec8d42 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_openbsd.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x18
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint32
@@ -50,9 +42,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go
index a6c0bf4..ea0ee00 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_openbsd.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x18
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint64
@@ -52,9 +44,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x30
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go
index 1c83636..3ec8d42 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_openbsd.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x18
-
- sysSOCK_RAW = 0x3
-)
-
type iovec struct {
Base *byte
Len uint32
@@ -50,9 +42,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x1c
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm64.go b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm64.go
new file mode 100644
index 0000000..ea0ee00
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm64.go
@@ -0,0 +1,52 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_openbsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_mips64.go b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_mips64.go
new file mode 100644
index 0000000..0112832
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_mips64.go
@@ -0,0 +1,50 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_openbsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go
index 327c632..48b2b59 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go
@@ -1,16 +1,8 @@
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_solaris.go
package socket
-const (
- sysAF_UNSPEC = 0x0
- sysAF_INET = 0x2
- sysAF_INET6 = 0x1a
-
- sysSOCK_RAW = 0x4
-)
-
type iovec struct {
Base *int8
Len uint64
@@ -51,9 +43,8 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x30
- sizeofCmsghdr = 0xc
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
sizeofSockaddrInet = 0x10
sizeofSockaddrInet6 = 0x20
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_zos_s390x.go b/vendor/golang.org/x/net/internal/socket/zsys_zos_s390x.go
new file mode 100644
index 0000000..514ca37
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_zos_s390x.go
@@ -0,0 +1,32 @@
+// Copyright 2020 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 socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Iov *iovec
+ Control *byte
+ Flags int32
+ Namelen uint32
+ Iovlen int32
+ Controllen uint32
+}
+
+type cmsghdr struct {
+ Len int32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofCmsghdr = 12
+ sizeofSockaddrInet = 16
+ sizeofSockaddrInet6 = 28
+)