mirror of https://github.com/golang/go.git
[dev.boringcrypto.go1.12] all: merge go1.12.12 into dev.boringcrypto.go1.12
Change-Id: Icb1265898a5da209c1560e2a317e219ceed536af
This commit is contained in:
commit
cab2e4707a
|
|
@ -112,6 +112,13 @@ See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.12.11">Go
|
|||
1.12.11 milestone</a> on our issue tracker for details.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
go1.12.12 (released 2019/10/17) includes fixes to the go command,
|
||||
runtime, <code>syscall</code> and <code>net</code> packages.
|
||||
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.12.12">Go
|
||||
1.12.12 milestone</a> on our issue tracker for details.
|
||||
</p>
|
||||
|
||||
<h2 id="go1.11">go1.11 (released 2018/08/24)</h2>
|
||||
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Do not send CLs removing the interior tags from such phrases.
|
|||
-->
|
||||
|
||||
<style>
|
||||
ul li { margin: 0.5em 0; }
|
||||
main ul li { margin: 0.5em 0; }
|
||||
</style>
|
||||
|
||||
<h2 id="introduction">Introduction to Go 1.10</h2>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Do not send CLs removing the interior tags from such phrases.
|
|||
-->
|
||||
|
||||
<style>
|
||||
ul li { margin: 0.5em 0; }
|
||||
main ul li { margin: 0.5em 0; }
|
||||
</style>
|
||||
|
||||
<h2 id="introduction">Introduction to Go 1.11</h2>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Do not send CLs removing the interior tags from such phrases.
|
|||
-->
|
||||
|
||||
<style>
|
||||
ul li { margin: 0.5em 0; }
|
||||
main ul li { margin: 0.5em 0; }
|
||||
</style>
|
||||
|
||||
<h2 id="introduction">Introduction to Go 1.12</h2>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Edit .,s;^([a-z][A-Za-z0-9_/]+)\.([A-Z][A-Za-z0-9_]+\.)?([A-Z][A-Za-z0-9_]+)([ .
|
|||
-->
|
||||
|
||||
<style>
|
||||
ul li { margin: 0.5em 0; }
|
||||
main ul li { margin: 0.5em 0; }
|
||||
</style>
|
||||
|
||||
<h2 id="introduction">Introduction to Go 1.6</h2>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Do not send CLs removing the interior tags from such phrases.
|
|||
-->
|
||||
|
||||
<style>
|
||||
ul li { margin: 0.5em 0; }
|
||||
main ul li { margin: 0.5em 0; }
|
||||
</style>
|
||||
|
||||
<h2 id="introduction">Introduction to Go 1.7</h2>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Do not send CLs removing the interior tags from such phrases.
|
|||
-->
|
||||
|
||||
<style>
|
||||
ul li { margin: 0.5em 0; }
|
||||
main ul li { margin: 0.5em 0; }
|
||||
</style>
|
||||
|
||||
<h2 id="introduction">Introduction to Go 1.8</h2>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Do not send CLs removing the interior tags from such phrases.
|
|||
-->
|
||||
|
||||
<style>
|
||||
ul li { margin: 0.5em 0; }
|
||||
main ul li { margin: 0.5em 0; }
|
||||
</style>
|
||||
|
||||
<h2 id="introduction">Introduction to Go 1.9</h2>
|
||||
|
|
|
|||
|
|
@ -3639,6 +3639,7 @@ func TestGoGetInsecure(t *testing.T) {
|
|||
tg.tempFile("go.mod", "module m")
|
||||
tg.cd(tg.path("."))
|
||||
tg.setenv("GO111MODULE", "on")
|
||||
tg.setenv("GOPROXY", "")
|
||||
} else {
|
||||
tg.setenv("GOPATH", tg.path("."))
|
||||
tg.setenv("GO111MODULE", "off")
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ func TestMain(m *testing.M) {
|
|||
}
|
||||
|
||||
func testMain(m *testing.M) int {
|
||||
modfetch.SetProxy("direct")
|
||||
|
||||
if _, err := exec.LookPath("git"); err != nil {
|
||||
fmt.Fprintln(os.Stderr, "skipping because git binary not found")
|
||||
fmt.Println("PASS")
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ func TestMain(m *testing.M) {
|
|||
}
|
||||
|
||||
func testMain(m *testing.M) int {
|
||||
SetProxy("direct")
|
||||
|
||||
dir, err := ioutil.TempDir("", "gitrepo-test-")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
@ -284,10 +286,10 @@ var codeRepoTests = []struct {
|
|||
{
|
||||
path: "gopkg.in/yaml.v2",
|
||||
rev: "v2",
|
||||
version: "v2.2.2",
|
||||
name: "51d6538a90f86fe93ac480b35f37b2be17fef232",
|
||||
short: "51d6538a90f8",
|
||||
time: time.Date(2018, 11, 15, 11, 05, 04, 0, time.UTC),
|
||||
version: "v2.2.5-0.20191002202810-970885f01c8b",
|
||||
name: "970885f01c8bc1fecb7ab1c8ce8e7609bda45530",
|
||||
short: "970885f01c8b",
|
||||
time: time.Date(2019, 10, 2, 20, 28, 10, 0, time.UTC),
|
||||
gomod: "module \"gopkg.in/yaml.v2\"\n\nrequire (\n\t\"gopkg.in/check.v1\" v0.0.0-20161208181325-20d25e280405\n)\n",
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -87,6 +87,14 @@ cached module versions with GOPROXY=https://example.com/proxy.
|
|||
|
||||
var proxyURL = os.Getenv("GOPROXY")
|
||||
|
||||
// SetProxy sets the proxy to use when fetching modules.
|
||||
// It accepts the same syntax as the GOPROXY environment variable,
|
||||
// which also provides its default configuration.
|
||||
// SetProxy must not be called after the first module fetch has begun.
|
||||
func SetProxy(url string) {
|
||||
proxyURL = url
|
||||
}
|
||||
|
||||
func lookupProxy(path string) (Repo, error) {
|
||||
if strings.Contains(proxyURL, ",") {
|
||||
return nil, fmt.Errorf("invalid $GOPROXY setting: cannot have comma")
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"cmd/go/internal/cfg"
|
||||
"cmd/go/internal/modfetch"
|
||||
"cmd/go/internal/modfetch/codehost"
|
||||
"cmd/go/internal/module"
|
||||
|
|
@ -24,11 +25,16 @@ func TestMain(m *testing.M) {
|
|||
}
|
||||
|
||||
func testMain(m *testing.M) int {
|
||||
modfetch.SetProxy("direct")
|
||||
|
||||
dir, err := ioutil.TempDir("", "modload-test-")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(dir)
|
||||
|
||||
os.Setenv("GOPATH", dir)
|
||||
cfg.BuildContext.GOPATH = dir
|
||||
modfetch.PkgMod = filepath.Join(dir, "pkg/mod")
|
||||
codehost.WorkRoot = filepath.Join(dir, "codework")
|
||||
return m.Run()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
Copyright (c) 2015 The Go Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
Additional IP Rights Grant (Patents)
|
||||
|
||||
"This implementation" means the copyrightable works distributed by
|
||||
Google as part of the Go project.
|
||||
|
||||
Google hereby grants to You a perpetual, worldwide, non-exclusive,
|
||||
no-charge, royalty-free, irrevocable (except as stated in this section)
|
||||
patent license to make, have made, use, offer to sell, sell, import,
|
||||
transfer and otherwise run, modify and propagate the contents of this
|
||||
implementation of Go, where such license applies only to those patent
|
||||
claims, both currently owned or controlled by Google and acquired in
|
||||
the future, licensable by Google that are necessarily infringed by this
|
||||
implementation of Go. This grant does not include claims that would be
|
||||
infringed only as a consequence of further modification of this
|
||||
implementation. If you or your agent or exclusive licensee institute or
|
||||
order or agree to the institution of patent litigation against any
|
||||
entity (including a cross-claim or counterclaim in a lawsuit) alleging
|
||||
that this implementation of Go or any code incorporated within this
|
||||
implementation of Go constitutes direct or contributory patent
|
||||
infringement, or inducement of patent infringement, then any patent
|
||||
rights granted to you under this License for this implementation of Go
|
||||
shall terminate as of the date such litigation is filed.
|
||||
|
|
@ -103,6 +103,13 @@ func allowedMismatchObjdump(text string, inst *Inst, dec ExtInst) bool {
|
|||
return true
|
||||
}
|
||||
}
|
||||
// New objdump supports some newer mnemonics than this package. This
|
||||
// package should be updated to support the new mnemonics and the sense
|
||||
// of this reversed to continue passing with older objdumps but that
|
||||
// requires internal ARM tooling.
|
||||
if newForm, ok := newMnemonics[text]; ok && newForm == dec.text {
|
||||
return true
|
||||
}
|
||||
// GNU objdump misses spaces between operands for some instructions (e.g., "ld1 {v10.2s, v11.2s}, [x23],#16")
|
||||
if strings.Replace(text, " ", "", -1) == strings.Replace(dec.text, " ", "", -1) {
|
||||
return true
|
||||
|
|
@ -148,3 +155,8 @@ var oldObjdumpMismatch = map[string]string{
|
|||
"strh": "sturh",
|
||||
"prfm": "prfum",
|
||||
}
|
||||
|
||||
var newMnemonics = map[string]string{
|
||||
"dsb #0x00": "ssbb",
|
||||
"dsb #0x04": "pssbb",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,9 +114,10 @@
|
|||
"revisionTime": "2018-04-06T10:28:20Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "wWnXz4wz8/jDvPd+xXU22nBuqYw=",
|
||||
"path": "golang.org/x/arch/arm64/arm64asm",
|
||||
"revision": "9111c30535f37e70dcaf5956d34b03233f90f3b6",
|
||||
"revisionTime": "2018-03-13T04:07:09Z"
|
||||
"revision": "b19384d3c130858bb31a343ea8fce26be71b5998",
|
||||
"revisionTime": "2018-09-20T07:20:31Z"
|
||||
},
|
||||
{
|
||||
"path": "golang.org/x/arch/ppc64/ppc64asm",
|
||||
|
|
@ -381,5 +382,5 @@
|
|||
"revisionTime": "2018-11-05T19:48:08Z"
|
||||
}
|
||||
],
|
||||
"rootPath": "/cmd"
|
||||
"rootPath": "cmd"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -738,6 +738,14 @@ func (r *Resolver) goLookupPTR(ctx context.Context, addr string) ([]string, erro
|
|||
}
|
||||
}
|
||||
if h.Type != dnsmessage.TypePTR {
|
||||
err := p.SkipAnswer()
|
||||
if err != nil {
|
||||
return nil, &DNSError{
|
||||
Err: "cannot marshal DNS message",
|
||||
Name: addr,
|
||||
Server: server,
|
||||
}
|
||||
}
|
||||
continue
|
||||
}
|
||||
ptr, err := p.PTRResource()
|
||||
|
|
|
|||
|
|
@ -1621,3 +1621,50 @@ func TestTXTRecordTwoStrings(t *testing.T) {
|
|||
t.Errorf("txt[1], got %q, want %q", txt[1], want)
|
||||
}
|
||||
}
|
||||
|
||||
// Issue 34660: PTR response with non-PTR answers should ignore non-PTR
|
||||
func TestPTRandNonPTR(t *testing.T) {
|
||||
fake := fakeDNSServer{
|
||||
rh: func(n, _ string, q dnsmessage.Message, _ time.Time) (dnsmessage.Message, error) {
|
||||
r := dnsmessage.Message{
|
||||
Header: dnsmessage.Header{
|
||||
ID: q.Header.ID,
|
||||
Response: true,
|
||||
RCode: dnsmessage.RCodeSuccess,
|
||||
},
|
||||
Questions: q.Questions,
|
||||
Answers: []dnsmessage.Resource{
|
||||
{
|
||||
Header: dnsmessage.ResourceHeader{
|
||||
Name: q.Questions[0].Name,
|
||||
Type: dnsmessage.TypePTR,
|
||||
Class: dnsmessage.ClassINET,
|
||||
},
|
||||
Body: &dnsmessage.PTRResource{
|
||||
PTR: mustNewName("golang.org."),
|
||||
},
|
||||
},
|
||||
{
|
||||
Header: dnsmessage.ResourceHeader{
|
||||
Name: q.Questions[0].Name,
|
||||
Type: dnsmessage.TypeTXT,
|
||||
Class: dnsmessage.ClassINET,
|
||||
},
|
||||
Body: &dnsmessage.TXTResource{
|
||||
TXT: []string{"PTR 8 6 60 ..."}, // fake RRSIG
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
return r, nil
|
||||
},
|
||||
}
|
||||
r := Resolver{PreferGo: true, Dial: fake.DialContext}
|
||||
names, err := r.lookupAddr(context.Background(), "192.0.2.123")
|
||||
if err != nil {
|
||||
t.Fatalf("LookupAddr: %v", err)
|
||||
}
|
||||
if want := []string{"golang.org."}; !reflect.DeepEqual(names, want) {
|
||||
t.Errorf("names = %q; want %q", names, want)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -540,8 +540,8 @@ class GoroutineCmd(gdb.Command):
|
|||
# In GDB, assignments to sp must be done from the
|
||||
# top-most frame, so select frame 0 first.
|
||||
gdb.execute('select-frame 0')
|
||||
gdb.parse_and_eval('$sp = $save_sp')
|
||||
gdb.parse_and_eval('$pc = $save_pc')
|
||||
gdb.parse_and_eval('$sp = $save_sp')
|
||||
save_frame.select()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -217,8 +217,11 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
|
|||
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
|
||||
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys Shutdown(s int, how int) (err error)
|
||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
|
||||
// In order to use msghdr structure with Control, Controllen in golang.org/x/net,
|
||||
// nrecvmsg and nsendmsg must be used.
|
||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = nrecvmsg
|
||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = nsendmsg
|
||||
|
||||
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
if sa.Port < 0 || sa.Port > 0xFFFF {
|
||||
|
|
@ -434,6 +437,18 @@ func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||
return nil, EAFNOSUPPORT
|
||||
}
|
||||
|
||||
type SockaddrDatalink struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
Index uint16
|
||||
Type uint8
|
||||
Nlen uint8
|
||||
Alen uint8
|
||||
Slen uint8
|
||||
Data [120]uint8
|
||||
raw RawSockaddrDatalink
|
||||
}
|
||||
|
||||
/*
|
||||
* Wait
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ package syscall
|
|||
#include <sys/statfs.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/icmp6.h>
|
||||
|
||||
|
|
@ -112,6 +113,8 @@ type RawSockaddrInet6 C.struct_sockaddr_in6
|
|||
|
||||
type RawSockaddrUnix C.struct_sockaddr_un
|
||||
|
||||
type RawSockaddrDatalink C.struct_sockaddr_dl
|
||||
|
||||
type RawSockaddr C.struct_sockaddr
|
||||
|
||||
type RawSockaddrAny C.struct_sockaddr_any
|
||||
|
|
@ -133,16 +136,17 @@ type Linger C.struct_linger
|
|||
type Msghdr C.struct_msghdr
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
|
||||
SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
|
||||
SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
|
||||
SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
|
||||
SizeofLinger = C.sizeof_struct_linger
|
||||
SizeofIPMreq = C.sizeof_struct_ip_mreq
|
||||
SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
|
||||
SizeofMsghdr = C.sizeof_struct_msghdr
|
||||
SizeofCmsghdr = C.sizeof_struct_cmsghdr
|
||||
SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
|
||||
SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
|
||||
SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
|
||||
SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
|
||||
SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
|
||||
SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
|
||||
SizeofLinger = C.sizeof_struct_linger
|
||||
SizeofIPMreq = C.sizeof_struct_ip_mreq
|
||||
SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
|
||||
SizeofMsghdr = C.sizeof_struct_msghdr
|
||||
SizeofCmsghdr = C.sizeof_struct_cmsghdr
|
||||
SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
|
||||
)
|
||||
|
||||
// Ptrace requests
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ import "unsafe"
|
|||
//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_sendto sendto "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_Shutdown shutdown "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_nrecvmsg nrecvmsg "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_nsendmsg nsendmsg "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_accept accept "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_Openat openat "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_ptrace64 ptrace64 "libc.a/shr_64.o"
|
||||
|
|
@ -120,8 +120,8 @@ import "unsafe"
|
|||
//go:linkname libc_recvfrom libc_recvfrom
|
||||
//go:linkname libc_sendto libc_sendto
|
||||
//go:linkname libc_Shutdown libc_Shutdown
|
||||
//go:linkname libc_recvmsg libc_recvmsg
|
||||
//go:linkname libc_sendmsg libc_sendmsg
|
||||
//go:linkname libc_nrecvmsg libc_nrecvmsg
|
||||
//go:linkname libc_nsendmsg libc_nsendmsg
|
||||
//go:linkname libc_accept libc_accept
|
||||
//go:linkname libc_Openat libc_Openat
|
||||
//go:linkname libc_ptrace64 libc_ptrace64
|
||||
|
|
@ -211,8 +211,8 @@ var (
|
|||
libc_recvfrom,
|
||||
libc_sendto,
|
||||
libc_Shutdown,
|
||||
libc_recvmsg,
|
||||
libc_sendmsg,
|
||||
libc_nrecvmsg,
|
||||
libc_nsendmsg,
|
||||
libc_accept,
|
||||
libc_Openat,
|
||||
libc_ptrace64,
|
||||
|
|
@ -573,7 +573,7 @@ func Shutdown(s int, how int) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
||||
r0, _, e1 := syscall6(uintptr(unsafe.Pointer(&libc_recvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
|
||||
r0, _, e1 := syscall6(uintptr(unsafe.Pointer(&libc_nrecvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
|
|
@ -584,7 +584,7 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
||||
r0, _, e1 := syscall6(uintptr(unsafe.Pointer(&libc_sendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
|
||||
r0, _, e1 := syscall6(uintptr(unsafe.Pointer(&libc_nsendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
|
|
|
|||
|
|
@ -168,6 +168,17 @@ type RawSockaddrUnix struct {
|
|||
Path [1023]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrDatalink struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
Index uint16
|
||||
Type uint8
|
||||
Nlen uint8
|
||||
Alen uint8
|
||||
Slen uint8
|
||||
Data [120]uint8
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
|
|
@ -224,16 +235,17 @@ type Msghdr struct {
|
|||
}
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = 0x10
|
||||
SizeofSockaddrInet6 = 0x1c
|
||||
SizeofSockaddrAny = 0x404
|
||||
SizeofSockaddrUnix = 0x401
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPv6Mreq = 0x14
|
||||
SizeofMsghdr = 0x30
|
||||
SizeofCmsghdr = 0xc
|
||||
SizeofICMPv6Filter = 0x20
|
||||
SizeofSockaddrInet4 = 0x10
|
||||
SizeofSockaddrInet6 = 0x1c
|
||||
SizeofSockaddrAny = 0x404
|
||||
SizeofSockaddrUnix = 0x401
|
||||
SizeofSockaddrDatalink = 0x80
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPv6Mreq = 0x14
|
||||
SizeofMsghdr = 0x30
|
||||
SizeofCmsghdr = 0xc
|
||||
SizeofICMPv6Filter = 0x20
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
Loading…
Reference in New Issue