Update all dependencies
This commit is contained in:
parent
628dc66685
commit
47bc78b80a
365 changed files with 37935 additions and 16866 deletions
9
vendor/golang.org/x/net/ipv4/batch.go
generated
vendored
9
vendor/golang.org/x/net/ipv4/batch.go
generated
vendored
|
@ -9,7 +9,6 @@ package ipv4
|
|||
import (
|
||||
"net"
|
||||
"runtime"
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/net/internal/socket"
|
||||
)
|
||||
|
@ -76,7 +75,7 @@ type Message = socket.Message
|
|||
// headers.
|
||||
func (c *payloadHandler) ReadBatch(ms []Message, flags int) (int, error) {
|
||||
if !c.ok() {
|
||||
return 0, syscall.EINVAL
|
||||
return 0, errInvalidConn
|
||||
}
|
||||
switch runtime.GOOS {
|
||||
case "linux":
|
||||
|
@ -107,7 +106,7 @@ func (c *payloadHandler) ReadBatch(ms []Message, flags int) (int, error) {
|
|||
// On other platforms, this method will write only a single message.
|
||||
func (c *payloadHandler) WriteBatch(ms []Message, flags int) (int, error) {
|
||||
if !c.ok() {
|
||||
return 0, syscall.EINVAL
|
||||
return 0, errInvalidConn
|
||||
}
|
||||
switch runtime.GOOS {
|
||||
case "linux":
|
||||
|
@ -139,7 +138,7 @@ func (c *payloadHandler) WriteBatch(ms []Message, flags int) (int, error) {
|
|||
// On other platforms, this method will read only a single message.
|
||||
func (c *packetHandler) ReadBatch(ms []Message, flags int) (int, error) {
|
||||
if !c.ok() {
|
||||
return 0, syscall.EINVAL
|
||||
return 0, errInvalidConn
|
||||
}
|
||||
switch runtime.GOOS {
|
||||
case "linux":
|
||||
|
@ -170,7 +169,7 @@ func (c *packetHandler) ReadBatch(ms []Message, flags int) (int, error) {
|
|||
// On other platforms, this method will write only a single message.
|
||||
func (c *packetHandler) WriteBatch(ms []Message, flags int) (int, error) {
|
||||
if !c.ok() {
|
||||
return 0, syscall.EINVAL
|
||||
return 0, errInvalidConn
|
||||
}
|
||||
switch runtime.GOOS {
|
||||
case "linux":
|
||||
|
|
31
vendor/golang.org/x/net/ipv4/dgramopt.go
generated
vendored
31
vendor/golang.org/x/net/ipv4/dgramopt.go
generated
vendored
|
@ -6,7 +6,6 @@ package ipv4
|
|||
|
||||
import (
|
||||
"net"
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/net/bpf"
|
||||
)
|
||||
|
@ -15,7 +14,7 @@ import (
|
|||
// multicast packets.
|
||||
func (c *dgramOpt) MulticastTTL() (int, error) {
|
||||
if !c.ok() {
|
||||
return 0, syscall.EINVAL
|
||||
return 0, errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoMulticastTTL]
|
||||
if !ok {
|
||||
|
@ -28,7 +27,7 @@ func (c *dgramOpt) MulticastTTL() (int, error) {
|
|||
// outgoing multicast packets.
|
||||
func (c *dgramOpt) SetMulticastTTL(ttl int) error {
|
||||
if !c.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoMulticastTTL]
|
||||
if !ok {
|
||||
|
@ -41,7 +40,7 @@ func (c *dgramOpt) SetMulticastTTL(ttl int) error {
|
|||
// packet transmissions.
|
||||
func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
|
||||
if !c.ok() {
|
||||
return nil, syscall.EINVAL
|
||||
return nil, errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoMulticastInterface]
|
||||
if !ok {
|
||||
|
@ -54,7 +53,7 @@ func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
|
|||
// multicast packet transmissions.
|
||||
func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
|
||||
if !c.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoMulticastInterface]
|
||||
if !ok {
|
||||
|
@ -67,7 +66,7 @@ func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
|
|||
// should be copied and send back to the originator.
|
||||
func (c *dgramOpt) MulticastLoopback() (bool, error) {
|
||||
if !c.ok() {
|
||||
return false, syscall.EINVAL
|
||||
return false, errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoMulticastLoopback]
|
||||
if !ok {
|
||||
|
@ -84,7 +83,7 @@ func (c *dgramOpt) MulticastLoopback() (bool, error) {
|
|||
// should be copied and send back to the originator.
|
||||
func (c *dgramOpt) SetMulticastLoopback(on bool) error {
|
||||
if !c.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoMulticastLoopback]
|
||||
if !ok {
|
||||
|
@ -104,7 +103,7 @@ func (c *dgramOpt) SetMulticastLoopback(on bool) error {
|
|||
// configuration.
|
||||
func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
|
||||
if !c.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoJoinGroup]
|
||||
if !ok {
|
||||
|
@ -122,7 +121,7 @@ func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
|
|||
// source-specific group.
|
||||
func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
|
||||
if !c.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoLeaveGroup]
|
||||
if !ok {
|
||||
|
@ -143,7 +142,7 @@ func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
|
|||
// routing configuration.
|
||||
func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
|
||||
if !c.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoJoinSourceGroup]
|
||||
if !ok {
|
||||
|
@ -164,7 +163,7 @@ func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net
|
|||
// interface ifi.
|
||||
func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
|
||||
if !c.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoLeaveSourceGroup]
|
||||
if !ok {
|
||||
|
@ -186,7 +185,7 @@ func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source ne
|
|||
// ifi.
|
||||
func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
|
||||
if !c.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoBlockSourceGroup]
|
||||
if !ok {
|
||||
|
@ -207,7 +206,7 @@ func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source
|
|||
// group by ExcludeSourceSpecificGroup again on the interface ifi.
|
||||
func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
|
||||
if !c.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoUnblockSourceGroup]
|
||||
if !ok {
|
||||
|
@ -228,7 +227,7 @@ func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source
|
|||
// Currently only Linux supports this.
|
||||
func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
|
||||
if !c.ok() {
|
||||
return nil, syscall.EINVAL
|
||||
return nil, errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoICMPFilter]
|
||||
if !ok {
|
||||
|
@ -241,7 +240,7 @@ func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
|
|||
// Currently only Linux supports this.
|
||||
func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
|
||||
if !c.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoICMPFilter]
|
||||
if !ok {
|
||||
|
@ -255,7 +254,7 @@ func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
|
|||
// Only supported on Linux.
|
||||
func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error {
|
||||
if !c.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoAttachFilter]
|
||||
if !ok {
|
||||
|
|
4
vendor/golang.org/x/net/ipv4/doc.go
generated
vendored
4
vendor/golang.org/x/net/ipv4/doc.go
generated
vendored
|
@ -55,7 +55,7 @@
|
|||
// Multicasting
|
||||
//
|
||||
// The options for multicasting are available for net.UDPConn and
|
||||
// net.IPconn which are created as network connections that use the
|
||||
// net.IPConn which are created as network connections that use the
|
||||
// IPv4 transport. A few network facilities must be prepared before
|
||||
// you begin multicasting, at a minimum joining network interfaces and
|
||||
// multicast groups.
|
||||
|
@ -241,4 +241,4 @@
|
|||
// IncludeSourceSpecificGroup may return an error.
|
||||
package ipv4 // import "golang.org/x/net/ipv4"
|
||||
|
||||
// BUG(mikio): This package is not implemented on NaCl and Plan 9.
|
||||
// BUG(mikio): This package is not implemented on JS, NaCl and Plan 9.
|
||||
|
|
21
vendor/golang.org/x/net/ipv4/endpoint.go
generated
vendored
21
vendor/golang.org/x/net/ipv4/endpoint.go
generated
vendored
|
@ -6,7 +6,6 @@ package ipv4
|
|||
|
||||
import (
|
||||
"net"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"golang.org/x/net/internal/socket"
|
||||
|
@ -58,7 +57,7 @@ func (c *dgramOpt) ok() bool { return c != nil && c.Conn != nil }
|
|||
// SetControlMessage sets the per packet IP-level socket options.
|
||||
func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error {
|
||||
if !c.payloadHandler.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
return setControlMessage(c.dgramOpt.Conn, &c.payloadHandler.rawOpt, cf, on)
|
||||
}
|
||||
|
@ -67,7 +66,7 @@ func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error {
|
|||
// endpoint.
|
||||
func (c *PacketConn) SetDeadline(t time.Time) error {
|
||||
if !c.payloadHandler.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
return c.payloadHandler.PacketConn.SetDeadline(t)
|
||||
}
|
||||
|
@ -76,7 +75,7 @@ func (c *PacketConn) SetDeadline(t time.Time) error {
|
|||
// endpoint.
|
||||
func (c *PacketConn) SetReadDeadline(t time.Time) error {
|
||||
if !c.payloadHandler.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
return c.payloadHandler.PacketConn.SetReadDeadline(t)
|
||||
}
|
||||
|
@ -85,7 +84,7 @@ func (c *PacketConn) SetReadDeadline(t time.Time) error {
|
|||
// endpoint.
|
||||
func (c *PacketConn) SetWriteDeadline(t time.Time) error {
|
||||
if !c.payloadHandler.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
return c.payloadHandler.PacketConn.SetWriteDeadline(t)
|
||||
}
|
||||
|
@ -93,7 +92,7 @@ func (c *PacketConn) SetWriteDeadline(t time.Time) error {
|
|||
// Close closes the endpoint.
|
||||
func (c *PacketConn) Close() error {
|
||||
if !c.payloadHandler.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
return c.payloadHandler.PacketConn.Close()
|
||||
}
|
||||
|
@ -124,7 +123,7 @@ type RawConn struct {
|
|||
// SetControlMessage sets the per packet IP-level socket options.
|
||||
func (c *RawConn) SetControlMessage(cf ControlFlags, on bool) error {
|
||||
if !c.packetHandler.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
return setControlMessage(c.dgramOpt.Conn, &c.packetHandler.rawOpt, cf, on)
|
||||
}
|
||||
|
@ -133,7 +132,7 @@ func (c *RawConn) SetControlMessage(cf ControlFlags, on bool) error {
|
|||
// endpoint.
|
||||
func (c *RawConn) SetDeadline(t time.Time) error {
|
||||
if !c.packetHandler.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
return c.packetHandler.IPConn.SetDeadline(t)
|
||||
}
|
||||
|
@ -142,7 +141,7 @@ func (c *RawConn) SetDeadline(t time.Time) error {
|
|||
// endpoint.
|
||||
func (c *RawConn) SetReadDeadline(t time.Time) error {
|
||||
if !c.packetHandler.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
return c.packetHandler.IPConn.SetReadDeadline(t)
|
||||
}
|
||||
|
@ -151,7 +150,7 @@ func (c *RawConn) SetReadDeadline(t time.Time) error {
|
|||
// endpoint.
|
||||
func (c *RawConn) SetWriteDeadline(t time.Time) error {
|
||||
if !c.packetHandler.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
return c.packetHandler.IPConn.SetWriteDeadline(t)
|
||||
}
|
||||
|
@ -159,7 +158,7 @@ func (c *RawConn) SetWriteDeadline(t time.Time) error {
|
|||
// Close closes the endpoint.
|
||||
func (c *RawConn) Close() error {
|
||||
if !c.packetHandler.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
return c.packetHandler.IPConn.Close()
|
||||
}
|
||||
|
|
10
vendor/golang.org/x/net/ipv4/genericopt.go
generated
vendored
10
vendor/golang.org/x/net/ipv4/genericopt.go
generated
vendored
|
@ -4,12 +4,10 @@
|
|||
|
||||
package ipv4
|
||||
|
||||
import "syscall"
|
||||
|
||||
// TOS returns the type-of-service field value for outgoing packets.
|
||||
func (c *genericOpt) TOS() (int, error) {
|
||||
if !c.ok() {
|
||||
return 0, syscall.EINVAL
|
||||
return 0, errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoTOS]
|
||||
if !ok {
|
||||
|
@ -22,7 +20,7 @@ func (c *genericOpt) TOS() (int, error) {
|
|||
// packets.
|
||||
func (c *genericOpt) SetTOS(tos int) error {
|
||||
if !c.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoTOS]
|
||||
if !ok {
|
||||
|
@ -34,7 +32,7 @@ func (c *genericOpt) SetTOS(tos int) error {
|
|||
// TTL returns the time-to-live field value for outgoing packets.
|
||||
func (c *genericOpt) TTL() (int, error) {
|
||||
if !c.ok() {
|
||||
return 0, syscall.EINVAL
|
||||
return 0, errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoTTL]
|
||||
if !ok {
|
||||
|
@ -47,7 +45,7 @@ func (c *genericOpt) TTL() (int, error) {
|
|||
// packets.
|
||||
func (c *genericOpt) SetTTL(ttl int) error {
|
||||
if !c.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
so, ok := sockOpts[ssoTTL]
|
||||
if !ok {
|
||||
|
|
17
vendor/golang.org/x/net/ipv4/header.go
generated
vendored
17
vendor/golang.org/x/net/ipv4/header.go
generated
vendored
|
@ -9,7 +9,6 @@ import (
|
|||
"fmt"
|
||||
"net"
|
||||
"runtime"
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/net/internal/socket"
|
||||
)
|
||||
|
@ -52,9 +51,13 @@ func (h *Header) String() string {
|
|||
}
|
||||
|
||||
// Marshal returns the binary encoding of h.
|
||||
//
|
||||
// The returned slice is in the format used by a raw IP socket on the
|
||||
// local system.
|
||||
// This may differ from the wire format, depending on the system.
|
||||
func (h *Header) Marshal() ([]byte, error) {
|
||||
if h == nil {
|
||||
return nil, syscall.EINVAL
|
||||
return nil, errInvalidConn
|
||||
}
|
||||
if h.Len < HeaderLen {
|
||||
return nil, errHeaderTooShort
|
||||
|
@ -98,7 +101,11 @@ func (h *Header) Marshal() ([]byte, error) {
|
|||
return b, nil
|
||||
}
|
||||
|
||||
// Parse parses b as an IPv4 header and sotres the result in h.
|
||||
// Parse parses b as an IPv4 header and stores the result in h.
|
||||
//
|
||||
// The provided b must be in the format used by a raw IP socket on the
|
||||
// local system.
|
||||
// This may differ from the wire format, depending on the system.
|
||||
func (h *Header) Parse(b []byte) error {
|
||||
if h == nil || len(b) < HeaderLen {
|
||||
return errHeaderTooShort
|
||||
|
@ -150,6 +157,10 @@ func (h *Header) Parse(b []byte) error {
|
|||
}
|
||||
|
||||
// ParseHeader parses b as an IPv4 header.
|
||||
//
|
||||
// The provided b must be in the format used by a raw IP socket on the
|
||||
// local system.
|
||||
// This may differ from the wire format, depending on the system.
|
||||
func ParseHeader(b []byte) (*Header, error) {
|
||||
h := new(Header)
|
||||
if err := h.Parse(b); err != nil {
|
||||
|
|
1
vendor/golang.org/x/net/ipv4/helper.go
generated
vendored
1
vendor/golang.org/x/net/ipv4/helper.go
generated
vendored
|
@ -10,6 +10,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
errInvalidConn = errors.New("invalid connection")
|
||||
errMissingAddress = errors.New("missing address")
|
||||
errMissingHeader = errors.New("missing header")
|
||||
errHeaderTooShort = errors.New("header too short")
|
||||
|
|
5
vendor/golang.org/x/net/ipv4/packet.go
generated
vendored
5
vendor/golang.org/x/net/ipv4/packet.go
generated
vendored
|
@ -6,7 +6,6 @@ package ipv4
|
|||
|
||||
import (
|
||||
"net"
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/net/internal/socket"
|
||||
)
|
||||
|
@ -28,7 +27,7 @@ func (c *packetHandler) ok() bool { return c != nil && c.IPConn != nil && c.Conn
|
|||
// header h, the payload p and the control message cm.
|
||||
func (c *packetHandler) ReadFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) {
|
||||
if !c.ok() {
|
||||
return nil, nil, nil, syscall.EINVAL
|
||||
return nil, nil, nil, errInvalidConn
|
||||
}
|
||||
return c.readFrom(b)
|
||||
}
|
||||
|
@ -63,7 +62,7 @@ func slicePacket(b []byte) (h, p []byte, err error) {
|
|||
// Options = optional
|
||||
func (c *packetHandler) WriteTo(h *Header, p []byte, cm *ControlMessage) error {
|
||||
if !c.ok() {
|
||||
return syscall.EINVAL
|
||||
return errInvalidConn
|
||||
}
|
||||
return c.writeTo(h, p, cm)
|
||||
}
|
||||
|
|
11
vendor/golang.org/x/net/ipv4/payload_cmsg.go
generated
vendored
11
vendor/golang.org/x/net/ipv4/payload_cmsg.go
generated
vendored
|
@ -2,14 +2,11 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !nacl,!plan9,!windows
|
||||
// +build !js,!nacl,!plan9,!windows
|
||||
|
||||
package ipv4
|
||||
|
||||
import (
|
||||
"net"
|
||||
"syscall"
|
||||
)
|
||||
import "net"
|
||||
|
||||
// ReadFrom reads a payload of the received IPv4 datagram, from the
|
||||
// endpoint c, copying the payload into b. It returns the number of
|
||||
|
@ -17,7 +14,7 @@ import (
|
|||
// src of the received datagram.
|
||||
func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
|
||||
if !c.ok() {
|
||||
return 0, nil, nil, syscall.EINVAL
|
||||
return 0, nil, nil, errInvalidConn
|
||||
}
|
||||
return c.readFrom(b)
|
||||
}
|
||||
|
@ -30,7 +27,7 @@ func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.
|
|||
// control of the outgoing datagram is not required.
|
||||
func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
|
||||
if !c.ok() {
|
||||
return 0, syscall.EINVAL
|
||||
return 0, errInvalidConn
|
||||
}
|
||||
return c.writeTo(b, cm, dst)
|
||||
}
|
||||
|
|
2
vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go
generated
vendored
2
vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go
generated
vendored
|
@ -3,7 +3,7 @@
|
|||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !go1.9
|
||||
// +build !nacl,!plan9,!windows
|
||||
// +build !js,!nacl,!plan9,!windows
|
||||
|
||||
package ipv4
|
||||
|
||||
|
|
2
vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go
generated
vendored
2
vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go
generated
vendored
|
@ -3,7 +3,7 @@
|
|||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build go1.9
|
||||
// +build !nacl,!plan9,!windows
|
||||
// +build !js,!nacl,!plan9,!windows
|
||||
|
||||
package ipv4
|
||||
|
||||
|
|
11
vendor/golang.org/x/net/ipv4/payload_nocmsg.go
generated
vendored
11
vendor/golang.org/x/net/ipv4/payload_nocmsg.go
generated
vendored
|
@ -2,14 +2,11 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build nacl plan9 windows
|
||||
// +build js nacl plan9 windows
|
||||
|
||||
package ipv4
|
||||
|
||||
import (
|
||||
"net"
|
||||
"syscall"
|
||||
)
|
||||
import "net"
|
||||
|
||||
// ReadFrom reads a payload of the received IPv4 datagram, from the
|
||||
// endpoint c, copying the payload into b. It returns the number of
|
||||
|
@ -17,7 +14,7 @@ import (
|
|||
// src of the received datagram.
|
||||
func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
|
||||
if !c.ok() {
|
||||
return 0, nil, nil, syscall.EINVAL
|
||||
return 0, nil, nil, errInvalidConn
|
||||
}
|
||||
if n, src, err = c.PacketConn.ReadFrom(b); err != nil {
|
||||
return 0, nil, nil, err
|
||||
|
@ -33,7 +30,7 @@ func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.
|
|||
// control of the outgoing datagram is not required.
|
||||
func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
|
||||
if !c.ok() {
|
||||
return 0, syscall.EINVAL
|
||||
return 0, errInvalidConn
|
||||
}
|
||||
if dst == nil {
|
||||
return 0, errMissingAddress
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue