mirror of
https://github.com/rancher/plugins.git
synced 2025-09-07 02:31:40 +00:00
vendor folder bump.
This commit is contained in:
24
vendor/golang.org/x/net/ipv4/control_bsd.go
generated
vendored
24
vendor/golang.org/x/net/ipv4/control_bsd.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
// Copyright 2012 The Go Authors. All rights reserved.
|
||||
// Copyright 2012 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@@ -12,26 +12,26 @@ import (
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/net/internal/iana"
|
||||
"golang.org/x/net/internal/socket"
|
||||
)
|
||||
|
||||
func marshalDst(b []byte, cm *ControlMessage) []byte {
|
||||
m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
|
||||
m.Level = iana.ProtocolIP
|
||||
m.Type = sysIP_RECVDSTADDR
|
||||
m.SetLen(syscall.CmsgLen(net.IPv4len))
|
||||
return b[syscall.CmsgSpace(net.IPv4len):]
|
||||
m := socket.ControlMessage(b)
|
||||
m.MarshalHeader(iana.ProtocolIP, sysIP_RECVDSTADDR, net.IPv4len)
|
||||
return m.Next(net.IPv4len)
|
||||
}
|
||||
|
||||
func parseDst(cm *ControlMessage, b []byte) {
|
||||
cm.Dst = b[:net.IPv4len]
|
||||
if len(cm.Dst) < net.IPv4len {
|
||||
cm.Dst = make(net.IP, net.IPv4len)
|
||||
}
|
||||
copy(cm.Dst, b[:net.IPv4len])
|
||||
}
|
||||
|
||||
func marshalInterface(b []byte, cm *ControlMessage) []byte {
|
||||
m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
|
||||
m.Level = iana.ProtocolIP
|
||||
m.Type = sysIP_RECVIF
|
||||
m.SetLen(syscall.CmsgLen(syscall.SizeofSockaddrDatalink))
|
||||
return b[syscall.CmsgSpace(syscall.SizeofSockaddrDatalink):]
|
||||
m := socket.ControlMessage(b)
|
||||
m.MarshalHeader(iana.ProtocolIP, sysIP_RECVIF, syscall.SizeofSockaddrDatalink)
|
||||
return m.Next(syscall.SizeofSockaddrDatalink)
|
||||
}
|
||||
|
||||
func parseInterface(cm *ControlMessage, b []byte) {
|
||||
|
Reference in New Issue
Block a user