diff --git a/agent/dns.go b/agent/dns.go
index a9ad9f27ac..dee4ecb4a4 100644
--- a/agent/dns.go
+++ b/agent/dns.go
@@ -1019,7 +1019,7 @@ func trimUDPResponse(req, resp *dns.Msg, udpAnswerLimit int) (trimmed bool) {
// uncompresses them.
// Even when size is too big for one single record, try to send it anyway
// (useful for 512 bytes messages)
- for len(resp.Answer) > 1 && resp.Len() > maxSize {
+ for len(resp.Answer) > 1 && resp.Len() > maxSize-7 {
// More than 100 bytes, find with a binary search
if resp.Len()-maxSize > 100 {
bestIndex := dnsBinaryTruncate(resp, maxSize, index, hasExtra)
@@ -1034,7 +1034,6 @@ func trimUDPResponse(req, resp *dns.Msg, udpAnswerLimit int) (trimmed bool) {
// For 512 non-eDNS responses, while we compute size non-compressed,
// we send result compressed
resp.Compress = compress
-
return len(resp.Answer) < numAnswers
}
@@ -1735,7 +1734,7 @@ func (d *DNSServer) handleRecurse(resp dns.ResponseWriter, req *dns.Msg) {
// If we still have recursors to forward the query to,
// we move forward onto the next one else the loop ends
continue
- } else if err == nil || err == dns.ErrTruncated {
+ } else if err == nil || (r != nil && r.Truncated) {
// Compress the response; we don't know if the incoming
// response was compressed or not, so by not compressing
// we might generate an invalid packet on the way out.
diff --git a/agent/dns_test.go b/agent/dns_test.go
index 65b964fa4a..9b9bb49863 100644
--- a/agent/dns_test.go
+++ b/agent/dns_test.go
@@ -3267,7 +3267,7 @@ func TestDNS_Recurse_Truncation(t *testing.T) {
c := new(dns.Client)
in, _, err := c.Exchange(m, a.DNSAddr())
- if err != dns.ErrTruncated {
+ if err != nil {
t.Fatalf("err: %v", err)
}
if in.Truncated != true {
@@ -3952,10 +3952,17 @@ func TestDNS_TCP_and_UDP_Truncate(t *testing.T) {
c.Net = protocol
m.Compress = compress
in, _, err := c.Exchange(m, a.DNSAddr())
- if err != nil && err != dns.ErrTruncated {
+ if err != nil {
t.Fatalf("err: %v", err)
}
-
+ // actually check if we need to have the truncate bit
+ resbuf, err := in.Pack()
+ if err != nil {
+ t.Fatalf("Error while packing answer: %s", err)
+ }
+ if !in.Truncated && len(resbuf) > int(maxSz) {
+ t.Fatalf("should have truncate bit %#v %#v", in, len(in.Answer))
+ }
// Check for the truncate bit
buf, err := m.Pack()
info := fmt.Sprintf("service %s question:=%s (%s) (%d total records) sz:= %d in %v",
@@ -4033,7 +4040,7 @@ func TestDNS_ServiceLookup_Truncate(t *testing.T) {
c := new(dns.Client)
in, _, err := c.Exchange(m, a.DNSAddr())
- if err != nil && err != dns.ErrTruncated {
+ if err != nil {
t.Fatalf("err: %v", err)
}
@@ -4105,10 +4112,14 @@ func TestDNS_ServiceLookup_LargeResponses(t *testing.T) {
c := new(dns.Client)
in, _, err := c.Exchange(m, a.DNSAddr())
- if err != nil && err != dns.ErrTruncated {
+ if err != nil {
t.Fatalf("err: %v", err)
}
+ if !in.Truncated {
+ t.Fatalf("should have truncate bit")
+ }
+
// Make sure the response size is RFC 1035-compliant for UDP messages
if in.Len() > 512 {
t.Fatalf("Bad: %d", in.Len())
diff --git a/go.mod b/go.mod
index 7e729534a8..e7c603c5d8 100644
--- a/go.mod
+++ b/go.mod
@@ -56,7 +56,7 @@ require (
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d
github.com/imdario/mergo v0.3.6
github.com/kr/text v0.1.0
- github.com/miekg/dns v1.0.14
+ github.com/miekg/dns v1.1.22
github.com/mitchellh/cli v1.0.0
github.com/mitchellh/copystructure v1.0.0
github.com/mitchellh/go-testing-interface v1.0.0
@@ -73,10 +73,10 @@ require (
github.com/spf13/pflag v1.0.3 // indirect
github.com/stretchr/objx v0.1.1 // indirect
github.com/stretchr/testify v1.3.0
- golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4
- golang.org/x/net v0.0.0-20190620200207-3b0461eec859
+ golang.org/x/crypto v0.0.0-20191106202628-ed6320f186d4
+ golang.org/x/net v0.0.0-20190923162816-aa69164e4478
golang.org/x/sync v0.0.0-20190423024810-112230192c58
- golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
+ golang.org/x/sys v0.0.0-20191105231009-c1f44814a5cd
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
google.golang.org/grpc v1.23.0
gopkg.in/square/go-jose.v2 v2.3.1
diff --git a/go.sum b/go.sum
index 26ca2a3876..bd38a33d19 100644
--- a/go.sum
+++ b/go.sum
@@ -241,6 +241,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
+github.com/miekg/dns v1.1.22 h1:Jm64b3bO9kP43ddLjL2EY3Io6bmy1qGb9Xxz6TqS6rc=
+github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
@@ -349,6 +351,10 @@ golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnf
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392 h1:ACG4HJsFiNMf47Y4PeRoebLNy/2lXT9EtprMuTFWt1M=
+golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
+golang.org/x/crypto v0.0.0-20191106202628-ed6320f186d4 h1:PDpCLFAH/YIX0QpHPf2eO7L4rC2OOirBrKtXTLLiNTY=
+golang.org/x/crypto v0.0.0-20191106202628-ed6320f186d4/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
@@ -368,6 +374,8 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c h1:uOCk1iQW6Vc18bnC13MfzScl+
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190923162816-aa69164e4478 h1:l5EDrHhldLYb3ZRHDUhXF7Om7MvYXnkV9/iQNo1lX6g=
+golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/oauth2 v0.0.0-20170807180024-9a379c6b3e95/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -392,6 +400,11 @@ golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5 h1:sM3evRHxE/1RuMe1FYAL3j7C7
golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe h1:6fAMxZRR6sl1Uq8U61gxU+kPTs2tR8uOySCbBP7BN/M=
+golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191105231009-c1f44814a5cd h1:3x5uuvBgE6oaXJjCOvpCC1IpgJogqQ+PqGGU3ZxAgII=
+golang.org/x/sys v0.0.0-20191105231009-c1f44814a5cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
@@ -407,6 +420,8 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.0.0-20180829000535-087779f1d2c9 h1:z1TeLUmxf9ws9KLICfmX+KGXTs+rjm+aGWzfsv7MZ9w=
google.golang.org/api v0.0.0-20180829000535-087779f1d2c9/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs=
diff --git a/vendor/github.com/miekg/dns/.travis.yml b/vendor/github.com/miekg/dns/.travis.yml
index 18259374e5..c450c9f956 100644
--- a/vendor/github.com/miekg/dns/.travis.yml
+++ b/vendor/github.com/miekg/dns/.travis.yml
@@ -2,14 +2,12 @@ language: go
sudo: false
go:
- - 1.10.x
- 1.11.x
+ - 1.12.x
- tip
-before_install:
- # don't use the miekg/dns when testing forks
- - mkdir -p $GOPATH/src/github.com/miekg
- - ln -s $TRAVIS_BUILD_DIR $GOPATH/src/github.com/miekg/ || true
+env:
+ - GO111MODULE=on
script:
- go test -race -v -bench=. -coverprofile=coverage.txt -covermode=atomic ./...
diff --git a/vendor/github.com/miekg/dns/Gopkg.lock b/vendor/github.com/miekg/dns/Gopkg.lock
deleted file mode 100644
index 686632207a..0000000000
--- a/vendor/github.com/miekg/dns/Gopkg.lock
+++ /dev/null
@@ -1,57 +0,0 @@
-# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
-
-
-[[projects]]
- branch = "master"
- digest = "1:6914c49eed986dfb8dffb33516fa129c49929d4d873f41e073c83c11c372b870"
- name = "golang.org/x/crypto"
- packages = [
- "ed25519",
- "ed25519/internal/edwards25519",
- ]
- pruneopts = ""
- revision = "e3636079e1a4c1f337f212cc5cd2aca108f6c900"
-
-[[projects]]
- branch = "master"
- digest = "1:08e41d63f8dac84d83797368b56cf0b339e42d0224e5e56668963c28aec95685"
- name = "golang.org/x/net"
- packages = [
- "bpf",
- "context",
- "internal/iana",
- "internal/socket",
- "ipv4",
- "ipv6",
- ]
- pruneopts = ""
- revision = "4dfa2610cdf3b287375bbba5b8f2a14d3b01d8de"
-
-[[projects]]
- branch = "master"
- digest = "1:b2ea75de0ccb2db2ac79356407f8a4cd8f798fe15d41b381c00abf3ae8e55ed1"
- name = "golang.org/x/sync"
- packages = ["errgroup"]
- pruneopts = ""
- revision = "1d60e4601c6fd243af51cc01ddf169918a5407ca"
-
-[[projects]]
- branch = "master"
- digest = "1:149a432fabebb8221a80f77731b1cd63597197ded4f14af606ebe3a0959004ec"
- name = "golang.org/x/sys"
- packages = ["unix"]
- pruneopts = ""
- revision = "e4b3c5e9061176387e7cea65e4dc5853801f3fb7"
-
-[solve-meta]
- analyzer-name = "dep"
- analyzer-version = 1
- input-imports = [
- "golang.org/x/crypto/ed25519",
- "golang.org/x/net/ipv4",
- "golang.org/x/net/ipv6",
- "golang.org/x/sync/errgroup",
- "golang.org/x/sys/unix",
- ]
- solver-name = "gps-cdcl"
- solver-version = 1
diff --git a/vendor/github.com/miekg/dns/Gopkg.toml b/vendor/github.com/miekg/dns/Gopkg.toml
deleted file mode 100644
index 85e6ff31b2..0000000000
--- a/vendor/github.com/miekg/dns/Gopkg.toml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-# Gopkg.toml example
-#
-# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
-# for detailed Gopkg.toml documentation.
-#
-# required = ["github.com/user/thing/cmd/thing"]
-# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
-#
-# [[constraint]]
-# name = "github.com/user/project"
-# version = "1.0.0"
-#
-# [[constraint]]
-# name = "github.com/user/project2"
-# branch = "dev"
-# source = "github.com/myfork/project2"
-#
-# [[override]]
-# name = "github.com/x/y"
-# version = "2.4.0"
-
-
-[[constraint]]
- branch = "master"
- name = "golang.org/x/crypto"
-
-[[constraint]]
- branch = "master"
- name = "golang.org/x/net"
-
-[[constraint]]
- branch = "master"
- name = "golang.org/x/sys"
-
-[[constraint]]
- branch = "master"
- name = "golang.org/x/sync"
diff --git a/vendor/github.com/miekg/dns/README.md b/vendor/github.com/miekg/dns/README.md
index 7f1aaa5de4..de4afed69a 100644
--- a/vendor/github.com/miekg/dns/README.md
+++ b/vendor/github.com/miekg/dns/README.md
@@ -7,10 +7,10 @@
> Less is more.
-Complete and usable DNS library. All widely used Resource Records are supported, including the
-DNSSEC types. It follows a lean and mean philosophy. If there is stuff you should know as a DNS
-programmer there isn't a convenience function for it. Server side and client side programming is
-supported, i.e. you can build servers and resolvers with it.
+Complete and usable DNS library. All Resource Records are supported, including the DNSSEC types.
+It follows a lean and mean philosophy. If there is stuff you should know as a DNS programmer there
+isn't a convenience function for it. Server side and client side programming is supported, i.e. you
+can build servers and resolvers with it.
We try to keep the "master" branch as sane as possible and at the bleeding edge of standards,
avoiding breaking changes wherever reasonable. We support the last two versions of Go.
@@ -42,10 +42,9 @@ A not-so-up-to-date-list-that-may-be-actually-current:
* https://github.com/tianon/rawdns
* https://mesosphere.github.io/mesos-dns/
* https://pulse.turbobytes.com/
-* https://play.google.com/store/apps/details?id=com.turbobytes.dig
* https://github.com/fcambus/statzone
* https://github.com/benschw/dns-clb-go
-* https://github.com/corny/dnscheck for http://public-dns.info/
+* https://github.com/corny/dnscheck for
* https://namesmith.io
* https://github.com/miekg/unbound
* https://github.com/miekg/exdns
@@ -56,7 +55,7 @@ A not-so-up-to-date-list-that-may-be-actually-current:
* https://github.com/bamarni/dockness
* https://github.com/fffaraz/microdns
* http://kelda.io
-* https://github.com/ipdcode/hades (JD.COM)
+* https://github.com/ipdcode/hades
* https://github.com/StackExchange/dnscontrol/
* https://www.dnsperf.com/
* https://dnssectest.net/
@@ -68,29 +67,30 @@ A not-so-up-to-date-list-that-may-be-actually-current:
* https://github.com/rs/dnstrace
* https://blitiri.com.ar/p/dnss ([github mirror](https://github.com/albertito/dnss))
* https://github.com/semihalev/sdns
+* https://render.com
+* https://github.com/peterzen/goresolver
+* https://github.com/folbricht/routedns
Send pull request if you want to be listed here.
# Features
-* UDP/TCP queries, IPv4 and IPv6;
-* RFC 1035 zone file parsing ($INCLUDE, $ORIGIN, $TTL and $GENERATE (for all record types) are supported;
-* Fast:
- * Reply speed around ~ 80K qps (faster hardware results in more qps);
- * Parsing RRs ~ 100K RR/s, that's 5M records in about 50 seconds;
-* Server side programming (mimicking the net/http package);
-* Client side programming;
-* DNSSEC: signing, validating and key generation for DSA, RSA, ECDSA and Ed25519;
-* EDNS0, NSID, Cookies;
-* AXFR/IXFR;
-* TSIG, SIG(0);
-* DNS over TLS: optional encrypted connection between client and server;
-* DNS name compression;
-* Depends only on the standard library.
+* UDP/TCP queries, IPv4 and IPv6
+* RFC 1035 zone file parsing ($INCLUDE, $ORIGIN, $TTL and $GENERATE (for all record types) are supported
+* Fast
+* Server side programming (mimicking the net/http package)
+* Client side programming
+* DNSSEC: signing, validating and key generation for DSA, RSA, ECDSA and Ed25519
+* EDNS0, NSID, Cookies
+* AXFR/IXFR
+* TSIG, SIG(0)
+* DNS over TLS (DoT): encrypted connection between client and server over TCP
+* DNS name compression
Have fun!
Miek Gieben - 2010-2012 -
+DNS Authors 2012-
# Building
@@ -102,8 +102,8 @@ work:
## Examples
-A short "how to use the API" is at the beginning of doc.go (this also will show
-when you call `godoc github.com/miekg/dns`).
+A short "how to use the API" is at the beginning of doc.go (this also will show when you call `godoc
+github.com/miekg/dns`).
Example programs can be found in the `github.com/miekg/exdns` repository.
@@ -153,6 +153,7 @@ Example programs can be found in the `github.com/miekg/exdns` repository.
* 6844 - CAA record
* 6891 - EDNS0 update
* 6895 - DNS IANA considerations
+* 6944 - DNSSEC DNSKEY Algorithm Status
* 6975 - Algorithm Understanding in DNSSEC
* 7043 - EUI48/EUI64 records
* 7314 - DNS (EDNS) EXPIRE Option
@@ -161,12 +162,13 @@ Example programs can be found in the `github.com/miekg/exdns` repository.
* 7553 - URI record
* 7858 - DNS over TLS: Initiation and Performance Considerations
* 7871 - EDNS0 Client Subnet
-* 7873 - Domain Name System (DNS) Cookies (draft-ietf-dnsop-cookies)
+* 7873 - Domain Name System (DNS) Cookies
* 8080 - EdDSA for DNSSEC
+* 8499 - DNS Terminology
-## Loosely based upon
+## Loosely Based Upon
-* `ldns`
-* `NSD`
-* `Net::DNS`
-* `GRONG`
+* ldns -
+* NSD -
+* Net::DNS -
+* GRONG -
diff --git a/vendor/github.com/miekg/dns/acceptfunc.go b/vendor/github.com/miekg/dns/acceptfunc.go
new file mode 100644
index 0000000000..c6920f792c
--- /dev/null
+++ b/vendor/github.com/miekg/dns/acceptfunc.go
@@ -0,0 +1,54 @@
+package dns
+
+// MsgAcceptFunc is used early in the server code to accept or reject a message with RcodeFormatError.
+// It returns a MsgAcceptAction to indicate what should happen with the message.
+type MsgAcceptFunc func(dh Header) MsgAcceptAction
+
+// DefaultMsgAcceptFunc checks the request and will reject if:
+//
+// * isn't a request (don't respond in that case).
+// * opcode isn't OpcodeQuery or OpcodeNotify
+// * Zero bit isn't zero
+// * has more than 1 question in the question section
+// * has more than 1 RR in the Answer section
+// * has more than 0 RRs in the Authority section
+// * has more than 2 RRs in the Additional section
+var DefaultMsgAcceptFunc MsgAcceptFunc = defaultMsgAcceptFunc
+
+// MsgAcceptAction represents the action to be taken.
+type MsgAcceptAction int
+
+const (
+ MsgAccept MsgAcceptAction = iota // Accept the message
+ MsgReject // Reject the message with a RcodeFormatError
+ MsgIgnore // Ignore the error and send nothing back.
+ MsgRejectNotImplemented // Reject the message with a RcodeNotImplemented
+)
+
+func defaultMsgAcceptFunc(dh Header) MsgAcceptAction {
+ if isResponse := dh.Bits&_QR != 0; isResponse {
+ return MsgIgnore
+ }
+
+ // Don't allow dynamic updates, because then the sections can contain a whole bunch of RRs.
+ opcode := int(dh.Bits>>11) & 0xF
+ if opcode != OpcodeQuery && opcode != OpcodeNotify {
+ return MsgRejectNotImplemented
+ }
+
+ if dh.Qdcount != 1 {
+ return MsgReject
+ }
+ // NOTIFY requests can have a SOA in the ANSWER section. See RFC 1996 Section 3.7 and 3.11.
+ if dh.Ancount > 1 {
+ return MsgReject
+ }
+ // IXFR request could have one SOA RR in the NS section. See RFC 1995, section 3.
+ if dh.Nscount > 1 {
+ return MsgReject
+ }
+ if dh.Arcount > 2 {
+ return MsgReject
+ }
+ return MsgAccept
+}
diff --git a/vendor/github.com/miekg/dns/client.go b/vendor/github.com/miekg/dns/client.go
index 63ced2bd06..db2761d45b 100644
--- a/vendor/github.com/miekg/dns/client.go
+++ b/vendor/github.com/miekg/dns/client.go
@@ -3,15 +3,12 @@ package dns
// A client implementation.
import (
- "bytes"
"context"
"crypto/tls"
"encoding/binary"
"fmt"
"io"
- "io/ioutil"
"net"
- "net/http"
"strings"
"time"
)
@@ -19,8 +16,6 @@ import (
const (
dnsTimeout time.Duration = 2 * time.Second
tcpIdleTimeout time.Duration = 8 * time.Second
-
- dohMimeType = "application/dns-message"
)
// A Conn represents a connection to a DNS server.
@@ -44,7 +39,6 @@ type Client struct {
DialTimeout time.Duration // net.DialTimeout, defaults to 2 seconds, or net.Dialer.Timeout if expiring earlier - overridden by Timeout when that value is non-zero
ReadTimeout time.Duration // net.Conn.SetReadTimeout value for connections, defaults to 2 seconds - overridden by Timeout when that value is non-zero
WriteTimeout time.Duration // net.Conn.SetWriteTimeout value for connections, defaults to 2 seconds - overridden by Timeout when that value is non-zero
- HTTPClient *http.Client // The http.Client to use for DNS-over-HTTPS
TsigSecret map[string]string // secret(s) for Tsig map[], zonename must be in canonical form (lowercase, fqdn, see RFC 4034 Section 6.2)
SingleInflight bool // if true suppress multiple outstanding queries for the same Qname, Qtype and Qclass
group singleflight
@@ -132,33 +126,18 @@ func (c *Client) Dial(address string) (conn *Conn, err error) {
// attribute appropriately
func (c *Client) Exchange(m *Msg, address string) (r *Msg, rtt time.Duration, err error) {
if !c.SingleInflight {
- if c.Net == "https" {
- // TODO(tmthrgd): pipe timeouts into exchangeDOH
- return c.exchangeDOH(context.TODO(), m, address)
- }
-
return c.exchange(m, address)
}
- t := "nop"
- if t1, ok := TypeToString[m.Question[0].Qtype]; ok {
- t = t1
- }
- cl := "nop"
- if cl1, ok := ClassToString[m.Question[0].Qclass]; ok {
- cl = cl1
- }
- r, rtt, err, shared := c.group.Do(m.Question[0].Name+t+cl, func() (*Msg, time.Duration, error) {
- if c.Net == "https" {
- // TODO(tmthrgd): pipe timeouts into exchangeDOH
- return c.exchangeDOH(context.TODO(), m, address)
- }
-
+ q := m.Question[0]
+ key := fmt.Sprintf("%s:%d:%d", q.Name, q.Qtype, q.Qclass)
+ r, rtt, err, shared := c.group.Do(key, func() (*Msg, time.Duration, error) {
return c.exchange(m, address)
})
if r != nil && shared {
r = r.Copy()
}
+
return r, rtt, err
}
@@ -199,67 +178,6 @@ func (c *Client) exchange(m *Msg, a string) (r *Msg, rtt time.Duration, err erro
return r, rtt, err
}
-func (c *Client) exchangeDOH(ctx context.Context, m *Msg, a string) (r *Msg, rtt time.Duration, err error) {
- p, err := m.Pack()
- if err != nil {
- return nil, 0, err
- }
-
- req, err := http.NewRequest(http.MethodPost, a, bytes.NewReader(p))
- if err != nil {
- return nil, 0, err
- }
-
- req.Header.Set("Content-Type", dohMimeType)
- req.Header.Set("Accept", dohMimeType)
-
- hc := http.DefaultClient
- if c.HTTPClient != nil {
- hc = c.HTTPClient
- }
-
- if ctx != context.Background() && ctx != context.TODO() {
- req = req.WithContext(ctx)
- }
-
- t := time.Now()
-
- resp, err := hc.Do(req)
- if err != nil {
- return nil, 0, err
- }
- defer closeHTTPBody(resp.Body)
-
- if resp.StatusCode != http.StatusOK {
- return nil, 0, fmt.Errorf("dns: server returned HTTP %d error: %q", resp.StatusCode, resp.Status)
- }
-
- if ct := resp.Header.Get("Content-Type"); ct != dohMimeType {
- return nil, 0, fmt.Errorf("dns: unexpected Content-Type %q; expected %q", ct, dohMimeType)
- }
-
- p, err = ioutil.ReadAll(resp.Body)
- if err != nil {
- return nil, 0, err
- }
-
- rtt = time.Since(t)
-
- r = new(Msg)
- if err := r.Unpack(p); err != nil {
- return r, 0, err
- }
-
- // TODO: TSIG? Is it even supported over DoH?
-
- return r, rtt, nil
-}
-
-func closeHTTPBody(r io.ReadCloser) error {
- io.Copy(ioutil.Discard, io.LimitReader(r, 8<<20))
- return r.Close()
-}
-
// ReadMsg reads a message from the connection co.
// If the received message contains a TSIG record the transaction signature
// is verified. This method always tries to return the message, however if an
@@ -298,24 +216,21 @@ func (co *Conn) ReadMsgHeader(hdr *Header) ([]byte, error) {
err error
)
- switch t := co.Conn.(type) {
- case *net.TCPConn, *tls.Conn:
- r := t.(io.Reader)
-
- // First two bytes specify the length of the entire message.
- l, err := tcpMsgLen(r)
- if err != nil {
- return nil, err
- }
- p = make([]byte, l)
- n, err = tcpRead(r, p)
- default:
+ if _, ok := co.Conn.(net.PacketConn); ok {
if co.UDPSize > MinMsgSize {
p = make([]byte, co.UDPSize)
} else {
p = make([]byte, MinMsgSize)
}
n, err = co.Read(p)
+ } else {
+ var length uint16
+ if err := binary.Read(co.Conn, binary.BigEndian, &length); err != nil {
+ return nil, err
+ }
+
+ p = make([]byte, length)
+ n, err = io.ReadFull(co.Conn, p)
}
if err != nil {
@@ -335,78 +250,26 @@ func (co *Conn) ReadMsgHeader(hdr *Header) ([]byte, error) {
return p, err
}
-// tcpMsgLen is a helper func to read first two bytes of stream as uint16 packet length.
-func tcpMsgLen(t io.Reader) (int, error) {
- p := []byte{0, 0}
- n, err := t.Read(p)
- if err != nil {
- return 0, err
- }
-
- // As seen with my local router/switch, returns 1 byte on the above read,
- // resulting a a ShortRead. Just write it out (instead of loop) and read the
- // other byte.
- if n == 1 {
- n1, err := t.Read(p[1:])
- if err != nil {
- return 0, err
- }
- n += n1
- }
-
- if n != 2 {
- return 0, ErrShortRead
- }
- l := binary.BigEndian.Uint16(p)
- if l == 0 {
- return 0, ErrShortRead
- }
- return int(l), nil
-}
-
-// tcpRead calls TCPConn.Read enough times to fill allocated buffer.
-func tcpRead(t io.Reader, p []byte) (int, error) {
- n, err := t.Read(p)
- if err != nil {
- return n, err
- }
- for n < len(p) {
- j, err := t.Read(p[n:])
- if err != nil {
- return n, err
- }
- n += j
- }
- return n, err
-}
-
// Read implements the net.Conn read method.
func (co *Conn) Read(p []byte) (n int, err error) {
if co.Conn == nil {
return 0, ErrConnEmpty
}
- if len(p) < 2 {
+
+ if _, ok := co.Conn.(net.PacketConn); ok {
+ // UDP connection
+ return co.Conn.Read(p)
+ }
+
+ var length uint16
+ if err := binary.Read(co.Conn, binary.BigEndian, &length); err != nil {
+ return 0, err
+ }
+ if int(length) > len(p) {
return 0, io.ErrShortBuffer
}
- switch t := co.Conn.(type) {
- case *net.TCPConn, *tls.Conn:
- r := t.(io.Reader)
- l, err := tcpMsgLen(r)
- if err != nil {
- return 0, err
- }
- if l > len(p) {
- return int(l), io.ErrShortBuffer
- }
- return tcpRead(r, p[:l])
- }
- // UDP connection
- n, err = co.Conn.Read(p)
- if err != nil {
- return n, err
- }
- return n, err
+ return io.ReadFull(co.Conn, p[:length])
}
// WriteMsg sends a message through the connection co.
@@ -428,33 +291,25 @@ func (co *Conn) WriteMsg(m *Msg) (err error) {
if err != nil {
return err
}
- if _, err = co.Write(out); err != nil {
- return err
- }
- return nil
+ _, err = co.Write(out)
+ return err
}
// Write implements the net.Conn Write method.
-func (co *Conn) Write(p []byte) (n int, err error) {
- switch t := co.Conn.(type) {
- case *net.TCPConn, *tls.Conn:
- w := t.(io.Writer)
-
- lp := len(p)
- if lp < 2 {
- return 0, io.ErrShortBuffer
- }
- if lp > MaxMsgSize {
- return 0, &Error{err: "message too large"}
- }
- l := make([]byte, 2, lp+2)
- binary.BigEndian.PutUint16(l, uint16(lp))
- p = append(l, p...)
- n, err := io.Copy(w, bytes.NewReader(p))
- return int(n), err
+func (co *Conn) Write(p []byte) (int, error) {
+ if len(p) > MaxMsgSize {
+ return 0, &Error{err: "message too large"}
}
- n, err = co.Conn.Write(p)
- return n, err
+
+ if _, ok := co.Conn.(net.PacketConn); ok {
+ return co.Conn.Write(p)
+ }
+
+ l := make([]byte, 2)
+ binary.BigEndian.PutUint16(l, uint16(len(p)))
+
+ n, err := (&net.Buffers{l, p}).WriteTo(co.Conn)
+ return int(n), err
}
// Return the appropriate timeout for a specific request
@@ -497,7 +352,7 @@ func ExchangeContext(ctx context.Context, m *Msg, a string) (r *Msg, err error)
// ExchangeConn performs a synchronous query. It sends the message m via the connection
// c and waits for a reply. The connection c is not closed by ExchangeConn.
-// This function is going away, but can easily be mimicked:
+// Deprecated: This function is going away, but can easily be mimicked:
//
// co := &dns.Conn{Conn: c} // c is your net.Conn
// co.WriteMsg(m)
@@ -521,11 +376,7 @@ func ExchangeConn(c net.Conn, m *Msg) (r *Msg, err error) {
// DialTimeout acts like Dial but takes a timeout.
func DialTimeout(network, address string, timeout time.Duration) (conn *Conn, err error) {
client := Client{Net: network, Dialer: &net.Dialer{Timeout: timeout}}
- conn, err = client.Dial(address)
- if err != nil {
- return nil, err
- }
- return conn, nil
+ return client.Dial(address)
}
// DialWithTLS connects to the address on the named network with TLS.
@@ -534,12 +385,7 @@ func DialWithTLS(network, address string, tlsConfig *tls.Config) (conn *Conn, er
network += "-tls"
}
client := Client{Net: network, TLSConfig: tlsConfig}
- conn, err = client.Dial(address)
-
- if err != nil {
- return nil, err
- }
- return conn, nil
+ return client.Dial(address)
}
// DialTimeoutWithTLS acts like DialWithTLS but takes a timeout.
@@ -548,21 +394,13 @@ func DialTimeoutWithTLS(network, address string, tlsConfig *tls.Config, timeout
network += "-tls"
}
client := Client{Net: network, Dialer: &net.Dialer{Timeout: timeout}, TLSConfig: tlsConfig}
- conn, err = client.Dial(address)
- if err != nil {
- return nil, err
- }
- return conn, nil
+ return client.Dial(address)
}
// ExchangeContext acts like Exchange, but honors the deadline on the provided
// context, if present. If there is both a context deadline and a configured
// timeout on the client, the earliest of the two takes effect.
func (c *Client) ExchangeContext(ctx context.Context, m *Msg, a string) (r *Msg, rtt time.Duration, err error) {
- if !c.SingleInflight && c.Net == "https" {
- return c.exchangeDOH(ctx, m, a)
- }
-
var timeout time.Duration
if deadline, ok := ctx.Deadline(); !ok {
timeout = 0
@@ -571,7 +409,7 @@ func (c *Client) ExchangeContext(ctx context.Context, m *Msg, a string) (r *Msg,
}
// not passing the context to the underlying calls, as the API does not support
// context. For timeouts you should set up Client.Dialer and call Client.Exchange.
- // TODO(tmthrgd): this is a race condition
+ // TODO(tmthrgd,miekg): this is a race condition.
c.Dialer = &net.Dialer{Timeout: timeout}
return c.Exchange(m, a)
}
diff --git a/vendor/github.com/miekg/dns/clientconfig.go b/vendor/github.com/miekg/dns/clientconfig.go
index f13cfa30cb..e11b630df9 100644
--- a/vendor/github.com/miekg/dns/clientconfig.go
+++ b/vendor/github.com/miekg/dns/clientconfig.go
@@ -68,14 +68,10 @@ func ClientConfigFromReader(resolvconf io.Reader) (*ClientConfig, error) {
}
case "search": // set search path to given servers
- c.Search = make([]string, len(f)-1)
- for i := 0; i < len(c.Search); i++ {
- c.Search[i] = f[i+1]
- }
+ c.Search = append([]string(nil), f[1:]...)
case "options": // magic options
- for i := 1; i < len(f); i++ {
- s := f[i]
+ for _, s := range f[1:] {
switch {
case len(s) >= 6 && s[:6] == "ndots:":
n, _ := strconv.Atoi(s[6:])
diff --git a/vendor/github.com/miekg/dns/compress_generate.go b/vendor/github.com/miekg/dns/compress_generate.go
deleted file mode 100644
index 9a136c414a..0000000000
--- a/vendor/github.com/miekg/dns/compress_generate.go
+++ /dev/null
@@ -1,198 +0,0 @@
-//+build ignore
-
-// compression_generate.go is meant to run with go generate. It will use
-// go/{importer,types} to track down all the RR struct types. Then for each type
-// it will look to see if there are (compressible) names, if so it will add that
-// type to compressionLenHelperType and comressionLenSearchType which "fake" the
-// compression so that Len() is fast.
-package main
-
-import (
- "bytes"
- "fmt"
- "go/format"
- "go/importer"
- "go/types"
- "log"
- "os"
-)
-
-var packageHdr = `
-// Code generated by "go run compress_generate.go"; DO NOT EDIT.
-
-package dns
-
-`
-
-// getTypeStruct will take a type and the package scope, and return the
-// (innermost) struct if the type is considered a RR type (currently defined as
-// those structs beginning with a RR_Header, could be redefined as implementing
-// the RR interface). The bool return value indicates if embedded structs were
-// resolved.
-func getTypeStruct(t types.Type, scope *types.Scope) (*types.Struct, bool) {
- st, ok := t.Underlying().(*types.Struct)
- if !ok {
- return nil, false
- }
- if st.Field(0).Type() == scope.Lookup("RR_Header").Type() {
- return st, false
- }
- if st.Field(0).Anonymous() {
- st, _ := getTypeStruct(st.Field(0).Type(), scope)
- return st, true
- }
- return nil, false
-}
-
-func main() {
- // Import and type-check the package
- pkg, err := importer.Default().Import("github.com/miekg/dns")
- fatalIfErr(err)
- scope := pkg.Scope()
-
- var domainTypes []string // Types that have a domain name in them (either compressible or not).
- var cdomainTypes []string // Types that have a compressible domain name in them (subset of domainType)
-Names:
- for _, name := range scope.Names() {
- o := scope.Lookup(name)
- if o == nil || !o.Exported() {
- continue
- }
- st, _ := getTypeStruct(o.Type(), scope)
- if st == nil {
- continue
- }
- if name == "PrivateRR" {
- continue
- }
-
- if scope.Lookup("Type"+o.Name()) == nil && o.Name() != "RFC3597" {
- log.Fatalf("Constant Type%s does not exist.", o.Name())
- }
-
- for i := 1; i < st.NumFields(); i++ {
- if _, ok := st.Field(i).Type().(*types.Slice); ok {
- if st.Tag(i) == `dns:"domain-name"` {
- domainTypes = append(domainTypes, o.Name())
- continue Names
- }
- if st.Tag(i) == `dns:"cdomain-name"` {
- cdomainTypes = append(cdomainTypes, o.Name())
- domainTypes = append(domainTypes, o.Name())
- continue Names
- }
- continue
- }
-
- switch {
- case st.Tag(i) == `dns:"domain-name"`:
- domainTypes = append(domainTypes, o.Name())
- continue Names
- case st.Tag(i) == `dns:"cdomain-name"`:
- cdomainTypes = append(cdomainTypes, o.Name())
- domainTypes = append(domainTypes, o.Name())
- continue Names
- }
- }
- }
-
- b := &bytes.Buffer{}
- b.WriteString(packageHdr)
-
- // compressionLenHelperType - all types that have domain-name/cdomain-name can be used for compressing names
-
- fmt.Fprint(b, "func compressionLenHelperType(c map[string]int, r RR, initLen int) int {\n")
- fmt.Fprint(b, "currentLen := initLen\n")
- fmt.Fprint(b, "switch x := r.(type) {\n")
- for _, name := range domainTypes {
- o := scope.Lookup(name)
- st, _ := getTypeStruct(o.Type(), scope)
-
- fmt.Fprintf(b, "case *%s:\n", name)
- for i := 1; i < st.NumFields(); i++ {
- out := func(s string) {
- fmt.Fprintf(b, "currentLen -= len(x.%s) + 1\n", st.Field(i).Name())
- fmt.Fprintf(b, "currentLen += compressionLenHelper(c, x.%s, currentLen)\n", st.Field(i).Name())
- }
-
- if _, ok := st.Field(i).Type().(*types.Slice); ok {
- switch st.Tag(i) {
- case `dns:"domain-name"`:
- fallthrough
- case `dns:"cdomain-name"`:
- // For HIP we need to slice over the elements in this slice.
- fmt.Fprintf(b, `for i := range x.%s {
- currentLen -= len(x.%s[i]) + 1
-}
-`, st.Field(i).Name(), st.Field(i).Name())
- fmt.Fprintf(b, `for i := range x.%s {
- currentLen += compressionLenHelper(c, x.%s[i], currentLen)
-}
-`, st.Field(i).Name(), st.Field(i).Name())
- }
- continue
- }
-
- switch {
- case st.Tag(i) == `dns:"cdomain-name"`:
- fallthrough
- case st.Tag(i) == `dns:"domain-name"`:
- out(st.Field(i).Name())
- }
- }
- }
- fmt.Fprintln(b, "}\nreturn currentLen - initLen\n}\n\n")
-
- // compressionLenSearchType - search cdomain-tags types for compressible names.
-
- fmt.Fprint(b, "func compressionLenSearchType(c map[string]int, r RR) (int, bool, int) {\n")
- fmt.Fprint(b, "switch x := r.(type) {\n")
- for _, name := range cdomainTypes {
- o := scope.Lookup(name)
- st, _ := getTypeStruct(o.Type(), scope)
-
- fmt.Fprintf(b, "case *%s:\n", name)
- j := 1
- for i := 1; i < st.NumFields(); i++ {
- out := func(s string, j int) {
- fmt.Fprintf(b, "k%d, ok%d, sz%d := compressionLenSearch(c, x.%s)\n", j, j, j, st.Field(i).Name())
- }
-
- // There are no slice types with names that can be compressed.
-
- switch {
- case st.Tag(i) == `dns:"cdomain-name"`:
- out(st.Field(i).Name(), j)
- j++
- }
- }
- k := "k1"
- ok := "ok1"
- sz := "sz1"
- for i := 2; i < j; i++ {
- k += fmt.Sprintf(" + k%d", i)
- ok += fmt.Sprintf(" && ok%d", i)
- sz += fmt.Sprintf(" + sz%d", i)
- }
- fmt.Fprintf(b, "return %s, %s, %s\n", k, ok, sz)
- }
- fmt.Fprintln(b, "}\nreturn 0, false, 0\n}\n\n")
-
- // gofmt
- res, err := format.Source(b.Bytes())
- if err != nil {
- b.WriteTo(os.Stderr)
- log.Fatal(err)
- }
-
- f, err := os.Create("zcompress.go")
- fatalIfErr(err)
- defer f.Close()
- f.Write(res)
-}
-
-func fatalIfErr(err error) {
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/vendor/github.com/miekg/dns/defaults.go b/vendor/github.com/miekg/dns/defaults.go
index 14e18b0b38..b059f6fc67 100644
--- a/vendor/github.com/miekg/dns/defaults.go
+++ b/vendor/github.com/miekg/dns/defaults.go
@@ -4,6 +4,7 @@ import (
"errors"
"net"
"strconv"
+ "strings"
)
const hexDigit = "0123456789abcdef"
@@ -145,10 +146,9 @@ func (dns *Msg) IsTsig() *TSIG {
// record in the additional section will do. It returns the OPT record
// found or nil.
func (dns *Msg) IsEdns0() *OPT {
- // EDNS0 is at the end of the additional section, start there.
- // We might want to change this to *only* look at the last two
- // records. So we see TSIG and/or OPT - this a slightly bigger
- // change though.
+ // RFC 6891, Section 6.1.1 allows the OPT record to appear
+ // anywhere in the additional record section, but it's usually at
+ // the end so start there.
for i := len(dns.Extra) - 1; i >= 0; i-- {
if dns.Extra[i].Header().Rrtype == TypeOPT {
return dns.Extra[i].(*OPT)
@@ -157,17 +157,93 @@ func (dns *Msg) IsEdns0() *OPT {
return nil
}
+// popEdns0 is like IsEdns0, but it removes the record from the message.
+func (dns *Msg) popEdns0() *OPT {
+ // RFC 6891, Section 6.1.1 allows the OPT record to appear
+ // anywhere in the additional record section, but it's usually at
+ // the end so start there.
+ for i := len(dns.Extra) - 1; i >= 0; i-- {
+ if dns.Extra[i].Header().Rrtype == TypeOPT {
+ opt := dns.Extra[i].(*OPT)
+ dns.Extra = append(dns.Extra[:i], dns.Extra[i+1:]...)
+ return opt
+ }
+ }
+ return nil
+}
+
// IsDomainName checks if s is a valid domain name, it returns the number of
// labels and true, when a domain name is valid. Note that non fully qualified
// domain name is considered valid, in this case the last label is counted in
// the number of labels. When false is returned the number of labels is not
// defined. Also note that this function is extremely liberal; almost any
// string is a valid domain name as the DNS is 8 bit protocol. It checks if each
-// label fits in 63 characters, but there is no length check for the entire
-// string s. I.e. a domain name longer than 255 characters is considered valid.
+// label fits in 63 characters and that the entire name will fit into the 255
+// octet wire format limit.
func IsDomainName(s string) (labels int, ok bool) {
- _, labels, err := packDomainName(s, nil, 0, nil, false)
- return labels, err == nil
+ // XXX: The logic in this function was copied from packDomainName and
+ // should be kept in sync with that function.
+
+ const lenmsg = 256
+
+ if len(s) == 0 { // Ok, for instance when dealing with update RR without any rdata.
+ return 0, false
+ }
+
+ s = Fqdn(s)
+
+ // Each dot ends a segment of the name. Except for escaped dots (\.), which
+ // are normal dots.
+
+ var (
+ off int
+ begin int
+ wasDot bool
+ )
+ for i := 0; i < len(s); i++ {
+ switch s[i] {
+ case '\\':
+ if off+1 > lenmsg {
+ return labels, false
+ }
+
+ // check for \DDD
+ if i+3 < len(s) && isDigit(s[i+1]) && isDigit(s[i+2]) && isDigit(s[i+3]) {
+ i += 3
+ begin += 3
+ } else {
+ i++
+ begin++
+ }
+
+ wasDot = false
+ case '.':
+ if wasDot {
+ // two dots back to back is not legal
+ return labels, false
+ }
+ wasDot = true
+
+ labelLen := i - begin
+ if labelLen >= 1<<6 { // top two bits of length must be clear
+ return labels, false
+ }
+
+ // off can already (we're in a loop) be bigger than lenmsg
+ // this happens when a name isn't fully qualified
+ off += 1 + labelLen
+ if off > lenmsg {
+ return labels, false
+ }
+
+ labels++
+ begin = i + 1
+ default:
+ wasDot = false
+ }
+ }
+
+ return labels, true
}
// IsSubDomain checks if child is indeed a child of the parent. If child and parent
@@ -181,7 +257,7 @@ func IsSubDomain(parent, child string) bool {
// The checking is performed on the binary payload.
func IsMsg(buf []byte) error {
// Header
- if len(buf) < 12 {
+ if len(buf) < headerSize {
return errors.New("dns: bad message header")
}
// Header: Opcode
@@ -191,11 +267,18 @@ func IsMsg(buf []byte) error {
// IsFqdn checks if a domain name is fully qualified.
func IsFqdn(s string) bool {
- l := len(s)
- if l == 0 {
+ s2 := strings.TrimSuffix(s, ".")
+ if s == s2 {
return false
}
- return s[l-1] == '.'
+
+ i := strings.LastIndexFunc(s2, func(r rune) bool {
+ return r != '\\'
+ })
+
+ // Test whether we have an even number of escape sequences before
+ // the dot or none.
+ return (len(s2)-i)%2 != 0
}
// IsRRset checks if a set of RRs is a valid RRset as defined by RFC 2181.
@@ -244,12 +327,19 @@ func ReverseAddr(addr string) (arpa string, err error) {
if ip == nil {
return "", &Error{err: "unrecognized address: " + addr}
}
- if ip.To4() != nil {
- return strconv.Itoa(int(ip[15])) + "." + strconv.Itoa(int(ip[14])) + "." + strconv.Itoa(int(ip[13])) + "." +
- strconv.Itoa(int(ip[12])) + ".in-addr.arpa.", nil
+ if v4 := ip.To4(); v4 != nil {
+ buf := make([]byte, 0, net.IPv4len*4+len("in-addr.arpa."))
+ // Add it, in reverse, to the buffer
+ for i := len(v4) - 1; i >= 0; i-- {
+ buf = strconv.AppendInt(buf, int64(v4[i]), 10)
+ buf = append(buf, '.')
+ }
+ // Append "in-addr.arpa." and return (buf already has the final .)
+ buf = append(buf, "in-addr.arpa."...)
+ return string(buf), nil
}
// Must be IPv6
- buf := make([]byte, 0, len(ip)*4+len("ip6.arpa."))
+ buf := make([]byte, 0, net.IPv6len*4+len("ip6.arpa."))
// Add it, in reverse, to the buffer
for i := len(ip) - 1; i >= 0; i-- {
v := ip[i]
diff --git a/vendor/github.com/miekg/dns/dns.go b/vendor/github.com/miekg/dns/dns.go
index e7557f51a8..ad83a27ecf 100644
--- a/vendor/github.com/miekg/dns/dns.go
+++ b/vendor/github.com/miekg/dns/dns.go
@@ -34,10 +34,30 @@ type RR interface {
// copy returns a copy of the RR
copy() RR
- // len returns the length (in octets) of the uncompressed RR in wire format.
- len() int
- // pack packs an RR into wire format.
- pack([]byte, int, map[string]int, bool) (int, error)
+
+ // len returns the length (in octets) of the compressed or uncompressed RR in wire format.
+ //
+ // If compression is nil, the uncompressed size will be returned, otherwise the compressed
+ // size will be returned and domain names will be added to the map for future compression.
+ len(off int, compression map[string]struct{}) int
+
+ // pack packs the records RDATA into wire format. The header will
+ // already have been packed into msg.
+ pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error)
+
+ // unpack unpacks an RR from wire format.
+ //
+ // This will only be called on a new and empty RR type with only the header populated. It
+ // will only be called if the record's RDATA is non-empty.
+ unpack(msg []byte, off int) (off1 int, err error)
+
+ // parse parses an RR from zone file format.
+ //
+ // This will only be called on a new and empty RR type with only the header populated.
+ parse(c *zlexer, origin string) *ParseError
+
+ // isDuplicate returns whether the two RRs are duplicates.
+ isDuplicate(r2 RR) bool
}
// RR_Header is the header all DNS resource records share.
@@ -70,28 +90,45 @@ func (h *RR_Header) String() string {
return s
}
-func (h *RR_Header) len() int {
- l := len(h.Name) + 1
+func (h *RR_Header) len(off int, compression map[string]struct{}) int {
+ l := domainNameLen(h.Name, off, compression, true)
l += 10 // rrtype(2) + class(2) + ttl(4) + rdlength(2)
return l
}
+func (h *RR_Header) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ // RR_Header has no RDATA to pack.
+ return off, nil
+}
+
+func (h *RR_Header) unpack(msg []byte, off int) (int, error) {
+ panic("dns: internal error: unpack should never be called on RR_Header")
+}
+
+func (h *RR_Header) parse(c *zlexer, origin string) *ParseError {
+ panic("dns: internal error: parse should never be called on RR_Header")
+}
+
// ToRFC3597 converts a known RR to the unknown RR representation from RFC 3597.
func (rr *RFC3597) ToRFC3597(r RR) error {
- buf := make([]byte, r.len()*2)
- off, err := PackRR(r, buf, 0, nil, false)
+ buf := make([]byte, Len(r)*2)
+ headerEnd, off, err := packRR(r, buf, 0, compressionMap{}, false)
if err != nil {
return err
}
buf = buf[:off]
- if int(r.Header().Rdlength) > off {
- return ErrBuf
+
+ *rr = RFC3597{Hdr: *r.Header()}
+ rr.Hdr.Rdlength = uint16(off - headerEnd)
+
+ if noRdata(rr.Hdr) {
+ return nil
}
- rfc3597, _, err := unpackRFC3597(*r.Header(), buf, off-int(r.Header().Rdlength))
+ _, err = rr.unpack(buf, headerEnd)
if err != nil {
return err
}
- *rr = *rfc3597.(*RFC3597)
+
return nil
}
diff --git a/vendor/github.com/miekg/dns/dnssec.go b/vendor/github.com/miekg/dns/dnssec.go
index 26b512e7da..12a693f97c 100644
--- a/vendor/github.com/miekg/dns/dnssec.go
+++ b/vendor/github.com/miekg/dns/dnssec.go
@@ -67,9 +67,6 @@ var AlgorithmToString = map[uint8]string{
PRIVATEOID: "PRIVATEOID",
}
-// StringToAlgorithm is the reverse of AlgorithmToString.
-var StringToAlgorithm = reverseInt8(AlgorithmToString)
-
// AlgorithmToHash is a map of algorithm crypto hash IDs to crypto.Hash's.
var AlgorithmToHash = map[uint8]crypto.Hash{
RSAMD5: crypto.MD5, // Deprecated in RFC 6725
@@ -102,9 +99,6 @@ var HashToString = map[uint8]string{
SHA512: "SHA512",
}
-// StringToHash is a map of names to hash IDs.
-var StringToHash = reverseInt8(HashToString)
-
// DNSKEY flag values.
const (
SEP = 1
@@ -147,8 +141,8 @@ func (k *DNSKEY) KeyTag() uint16 {
switch k.Algorithm {
case RSAMD5:
// Look at the bottom two bytes of the modules, which the last
- // item in the pubkey. We could do this faster by looking directly
- // at the base64 values. But I'm lazy.
+ // item in the pubkey.
+ // This algorithm has been deprecated, but keep this key-tag calculation.
modulus, _ := fromBase64([]byte(k.PublicKey))
if len(modulus) > 1 {
x := binary.BigEndian.Uint16(modulus[len(modulus)-2:])
@@ -268,16 +262,17 @@ func (rr *RRSIG) Sign(k crypto.Signer, rrset []RR) error {
return ErrKey
}
+ h0 := rrset[0].Header()
rr.Hdr.Rrtype = TypeRRSIG
- rr.Hdr.Name = rrset[0].Header().Name
- rr.Hdr.Class = rrset[0].Header().Class
+ rr.Hdr.Name = h0.Name
+ rr.Hdr.Class = h0.Class
if rr.OrigTtl == 0 { // If set don't override
- rr.OrigTtl = rrset[0].Header().Ttl
+ rr.OrigTtl = h0.Ttl
}
- rr.TypeCovered = rrset[0].Header().Rrtype
- rr.Labels = uint8(CountLabel(rrset[0].Header().Name))
+ rr.TypeCovered = h0.Rrtype
+ rr.Labels = uint8(CountLabel(h0.Name))
- if strings.HasPrefix(rrset[0].Header().Name, "*") {
+ if strings.HasPrefix(h0.Name, "*") {
rr.Labels-- // wildcard, remove from label count
}
@@ -323,6 +318,9 @@ func (rr *RRSIG) Sign(k crypto.Signer, rrset []RR) error {
}
rr.Signature = toBase64(signature)
+ case RSAMD5, DSA, DSANSEC3SHA1:
+ // See RFC 6944.
+ return ErrAlg
default:
h := hash.New()
h.Write(signdata)
@@ -401,7 +399,7 @@ func (rr *RRSIG) Verify(k *DNSKEY, rrset []RR) error {
if rr.Algorithm != k.Algorithm {
return ErrKey
}
- if strings.ToLower(rr.SignerName) != strings.ToLower(k.Hdr.Name) {
+ if !strings.EqualFold(rr.SignerName, k.Hdr.Name) {
return ErrKey
}
if k.Protocol != 3 {
@@ -411,10 +409,7 @@ func (rr *RRSIG) Verify(k *DNSKEY, rrset []RR) error {
// IsRRset checked that we have at least one RR and that the RRs in
// the set have consistent type, class, and name. Also check that type and
// class matches the RRSIG record.
- if rrset[0].Header().Class != rr.Hdr.Class {
- return ErrRRset
- }
- if rrset[0].Header().Rrtype != rr.TypeCovered {
+ if h0 := rrset[0].Header(); h0.Class != rr.Hdr.Class || h0.Rrtype != rr.TypeCovered {
return ErrRRset
}
@@ -563,20 +558,19 @@ func (k *DNSKEY) publicKeyRSA() *rsa.PublicKey {
pubkey := new(rsa.PublicKey)
- expo := uint64(0)
- for i := 0; i < int(explen); i++ {
+ var expo uint64
+ // The exponent of length explen is between keyoff and modoff.
+ for _, v := range keybuf[keyoff:modoff] {
expo <<= 8
- expo |= uint64(keybuf[keyoff+i])
+ expo |= uint64(v)
}
if expo > 1<<31-1 {
// Larger exponent than supported by the crypto package.
return nil
}
+
pubkey.E = int(expo)
-
- pubkey.N = big.NewInt(0)
- pubkey.N.SetBytes(keybuf[modoff:])
-
+ pubkey.N = new(big.Int).SetBytes(keybuf[modoff:])
return pubkey
}
@@ -601,10 +595,8 @@ func (k *DNSKEY) publicKeyECDSA() *ecdsa.PublicKey {
return nil
}
}
- pubkey.X = big.NewInt(0)
- pubkey.X.SetBytes(keybuf[:len(keybuf)/2])
- pubkey.Y = big.NewInt(0)
- pubkey.Y.SetBytes(keybuf[len(keybuf)/2:])
+ pubkey.X = new(big.Int).SetBytes(keybuf[:len(keybuf)/2])
+ pubkey.Y = new(big.Int).SetBytes(keybuf[len(keybuf)/2:])
return pubkey
}
@@ -625,10 +617,10 @@ func (k *DNSKEY) publicKeyDSA() *dsa.PublicKey {
p, keybuf := keybuf[:size], keybuf[size:]
g, y := keybuf[:size], keybuf[size:]
pubkey := new(dsa.PublicKey)
- pubkey.Parameters.Q = big.NewInt(0).SetBytes(q)
- pubkey.Parameters.P = big.NewInt(0).SetBytes(p)
- pubkey.Parameters.G = big.NewInt(0).SetBytes(g)
- pubkey.Y = big.NewInt(0).SetBytes(y)
+ pubkey.Parameters.Q = new(big.Int).SetBytes(q)
+ pubkey.Parameters.P = new(big.Int).SetBytes(p)
+ pubkey.Parameters.G = new(big.Int).SetBytes(g)
+ pubkey.Y = new(big.Int).SetBytes(y)
return pubkey
}
@@ -658,15 +650,16 @@ func rawSignatureData(rrset []RR, s *RRSIG) (buf []byte, err error) {
wires := make(wireSlice, len(rrset))
for i, r := range rrset {
r1 := r.copy()
- r1.Header().Ttl = s.OrigTtl
- labels := SplitDomainName(r1.Header().Name)
+ h := r1.Header()
+ h.Ttl = s.OrigTtl
+ labels := SplitDomainName(h.Name)
// 6.2. Canonical RR Form. (4) - wildcards
if len(labels) > int(s.Labels) {
// Wildcard
- r1.Header().Name = "*." + strings.Join(labels[len(labels)-int(s.Labels):], ".") + "."
+ h.Name = "*." + strings.Join(labels[len(labels)-int(s.Labels):], ".") + "."
}
// RFC 4034: 6.2. Canonical RR Form. (2) - domain name to lowercase
- r1.Header().Name = strings.ToLower(r1.Header().Name)
+ h.Name = strings.ToLower(h.Name)
// 6.2. Canonical RR Form. (3) - domain rdata to lowercase.
// NS, MD, MF, CNAME, SOA, MB, MG, MR, PTR,
// HINFO, MINFO, MX, RP, AFSDB, RT, SIG, PX, NXT, NAPTR, KX,
@@ -724,7 +717,7 @@ func rawSignatureData(rrset []RR, s *RRSIG) (buf []byte, err error) {
x.Target = strings.ToLower(x.Target)
}
// 6.2. Canonical RR Form. (5) - origTTL
- wire := make([]byte, r1.len()+1) // +1 to be safe(r)
+ wire := make([]byte, Len(r1)+1) // +1 to be safe(r)
off, err1 := PackRR(r1, wire, 0, nil, false)
if err1 != nil {
return nil, err1
diff --git a/vendor/github.com/miekg/dns/dnssec_keygen.go b/vendor/github.com/miekg/dns/dnssec_keygen.go
index 33e913ac52..60737e5b2b 100644
--- a/vendor/github.com/miekg/dns/dnssec_keygen.go
+++ b/vendor/github.com/miekg/dns/dnssec_keygen.go
@@ -2,7 +2,6 @@ package dns
import (
"crypto"
- "crypto/dsa"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
@@ -20,11 +19,9 @@ import (
// bits should be set to the size of the algorithm.
func (k *DNSKEY) Generate(bits int) (crypto.PrivateKey, error) {
switch k.Algorithm {
- case DSA, DSANSEC3SHA1:
- if bits != 1024 {
- return nil, ErrKeySize
- }
- case RSAMD5, RSASHA1, RSASHA256, RSASHA1NSEC3SHA1:
+ case RSAMD5, DSA, DSANSEC3SHA1:
+ return nil, ErrAlg
+ case RSASHA1, RSASHA256, RSASHA1NSEC3SHA1:
if bits < 512 || bits > 4096 {
return nil, ErrKeySize
}
@@ -47,20 +44,7 @@ func (k *DNSKEY) Generate(bits int) (crypto.PrivateKey, error) {
}
switch k.Algorithm {
- case DSA, DSANSEC3SHA1:
- params := new(dsa.Parameters)
- if err := dsa.GenerateParameters(params, rand.Reader, dsa.L1024N160); err != nil {
- return nil, err
- }
- priv := new(dsa.PrivateKey)
- priv.PublicKey.Parameters = *params
- err := dsa.GenerateKey(priv, rand.Reader)
- if err != nil {
- return nil, err
- }
- k.setPublicKeyDSA(params.Q, params.P, params.G, priv.PublicKey.Y)
- return priv, nil
- case RSAMD5, RSASHA1, RSASHA256, RSASHA512, RSASHA1NSEC3SHA1:
+ case RSASHA1, RSASHA256, RSASHA512, RSASHA1NSEC3SHA1:
priv, err := rsa.GenerateKey(rand.Reader, bits)
if err != nil {
return nil, err
@@ -120,16 +104,6 @@ func (k *DNSKEY) setPublicKeyECDSA(_X, _Y *big.Int) bool {
return true
}
-// Set the public key for DSA
-func (k *DNSKEY) setPublicKeyDSA(_Q, _P, _G, _Y *big.Int) bool {
- if _Q == nil || _P == nil || _G == nil || _Y == nil {
- return false
- }
- buf := dsaToBuf(_Q, _P, _G, _Y)
- k.PublicKey = toBase64(buf)
- return true
-}
-
// Set the public key for Ed25519
func (k *DNSKEY) setPublicKeyED25519(_K ed25519.PublicKey) bool {
if _K == nil {
@@ -164,15 +138,3 @@ func curveToBuf(_X, _Y *big.Int, intlen int) []byte {
buf = append(buf, intToBytes(_Y, intlen)...)
return buf
}
-
-// Set the public key for X and Y for Curve. The two
-// values are just concatenated.
-func dsaToBuf(_Q, _P, _G, _Y *big.Int) []byte {
- t := divRoundUp(divRoundUp(_G.BitLen(), 8)-64, 8)
- buf := []byte{byte(t)}
- buf = append(buf, intToBytes(_Q, 20)...)
- buf = append(buf, intToBytes(_P, 64+t*8)...)
- buf = append(buf, intToBytes(_G, 64+t*8)...)
- buf = append(buf, intToBytes(_Y, 64+t*8)...)
- return buf
-}
diff --git a/vendor/github.com/miekg/dns/dnssec_keyscan.go b/vendor/github.com/miekg/dns/dnssec_keyscan.go
index 5e65422301..0e6f320165 100644
--- a/vendor/github.com/miekg/dns/dnssec_keyscan.go
+++ b/vendor/github.com/miekg/dns/dnssec_keyscan.go
@@ -3,7 +3,6 @@ package dns
import (
"bufio"
"crypto"
- "crypto/dsa"
"crypto/ecdsa"
"crypto/rsa"
"io"
@@ -44,19 +43,8 @@ func (k *DNSKEY) ReadPrivateKey(q io.Reader, file string) (crypto.PrivateKey, er
return nil, ErrPrivKey
}
switch uint8(algo) {
- case DSA:
- priv, err := readPrivateKeyDSA(m)
- if err != nil {
- return nil, err
- }
- pub := k.publicKeyDSA()
- if pub == nil {
- return nil, ErrKey
- }
- priv.PublicKey = *pub
- return priv, nil
- case RSAMD5:
- fallthrough
+ case RSAMD5, DSA, DSANSEC3SHA1:
+ return nil, ErrAlg
case RSASHA1:
fallthrough
case RSASHA1NSEC3SHA1:
@@ -109,21 +97,16 @@ func readPrivateKeyRSA(m map[string]string) (*rsa.PrivateKey, error) {
}
switch k {
case "modulus":
- p.PublicKey.N = big.NewInt(0)
- p.PublicKey.N.SetBytes(v1)
+ p.PublicKey.N = new(big.Int).SetBytes(v1)
case "publicexponent":
- i := big.NewInt(0)
- i.SetBytes(v1)
+ i := new(big.Int).SetBytes(v1)
p.PublicKey.E = int(i.Int64()) // int64 should be large enough
case "privateexponent":
- p.D = big.NewInt(0)
- p.D.SetBytes(v1)
+ p.D = new(big.Int).SetBytes(v1)
case "prime1":
- p.Primes[0] = big.NewInt(0)
- p.Primes[0].SetBytes(v1)
+ p.Primes[0] = new(big.Int).SetBytes(v1)
case "prime2":
- p.Primes[1] = big.NewInt(0)
- p.Primes[1].SetBytes(v1)
+ p.Primes[1] = new(big.Int).SetBytes(v1)
}
case "exponent1", "exponent2", "coefficient":
// not used in Go (yet)
@@ -134,27 +117,9 @@ func readPrivateKeyRSA(m map[string]string) (*rsa.PrivateKey, error) {
return p, nil
}
-func readPrivateKeyDSA(m map[string]string) (*dsa.PrivateKey, error) {
- p := new(dsa.PrivateKey)
- p.X = big.NewInt(0)
- for k, v := range m {
- switch k {
- case "private_value(x)":
- v1, err := fromBase64([]byte(v))
- if err != nil {
- return nil, err
- }
- p.X.SetBytes(v1)
- case "created", "publish", "activate":
- /* not used in Go (yet) */
- }
- }
- return p, nil
-}
-
func readPrivateKeyECDSA(m map[string]string) (*ecdsa.PrivateKey, error) {
p := new(ecdsa.PrivateKey)
- p.D = big.NewInt(0)
+ p.D = new(big.Int)
// TODO: validate that the required flags are present
for k, v := range m {
switch k {
@@ -322,6 +287,11 @@ func (kl *klexer) Next() (lex, bool) {
commt = false
}
+ if kl.key && str.Len() == 0 {
+ // ignore empty lines
+ break
+ }
+
kl.key = true
l.value = zValue
diff --git a/vendor/github.com/miekg/dns/dnssec_privkey.go b/vendor/github.com/miekg/dns/dnssec_privkey.go
index 0c65be17bc..4493c9d574 100644
--- a/vendor/github.com/miekg/dns/dnssec_privkey.go
+++ b/vendor/github.com/miekg/dns/dnssec_privkey.go
@@ -13,6 +13,8 @@ import (
const format = "Private-key-format: v1.3\n"
+var bigIntOne = big.NewInt(1)
+
// PrivateKeyString converts a PrivateKey to a string. This string has the same
// format as the private-key-file of BIND9 (Private-key-format: v1.3).
// It needs some info from the key (the algorithm), so its a method of the DNSKEY
@@ -31,12 +33,11 @@ func (r *DNSKEY) PrivateKeyString(p crypto.PrivateKey) string {
prime2 := toBase64(p.Primes[1].Bytes())
// Calculate Exponent1/2 and Coefficient as per: http://en.wikipedia.org/wiki/RSA#Using_the_Chinese_remainder_algorithm
// and from: http://code.google.com/p/go/issues/detail?id=987
- one := big.NewInt(1)
- p1 := big.NewInt(0).Sub(p.Primes[0], one)
- q1 := big.NewInt(0).Sub(p.Primes[1], one)
- exp1 := big.NewInt(0).Mod(p.D, p1)
- exp2 := big.NewInt(0).Mod(p.D, q1)
- coeff := big.NewInt(0).ModInverse(p.Primes[1], p.Primes[0])
+ p1 := new(big.Int).Sub(p.Primes[0], bigIntOne)
+ q1 := new(big.Int).Sub(p.Primes[1], bigIntOne)
+ exp1 := new(big.Int).Mod(p.D, p1)
+ exp2 := new(big.Int).Mod(p.D, q1)
+ coeff := new(big.Int).ModInverse(p.Primes[1], p.Primes[0])
exponent1 := toBase64(exp1.Bytes())
exponent2 := toBase64(exp2.Bytes())
diff --git a/vendor/github.com/miekg/dns/doc.go b/vendor/github.com/miekg/dns/doc.go
index 0389d7248e..d3d7cec9ef 100644
--- a/vendor/github.com/miekg/dns/doc.go
+++ b/vendor/github.com/miekg/dns/doc.go
@@ -1,20 +1,20 @@
/*
Package dns implements a full featured interface to the Domain Name System.
-Server- and client-side programming is supported.
-The package allows complete control over what is sent out to the DNS. The package
-API follows the less-is-more principle, by presenting a small, clean interface.
+Both server- and client-side programming is supported. The package allows
+complete control over what is sent out to the DNS. The API follows the
+less-is-more principle, by presenting a small, clean interface.
-The package dns supports (asynchronous) querying/replying, incoming/outgoing zone transfers,
+It supports (asynchronous) querying/replying, incoming/outgoing zone transfers,
TSIG, EDNS0, dynamic updates, notifies and DNSSEC validation/signing.
-Note that domain names MUST be fully qualified, before sending them, unqualified
+
+Note that domain names MUST be fully qualified before sending them, unqualified
names in a message will result in a packing failure.
-Resource records are native types. They are not stored in wire format.
-Basic usage pattern for creating a new resource record:
+Resource records are native types. They are not stored in wire format. Basic
+usage pattern for creating a new resource record:
r := new(dns.MX)
- r.Hdr = dns.RR_Header{Name: "miek.nl.", Rrtype: dns.TypeMX,
- Class: dns.ClassINET, Ttl: 3600}
+ r.Hdr = dns.RR_Header{Name: "miek.nl.", Rrtype: dns.TypeMX, Class: dns.ClassINET, Ttl: 3600}
r.Preference = 10
r.Mx = "mx.miek.nl."
@@ -30,8 +30,8 @@ Or even:
mx, err := dns.NewRR("$ORIGIN nl.\nmiek 1H IN MX 10 mx.miek")
-In the DNS messages are exchanged, these messages contain resource
-records (sets). Use pattern for creating a message:
+In the DNS messages are exchanged, these messages contain resource records
+(sets). Use pattern for creating a message:
m := new(dns.Msg)
m.SetQuestion("miek.nl.", dns.TypeMX)
@@ -40,8 +40,8 @@ Or when not certain if the domain name is fully qualified:
m.SetQuestion(dns.Fqdn("miek.nl"), dns.TypeMX)
-The message m is now a message with the question section set to ask
-the MX records for the miek.nl. zone.
+The message m is now a message with the question section set to ask the MX
+records for the miek.nl. zone.
The following is slightly more verbose, but more flexible:
@@ -51,9 +51,8 @@ The following is slightly more verbose, but more flexible:
m1.Question = make([]dns.Question, 1)
m1.Question[0] = dns.Question{"miek.nl.", dns.TypeMX, dns.ClassINET}
-After creating a message it can be sent.
-Basic use pattern for synchronous querying the DNS at a
-server configured on 127.0.0.1 and port 53:
+After creating a message it can be sent. Basic use pattern for synchronous
+querying the DNS at a server configured on 127.0.0.1 and port 53:
c := new(dns.Client)
in, rtt, err := c.Exchange(m1, "127.0.0.1:53")
@@ -99,25 +98,24 @@ the Answer section:
Domain Name and TXT Character String Representations
-Both domain names and TXT character strings are converted to presentation
-form both when unpacked and when converted to strings.
+Both domain names and TXT character strings are converted to presentation form
+both when unpacked and when converted to strings.
For TXT character strings, tabs, carriage returns and line feeds will be
-converted to \t, \r and \n respectively. Back slashes and quotations marks
-will be escaped. Bytes below 32 and above 127 will be converted to \DDD
-form.
+converted to \t, \r and \n respectively. Back slashes and quotations marks will
+be escaped. Bytes below 32 and above 127 will be converted to \DDD form.
-For domain names, in addition to the above rules brackets, periods,
-spaces, semicolons and the at symbol are escaped.
+For domain names, in addition to the above rules brackets, periods, spaces,
+semicolons and the at symbol are escaped.
DNSSEC
-DNSSEC (DNS Security Extension) adds a layer of security to the DNS. It
-uses public key cryptography to sign resource records. The
-public keys are stored in DNSKEY records and the signatures in RRSIG records.
+DNSSEC (DNS Security Extension) adds a layer of security to the DNS. It uses
+public key cryptography to sign resource records. The public keys are stored in
+DNSKEY records and the signatures in RRSIG records.
-Requesting DNSSEC information for a zone is done by adding the DO (DNSSEC OK) bit
-to a request.
+Requesting DNSSEC information for a zone is done by adding the DO (DNSSEC OK)
+bit to a request.
m := new(dns.Msg)
m.SetEdns0(4096, true)
@@ -126,9 +124,9 @@ Signature generation, signature verification and key generation are all supporte
DYNAMIC UPDATES
-Dynamic updates reuses the DNS message format, but renames three of
-the sections. Question is Zone, Answer is Prerequisite, Authority is
-Update, only the Additional is not renamed. See RFC 2136 for the gory details.
+Dynamic updates reuses the DNS message format, but renames three of the
+sections. Question is Zone, Answer is Prerequisite, Authority is Update, only
+the Additional is not renamed. See RFC 2136 for the gory details.
You can set a rather complex set of rules for the existence of absence of
certain resource records or names in a zone to specify if resource records
@@ -145,10 +143,9 @@ DNS function shows which functions exist to specify the prerequisites.
NONE rrset empty RRset does not exist dns.RRsetNotUsed
zone rrset rr RRset exists (value dep) dns.Used
-The prerequisite section can also be left empty.
-If you have decided on the prerequisites you can tell what RRs should
-be added or deleted. The next table shows the options you have and
-what functions to call.
+The prerequisite section can also be left empty. If you have decided on the
+prerequisites you can tell what RRs should be added or deleted. The next table
+shows the options you have and what functions to call.
3.4.2.6 - Table Of Metavalues Used In Update Section
@@ -181,10 +178,10 @@ changes to the RRset after calling SetTsig() the signature will be incorrect.
...
// When sending the TSIG RR is calculated and filled in before sending
-When requesting an zone transfer (almost all TSIG usage is when requesting zone transfers), with
-TSIG, this is the basic use pattern. In this example we request an AXFR for
-miek.nl. with TSIG key named "axfr." and secret "so6ZGir4GPAqINNh9U5c3A=="
-and using the server 176.58.119.54:
+When requesting an zone transfer (almost all TSIG usage is when requesting zone
+transfers), with TSIG, this is the basic use pattern. In this example we
+request an AXFR for miek.nl. with TSIG key named "axfr." and secret
+"so6ZGir4GPAqINNh9U5c3A==" and using the server 176.58.119.54:
t := new(dns.Transfer)
m := new(dns.Msg)
@@ -194,8 +191,8 @@ and using the server 176.58.119.54:
c, err := t.In(m, "176.58.119.54:53")
for r := range c { ... }
-You can now read the records from the transfer as they come in. Each envelope is checked with TSIG.
-If something is not correct an error is returned.
+You can now read the records from the transfer as they come in. Each envelope
+is checked with TSIG. If something is not correct an error is returned.
Basic use pattern validating and replying to a message that has TSIG set.
@@ -220,29 +217,30 @@ Basic use pattern validating and replying to a message that has TSIG set.
PRIVATE RRS
-RFC 6895 sets aside a range of type codes for private use. This range
-is 65,280 - 65,534 (0xFF00 - 0xFFFE). When experimenting with new Resource Records these
+RFC 6895 sets aside a range of type codes for private use. This range is 65,280
+- 65,534 (0xFF00 - 0xFFFE). When experimenting with new Resource Records these
can be used, before requesting an official type code from IANA.
-see http://miek.nl/2014/September/21/idn-and-private-rr-in-go-dns/ for more
+See https://miek.nl/2014/September/21/idn-and-private-rr-in-go-dns/ for more
information.
EDNS0
-EDNS0 is an extension mechanism for the DNS defined in RFC 2671 and updated
-by RFC 6891. It defines an new RR type, the OPT RR, which is then completely
+EDNS0 is an extension mechanism for the DNS defined in RFC 2671 and updated by
+RFC 6891. It defines an new RR type, the OPT RR, which is then completely
abused.
+
Basic use pattern for creating an (empty) OPT RR:
o := new(dns.OPT)
o.Hdr.Name = "." // MUST be the root zone, per definition.
o.Hdr.Rrtype = dns.TypeOPT
-The rdata of an OPT RR consists out of a slice of EDNS0 (RFC 6891)
-interfaces. Currently only a few have been standardized: EDNS0_NSID
-(RFC 5001) and EDNS0_SUBNET (draft-vandergaast-edns-client-subnet-02). Note
-that these options may be combined in an OPT RR.
-Basic use pattern for a server to check if (and which) options are set:
+The rdata of an OPT RR consists out of a slice of EDNS0 (RFC 6891) interfaces.
+Currently only a few have been standardized: EDNS0_NSID (RFC 5001) and
+EDNS0_SUBNET (draft-vandergaast-edns-client-subnet-02). Note that these options
+may be combined in an OPT RR. Basic use pattern for a server to check if (and
+which) options are set:
// o is a dns.OPT
for _, s := range o.Option {
@@ -262,10 +260,9 @@ From RFC 2931:
... protection for glue records, DNS requests, protection for message headers
on requests and responses, and protection of the overall integrity of a response.
-It works like TSIG, except that SIG(0) uses public key cryptography, instead of the shared
-secret approach in TSIG.
-Supported algorithms: DSA, ECDSAP256SHA256, ECDSAP384SHA384, RSASHA1, RSASHA256 and
-RSASHA512.
+It works like TSIG, except that SIG(0) uses public key cryptography, instead of
+the shared secret approach in TSIG. Supported algorithms: DSA, ECDSAP256SHA256,
+ECDSAP384SHA384, RSASHA1, RSASHA256 and RSASHA512.
Signing subsequent messages in multi-message sessions is not implemented.
*/
diff --git a/vendor/github.com/miekg/dns/duplicate.go b/vendor/github.com/miekg/dns/duplicate.go
index 6372e8a194..00cda0aa29 100644
--- a/vendor/github.com/miekg/dns/duplicate.go
+++ b/vendor/github.com/miekg/dns/duplicate.go
@@ -7,19 +7,32 @@ package dns
// is so, otherwise false.
// It's is a protocol violation to have identical RRs in a message.
func IsDuplicate(r1, r2 RR) bool {
- if r1.Header().Class != r2.Header().Class {
+ // Check whether the record header is identical.
+ if !r1.Header().isDuplicate(r2.Header()) {
return false
}
- if r1.Header().Rrtype != r2.Header().Rrtype {
+
+ // Check whether the RDATA is identical.
+ return r1.isDuplicate(r2)
+}
+
+func (r1 *RR_Header) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*RR_Header)
+ if !ok {
return false
}
- if !isDulicateName(r1.Header().Name, r2.Header().Name) {
+ if r1.Class != r2.Class {
+ return false
+ }
+ if r1.Rrtype != r2.Rrtype {
+ return false
+ }
+ if !isDuplicateName(r1.Name, r2.Name) {
return false
}
// ignore TTL
-
- return isDuplicateRdata(r1, r2)
+ return true
}
-// isDulicateName checks if the domain names s1 and s2 are equal.
-func isDulicateName(s1, s2 string) bool { return equal(s1, s2) }
+// isDuplicateName checks if the domain names s1 and s2 are equal.
+func isDuplicateName(s1, s2 string) bool { return equal(s1, s2) }
diff --git a/vendor/github.com/miekg/dns/duplicate_generate.go b/vendor/github.com/miekg/dns/duplicate_generate.go
index 83ac1cf770..9b7a71b16e 100644
--- a/vendor/github.com/miekg/dns/duplicate_generate.go
+++ b/vendor/github.com/miekg/dns/duplicate_generate.go
@@ -57,10 +57,7 @@ func main() {
continue
}
- if name == "PrivateRR" || name == "RFC3597" {
- continue
- }
- if name == "OPT" || name == "ANY" || name == "IXFR" || name == "AXFR" {
+ if name == "PrivateRR" || name == "OPT" {
continue
}
@@ -70,22 +67,6 @@ func main() {
b := &bytes.Buffer{}
b.WriteString(packageHdr)
- // Generate the giant switch that calls the correct function for each type.
- fmt.Fprint(b, "// isDuplicateRdata calls the rdata specific functions\n")
- fmt.Fprint(b, "func isDuplicateRdata(r1, r2 RR) bool {\n")
- fmt.Fprint(b, "switch r1.Header().Rrtype {\n")
-
- for _, name := range namedTypes {
-
- o := scope.Lookup(name)
- _, isEmbedded := getTypeStruct(o.Type(), scope)
- if isEmbedded {
- continue
- }
- fmt.Fprintf(b, "case Type%s:\nreturn isDuplicate%s(r1.(*%s), r2.(*%s))\n", name, name, name, name)
- }
- fmt.Fprintf(b, "}\nreturn false\n}\n")
-
// Generate the duplicate check for each type.
fmt.Fprint(b, "// isDuplicate() functions\n\n")
for _, name := range namedTypes {
@@ -95,7 +76,10 @@ func main() {
if isEmbedded {
continue
}
- fmt.Fprintf(b, "func isDuplicate%s(r1, r2 *%s) bool {\n", name, name)
+ fmt.Fprintf(b, "func (r1 *%s) isDuplicate(_r2 RR) bool {\n", name)
+ fmt.Fprintf(b, "r2, ok := _r2.(*%s)\n", name)
+ fmt.Fprint(b, "if !ok { return false }\n")
+ fmt.Fprint(b, "_ = r2\n")
for i := 1; i < st.NumFields(); i++ {
field := st.Field(i).Name()
o2 := func(s string) { fmt.Fprintf(b, s+"\n", field, field) }
@@ -103,12 +87,12 @@ func main() {
// For some reason, a and aaaa don't pop up as *types.Slice here (mostly like because the are
// *indirectly* defined as a slice in the net package).
- if _, ok := st.Field(i).Type().(*types.Slice); ok || st.Tag(i) == `dns:"a"` || st.Tag(i) == `dns:"aaaa"` {
+ if _, ok := st.Field(i).Type().(*types.Slice); ok {
o2("if len(r1.%s) != len(r2.%s) {\nreturn false\n}")
if st.Tag(i) == `dns:"cdomain-name"` || st.Tag(i) == `dns:"domain-name"` {
o3(`for i := 0; i < len(r1.%s); i++ {
- if !isDulicateName(r1.%s[i], r2.%s[i]) {
+ if !isDuplicateName(r1.%s[i], r2.%s[i]) {
return false
}
}`)
@@ -128,8 +112,10 @@ func main() {
switch st.Tag(i) {
case `dns:"-"`:
// ignored
+ case `dns:"a"`, `dns:"aaaa"`:
+ o2("if !r1.%s.Equal(r2.%s) {\nreturn false\n}")
case `dns:"cdomain-name"`, `dns:"domain-name"`:
- o2("if !isDulicateName(r1.%s, r2.%s) {\nreturn false\n}")
+ o2("if !isDuplicateName(r1.%s, r2.%s) {\nreturn false\n}")
default:
o2("if r1.%s != r2.%s {\nreturn false\n}")
}
diff --git a/vendor/github.com/miekg/dns/edns.go b/vendor/github.com/miekg/dns/edns.go
index 18d054139b..8cdbfb0b07 100644
--- a/vendor/github.com/miekg/dns/edns.go
+++ b/vendor/github.com/miekg/dns/edns.go
@@ -78,16 +78,22 @@ func (rr *OPT) String() string {
return s
}
-func (rr *OPT) len() int {
- l := rr.Hdr.len()
- for i := 0; i < len(rr.Option); i++ {
+func (rr *OPT) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ for _, o := range rr.Option {
l += 4 // Account for 2-byte option code and 2-byte option length.
- lo, _ := rr.Option[i].pack()
+ lo, _ := o.pack()
l += len(lo)
}
return l
}
+func (rr *OPT) parse(c *zlexer, origin string) *ParseError {
+ panic("dns: internal error: parse should never be called on OPT")
+}
+
+func (r1 *OPT) isDuplicate(r2 RR) bool { return false }
+
// return the old value -> delete SetVersion?
// Version returns the EDNS version used. Only zero is defined.
@@ -102,15 +108,14 @@ func (rr *OPT) SetVersion(v uint8) {
// ExtendedRcode returns the EDNS extended RCODE field (the upper 8 bits of the TTL).
func (rr *OPT) ExtendedRcode() int {
- return int(rr.Hdr.Ttl&0xFF000000>>24) + 15
+ return int(rr.Hdr.Ttl&0xFF000000>>24) << 4
}
// SetExtendedRcode sets the EDNS extended RCODE field.
-func (rr *OPT) SetExtendedRcode(v uint8) {
- if v < RcodeBadVers { // Smaller than 16.. Use the 4 bits you have!
- return
- }
- rr.Hdr.Ttl = rr.Hdr.Ttl&0x00FFFFFF | uint32(v-15)<<24
+//
+// If the RCODE is not an extended RCODE, will reset the extended RCODE field to 0.
+func (rr *OPT) SetExtendedRcode(v uint16) {
+ rr.Hdr.Ttl = rr.Hdr.Ttl&0x00FFFFFF | uint32(v>>4)<<24
}
// UDPSize returns the UDP buffer size.
@@ -154,6 +159,8 @@ type EDNS0 interface {
unpack([]byte) error
// String returns the string representation of the option.
String() string
+ // copy returns a deep-copy of the option.
+ copy() EDNS0
}
// EDNS0_NSID option is used to retrieve a nameserver
@@ -184,7 +191,8 @@ func (e *EDNS0_NSID) pack() ([]byte, error) {
// Option implements the EDNS0 interface.
func (e *EDNS0_NSID) Option() uint16 { return EDNS0NSID } // Option returns the option code.
func (e *EDNS0_NSID) unpack(b []byte) error { e.Nsid = hex.EncodeToString(b); return nil }
-func (e *EDNS0_NSID) String() string { return string(e.Nsid) }
+func (e *EDNS0_NSID) String() string { return e.Nsid }
+func (e *EDNS0_NSID) copy() EDNS0 { return &EDNS0_NSID{e.Code, e.Nsid} }
// EDNS0_SUBNET is the subnet option that is used to give the remote nameserver
// an idea of where the client lives. See RFC 7871. It can then give back a different
@@ -274,22 +282,16 @@ func (e *EDNS0_SUBNET) unpack(b []byte) error {
if e.SourceNetmask > net.IPv4len*8 || e.SourceScope > net.IPv4len*8 {
return errors.New("dns: bad netmask")
}
- addr := make([]byte, net.IPv4len)
- for i := 0; i < net.IPv4len && 4+i < len(b); i++ {
- addr[i] = b[4+i]
- }
- e.Address = net.IPv4(addr[0], addr[1], addr[2], addr[3])
+ addr := make(net.IP, net.IPv4len)
+ copy(addr, b[4:])
+ e.Address = addr.To16()
case 2:
if e.SourceNetmask > net.IPv6len*8 || e.SourceScope > net.IPv6len*8 {
return errors.New("dns: bad netmask")
}
- addr := make([]byte, net.IPv6len)
- for i := 0; i < net.IPv6len && 4+i < len(b); i++ {
- addr[i] = b[4+i]
- }
- e.Address = net.IP{addr[0], addr[1], addr[2], addr[3], addr[4],
- addr[5], addr[6], addr[7], addr[8], addr[9], addr[10],
- addr[11], addr[12], addr[13], addr[14], addr[15]}
+ addr := make(net.IP, net.IPv6len)
+ copy(addr, b[4:])
+ e.Address = addr
default:
return errors.New("dns: bad address family")
}
@@ -308,6 +310,16 @@ func (e *EDNS0_SUBNET) String() (s string) {
return
}
+func (e *EDNS0_SUBNET) copy() EDNS0 {
+ return &EDNS0_SUBNET{
+ e.Code,
+ e.Family,
+ e.SourceNetmask,
+ e.SourceScope,
+ e.Address,
+ }
+}
+
// The EDNS0_COOKIE option is used to add a DNS Cookie to a message.
//
// o := new(dns.OPT)
@@ -343,6 +355,7 @@ func (e *EDNS0_COOKIE) pack() ([]byte, error) {
func (e *EDNS0_COOKIE) Option() uint16 { return EDNS0COOKIE }
func (e *EDNS0_COOKIE) unpack(b []byte) error { e.Cookie = hex.EncodeToString(b); return nil }
func (e *EDNS0_COOKIE) String() string { return e.Cookie }
+func (e *EDNS0_COOKIE) copy() EDNS0 { return &EDNS0_COOKIE{e.Code, e.Cookie} }
// The EDNS0_UL (Update Lease) (draft RFC) option is used to tell the server to set
// an expiration on an update RR. This is helpful for clients that cannot clean
@@ -364,6 +377,7 @@ type EDNS0_UL struct {
// Option implements the EDNS0 interface.
func (e *EDNS0_UL) Option() uint16 { return EDNS0UL }
func (e *EDNS0_UL) String() string { return strconv.FormatUint(uint64(e.Lease), 10) }
+func (e *EDNS0_UL) copy() EDNS0 { return &EDNS0_UL{e.Code, e.Lease} }
// Copied: http://golang.org/src/pkg/net/dnsmsg.go
func (e *EDNS0_UL) pack() ([]byte, error) {
@@ -418,10 +432,13 @@ func (e *EDNS0_LLQ) unpack(b []byte) error {
func (e *EDNS0_LLQ) String() string {
s := strconv.FormatUint(uint64(e.Version), 10) + " " + strconv.FormatUint(uint64(e.Opcode), 10) +
- " " + strconv.FormatUint(uint64(e.Error), 10) + " " + strconv.FormatUint(uint64(e.Id), 10) +
+ " " + strconv.FormatUint(uint64(e.Error), 10) + " " + strconv.FormatUint(e.Id, 10) +
" " + strconv.FormatUint(uint64(e.LeaseLife), 10)
return s
}
+func (e *EDNS0_LLQ) copy() EDNS0 {
+ return &EDNS0_LLQ{e.Code, e.Version, e.Opcode, e.Error, e.Id, e.LeaseLife}
+}
// EDNS0_DUA implements the EDNS0 "DNSSEC Algorithm Understood" option. See RFC 6975.
type EDNS0_DAU struct {
@@ -436,15 +453,16 @@ func (e *EDNS0_DAU) unpack(b []byte) error { e.AlgCode = b; return nil }
func (e *EDNS0_DAU) String() string {
s := ""
- for i := 0; i < len(e.AlgCode); i++ {
- if a, ok := AlgorithmToString[e.AlgCode[i]]; ok {
+ for _, alg := range e.AlgCode {
+ if a, ok := AlgorithmToString[alg]; ok {
s += " " + a
} else {
- s += " " + strconv.Itoa(int(e.AlgCode[i]))
+ s += " " + strconv.Itoa(int(alg))
}
}
return s
}
+func (e *EDNS0_DAU) copy() EDNS0 { return &EDNS0_DAU{e.Code, e.AlgCode} }
// EDNS0_DHU implements the EDNS0 "DS Hash Understood" option. See RFC 6975.
type EDNS0_DHU struct {
@@ -459,15 +477,16 @@ func (e *EDNS0_DHU) unpack(b []byte) error { e.AlgCode = b; return nil }
func (e *EDNS0_DHU) String() string {
s := ""
- for i := 0; i < len(e.AlgCode); i++ {
- if a, ok := HashToString[e.AlgCode[i]]; ok {
+ for _, alg := range e.AlgCode {
+ if a, ok := HashToString[alg]; ok {
s += " " + a
} else {
- s += " " + strconv.Itoa(int(e.AlgCode[i]))
+ s += " " + strconv.Itoa(int(alg))
}
}
return s
}
+func (e *EDNS0_DHU) copy() EDNS0 { return &EDNS0_DHU{e.Code, e.AlgCode} }
// EDNS0_N3U implements the EDNS0 "NSEC3 Hash Understood" option. See RFC 6975.
type EDNS0_N3U struct {
@@ -483,15 +502,16 @@ func (e *EDNS0_N3U) unpack(b []byte) error { e.AlgCode = b; return nil }
func (e *EDNS0_N3U) String() string {
// Re-use the hash map
s := ""
- for i := 0; i < len(e.AlgCode); i++ {
- if a, ok := HashToString[e.AlgCode[i]]; ok {
+ for _, alg := range e.AlgCode {
+ if a, ok := HashToString[alg]; ok {
s += " " + a
} else {
- s += " " + strconv.Itoa(int(e.AlgCode[i]))
+ s += " " + strconv.Itoa(int(alg))
}
}
return s
}
+func (e *EDNS0_N3U) copy() EDNS0 { return &EDNS0_N3U{e.Code, e.AlgCode} }
// EDNS0_EXPIRE implementes the EDNS0 option as described in RFC 7314.
type EDNS0_EXPIRE struct {
@@ -502,13 +522,11 @@ type EDNS0_EXPIRE struct {
// Option implements the EDNS0 interface.
func (e *EDNS0_EXPIRE) Option() uint16 { return EDNS0EXPIRE }
func (e *EDNS0_EXPIRE) String() string { return strconv.FormatUint(uint64(e.Expire), 10) }
+func (e *EDNS0_EXPIRE) copy() EDNS0 { return &EDNS0_EXPIRE{e.Code, e.Expire} }
func (e *EDNS0_EXPIRE) pack() ([]byte, error) {
b := make([]byte, 4)
- b[0] = byte(e.Expire >> 24)
- b[1] = byte(e.Expire >> 16)
- b[2] = byte(e.Expire >> 8)
- b[3] = byte(e.Expire)
+ binary.BigEndian.PutUint32(b, e.Expire)
return b, nil
}
@@ -543,6 +561,11 @@ func (e *EDNS0_LOCAL) Option() uint16 { return e.Code }
func (e *EDNS0_LOCAL) String() string {
return strconv.FormatInt(int64(e.Code), 10) + ":0x" + hex.EncodeToString(e.Data)
}
+func (e *EDNS0_LOCAL) copy() EDNS0 {
+ b := make([]byte, len(e.Data))
+ copy(b, e.Data)
+ return &EDNS0_LOCAL{e.Code, b}
+}
func (e *EDNS0_LOCAL) pack() ([]byte, error) {
b := make([]byte, len(e.Data))
@@ -615,6 +638,7 @@ func (e *EDNS0_TCP_KEEPALIVE) String() (s string) {
}
return
}
+func (e *EDNS0_TCP_KEEPALIVE) copy() EDNS0 { return &EDNS0_TCP_KEEPALIVE{e.Code, e.Length, e.Timeout} }
// EDNS0_PADDING option is used to add padding to a request/response. The default
// value of padding SHOULD be 0x0 but other values MAY be used, for instance if
@@ -628,3 +652,8 @@ func (e *EDNS0_PADDING) Option() uint16 { return EDNS0PADDING }
func (e *EDNS0_PADDING) pack() ([]byte, error) { return e.Padding, nil }
func (e *EDNS0_PADDING) unpack(b []byte) error { e.Padding = b; return nil }
func (e *EDNS0_PADDING) String() string { return fmt.Sprintf("%0X", e.Padding) }
+func (e *EDNS0_PADDING) copy() EDNS0 {
+ b := make([]byte, len(e.Padding))
+ copy(b, e.Padding)
+ return &EDNS0_PADDING{b}
+}
diff --git a/vendor/github.com/miekg/dns/format.go b/vendor/github.com/miekg/dns/format.go
index 3f5303c201..0ec79f2fc1 100644
--- a/vendor/github.com/miekg/dns/format.go
+++ b/vendor/github.com/miekg/dns/format.go
@@ -20,7 +20,7 @@ func Field(r RR, i int) string {
return ""
}
d := reflect.ValueOf(r).Elem().Field(i)
- switch k := d.Kind(); k {
+ switch d.Kind() {
case reflect.String:
return d.String()
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
@@ -31,6 +31,9 @@ func Field(r RR, i int) string {
switch reflect.ValueOf(r).Elem().Type().Field(i).Tag {
case `dns:"a"`:
// TODO(miek): Hmm store this as 16 bytes
+ if d.Len() < net.IPv4len {
+ return ""
+ }
if d.Len() < net.IPv6len {
return net.IPv4(byte(d.Index(0).Uint()),
byte(d.Index(1).Uint()),
@@ -42,6 +45,9 @@ func Field(r RR, i int) string {
byte(d.Index(14).Uint()),
byte(d.Index(15).Uint())).String()
case `dns:"aaaa"`:
+ if d.Len() < net.IPv6len {
+ return ""
+ }
return net.IP{
byte(d.Index(0).Uint()),
byte(d.Index(1).Uint()),
diff --git a/vendor/github.com/miekg/dns/generate.go b/vendor/github.com/miekg/dns/generate.go
index 97bc39f58a..26edc4f402 100644
--- a/vendor/github.com/miekg/dns/generate.go
+++ b/vendor/github.com/miekg/dns/generate.go
@@ -49,11 +49,15 @@ func (zp *ZoneParser) generate(l lex) (RR, bool) {
if err != nil {
return zp.setParseError("bad stop in $GENERATE range", l)
}
- if end < 0 || start < 0 || end < start {
+ if end < 0 || start < 0 || end < start || (end-start)/step > 65535 {
return zp.setParseError("bad range in $GENERATE range", l)
}
- zp.c.Next() // _BLANK
+ // _BLANK
+ l, ok := zp.c.Next()
+ if !ok || l.value != zBlank {
+ return zp.setParseError("garbage after $GENERATE range", l)
+ }
// Create a complete new string, which we then parse again.
var s string
diff --git a/vendor/github.com/miekg/dns/go.mod b/vendor/github.com/miekg/dns/go.mod
new file mode 100644
index 0000000000..5b9e187138
--- /dev/null
+++ b/vendor/github.com/miekg/dns/go.mod
@@ -0,0 +1,12 @@
+module github.com/miekg/dns
+
+go 1.12
+
+require (
+ golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392
+ golang.org/x/net v0.0.0-20190923162816-aa69164e4478
+ golang.org/x/sync v0.0.0-20190423024810-112230192c58
+ golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe
+ golang.org/x/text v0.3.2 // indirect
+ golang.org/x/tools v0.0.0-20190907020128-2ca718005c18 // indirect
+)
diff --git a/vendor/github.com/miekg/dns/go.sum b/vendor/github.com/miekg/dns/go.sum
new file mode 100644
index 0000000000..482c403595
--- /dev/null
+++ b/vendor/github.com/miekg/dns/go.sum
@@ -0,0 +1,33 @@
+golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4 h1:Vk3wNqEZwyGyei9yq5ekj7frek2u7HUfffJ1/opblzc=
+golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 h1:Gv7RPwsi3eZ2Fgewe3CBsuOebPwO27PoXzRpJPsvSSM=
+golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392 h1:ACG4HJsFiNMf47Y4PeRoebLNy/2lXT9EtprMuTFWt1M=
+golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
+golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3 h1:dgd4x4kJt7G4k4m93AYLzM8Ni6h2qLTfh9n9vXJT3/0=
+golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM=
+golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190923162816-aa69164e4478 h1:l5EDrHhldLYb3ZRHDUhXF7Om7MvYXnkV9/iQNo1lX6g=
+golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180928133829-e4b3c5e90611 h1:O33LKL7WyJgjN9CvxfTIomjIClbd/Kq86/iipowHQU0=
+golang.org/x/sys v0.0.0-20180928133829-e4b3c5e90611/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190904154756-749cb33beabd h1:DBH9mDw0zluJT/R+nGuV3jWFWLFaHyYZWD4tOT+cjn0=
+golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe h1:6fAMxZRR6sl1Uq8U61gxU+kPTs2tR8uOySCbBP7BN/M=
+golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/vendor/github.com/miekg/dns/labels.go b/vendor/github.com/miekg/dns/labels.go
index 577fc59d2c..e32d2a1d25 100644
--- a/vendor/github.com/miekg/dns/labels.go
+++ b/vendor/github.com/miekg/dns/labels.go
@@ -16,7 +16,7 @@ func SplitDomainName(s string) (labels []string) {
fqdnEnd := 0 // offset of the final '.' or the length of the name
idx := Split(s)
begin := 0
- if s[len(s)-1] == '.' {
+ if IsFqdn(s) {
fqdnEnd = len(s) - 1
} else {
fqdnEnd = len(s)
@@ -28,16 +28,13 @@ func SplitDomainName(s string) (labels []string) {
case 1:
// no-op
default:
- end := 0
- for i := 1; i < len(idx); i++ {
- end = idx[i]
+ for _, end := range idx[1:] {
labels = append(labels, s[begin:end-1])
begin = end
}
}
- labels = append(labels, s[begin:fqdnEnd])
- return labels
+ return append(labels, s[begin:fqdnEnd])
}
// CompareDomainName compares the names s1 and s2 and
diff --git a/vendor/github.com/miekg/dns/msg.go b/vendor/github.com/miekg/dns/msg.go
index 47ac6cf281..e04fb5d77a 100644
--- a/vendor/github.com/miekg/dns/msg.go
+++ b/vendor/github.com/miekg/dns/msg.go
@@ -9,7 +9,6 @@
package dns
//go:generate go run msg_generate.go
-//go:generate go run compress_generate.go
import (
crand "crypto/rand"
@@ -18,12 +17,35 @@ import (
"math/big"
"math/rand"
"strconv"
+ "strings"
"sync"
)
const (
maxCompressionOffset = 2 << 13 // We have 14 bits for the compression pointer
maxDomainNameWireOctets = 255 // See RFC 1035 section 2.3.4
+
+ // This is the maximum number of compression pointers that should occur in a
+ // semantically valid message. Each label in a domain name must be at least one
+ // octet and is separated by a period. The root label won't be represented by a
+ // compression pointer to a compression pointer, hence the -2 to exclude the
+ // smallest valid root label.
+ //
+ // It is possible to construct a valid message that has more compression pointers
+ // than this, and still doesn't loop, by pointing to a previous pointer. This is
+ // not something a well written implementation should ever do, so we leave them
+ // to trip the maximum compression pointer check.
+ maxCompressionPointers = (maxDomainNameWireOctets+1)/2 - 2
+
+ // This is the maximum length of a domain name in presentation format. The
+ // maximum wire length of a domain name is 255 octets (see above), with the
+ // maximum label length being 63. The wire format requires one extra byte over
+ // the presentation format, reducing the number of octets by 1. Each label in
+ // the name will be separated by a single period, with each octet in the label
+ // expanding to at most 4 bytes (\DDD). If all other labels are of the maximum
+ // length, then the final label can only be 61 octets long to not exceed the
+ // maximum allowed wire length.
+ maxDomainNamePresentationLength = 61*4 + 1 + 63*4 + 1 + 63*4 + 1 + 63*4 + 1
)
// Errors defined in this package.
@@ -46,10 +68,9 @@ var (
ErrRRset error = &Error{err: "bad rrset"}
ErrSecret error = &Error{err: "no secrets defined"}
ErrShortRead error = &Error{err: "short read"}
- ErrSig error = &Error{err: "bad signature"} // ErrSig indicates that a signature can not be cryptographically validated.
- ErrSoa error = &Error{err: "no SOA"} // ErrSOA indicates that no SOA RR was seen when doing zone transfers.
- ErrTime error = &Error{err: "bad time"} // ErrTime indicates a timing error in TSIG authentication.
- ErrTruncated error = &Error{err: "failed to unpack truncated message"} // ErrTruncated indicates that we failed to unpack a truncated message. We unpacked as much as we had so Msg can still be used, if desired.
+ ErrSig error = &Error{err: "bad signature"} // ErrSig indicates that a signature can not be cryptographically validated.
+ ErrSoa error = &Error{err: "no SOA"} // ErrSOA indicates that no SOA RR was seen when doing zone transfers.
+ ErrTime error = &Error{err: "bad time"} // ErrTime indicates a timing error in TSIG authentication.
)
// Id by default, returns a 16 bits random number to be used as a
@@ -151,7 +172,7 @@ var RcodeToString = map[int]string{
RcodeFormatError: "FORMERR",
RcodeServerFailure: "SERVFAIL",
RcodeNameError: "NXDOMAIN",
- RcodeNotImplemented: "NOTIMPL",
+ RcodeNotImplemented: "NOTIMP",
RcodeRefused: "REFUSED",
RcodeYXDomain: "YXDOMAIN", // See RFC 2136
RcodeYXRrset: "YXRRSET",
@@ -169,6 +190,39 @@ var RcodeToString = map[int]string{
RcodeBadCookie: "BADCOOKIE",
}
+// compressionMap is used to allow a more efficient compression map
+// to be used for internal packDomainName calls without changing the
+// signature or functionality of public API.
+//
+// In particular, map[string]uint16 uses 25% less per-entry memory
+// than does map[string]int.
+type compressionMap struct {
+ ext map[string]int // external callers
+ int map[string]uint16 // internal callers
+}
+
+func (m compressionMap) valid() bool {
+ return m.int != nil || m.ext != nil
+}
+
+func (m compressionMap) insert(s string, pos int) {
+ if m.ext != nil {
+ m.ext[s] = pos
+ } else {
+ m.int[s] = uint16(pos)
+ }
+}
+
+func (m compressionMap) find(s string) (int, bool) {
+ if m.ext != nil {
+ pos, ok := m.ext[s]
+ return pos, ok
+ }
+
+ pos, ok := m.int[s]
+ return int(pos), ok
+}
+
// Domain names are a sequence of counted strings
// split at the dots. They end with a zero-length string.
@@ -177,149 +231,156 @@ var RcodeToString = map[int]string{
// map needs to hold a mapping between domain names and offsets
// pointing into msg.
func PackDomainName(s string, msg []byte, off int, compression map[string]int, compress bool) (off1 int, err error) {
- off1, _, err = packDomainName(s, msg, off, compression, compress)
- return
+ return packDomainName(s, msg, off, compressionMap{ext: compression}, compress)
}
-func packDomainName(s string, msg []byte, off int, compression map[string]int, compress bool) (off1 int, labels int, err error) {
- // special case if msg == nil
- lenmsg := 256
- if msg != nil {
- lenmsg = len(msg)
- }
+func packDomainName(s string, msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ // XXX: A logical copy of this function exists in IsDomainName and
+ // should be kept in sync with this function.
+
ls := len(s)
if ls == 0 { // Ok, for instance when dealing with update RR without any rdata.
- return off, 0, nil
+ return off, nil
}
- // If not fully qualified, error out, but only if msg == nil #ugly
- switch {
- case msg == nil:
- if s[ls-1] != '.' {
- s += "."
- ls++
- }
- case msg != nil:
- if s[ls-1] != '.' {
- return lenmsg, 0, ErrFqdn
- }
+
+ // If not fully qualified, error out.
+ if !IsFqdn(s) {
+ return len(msg), ErrFqdn
}
+
// Each dot ends a segment of the name.
// We trade each dot byte for a length byte.
// Except for escaped dots (\.), which are normal dots.
// There is also a trailing zero.
// Compression
- nameoffset := -1
pointer := -1
+
// Emit sequence of counted strings, chopping at dots.
- begin := 0
- bs := []byte(s)
- roBs, bsFresh, escapedDot := s, true, false
+ var (
+ begin int
+ compBegin int
+ compOff int
+ bs []byte
+ wasDot bool
+ )
+loop:
for i := 0; i < ls; i++ {
- if bs[i] == '\\' {
- for j := i; j < ls-1; j++ {
- bs[j] = bs[j+1]
- }
- ls--
- if off+1 > lenmsg {
- return lenmsg, labels, ErrBuf
- }
- // check for \DDD
- if i+2 < ls && isDigit(bs[i]) && isDigit(bs[i+1]) && isDigit(bs[i+2]) {
- bs[i] = dddToByte(bs[i:])
- for j := i + 1; j < ls-2; j++ {
- bs[j] = bs[j+2]
- }
- ls -= 2
- }
- escapedDot = bs[i] == '.'
- bsFresh = false
- continue
+ var c byte
+ if bs == nil {
+ c = s[i]
+ } else {
+ c = bs[i]
}
- if bs[i] == '.' {
- if i > 0 && bs[i-1] == '.' && !escapedDot {
+ switch c {
+ case '\\':
+ if off+1 > len(msg) {
+ return len(msg), ErrBuf
+ }
+
+ if bs == nil {
+ bs = []byte(s)
+ }
+
+ // check for \DDD
+ if i+3 < ls && isDigit(bs[i+1]) && isDigit(bs[i+2]) && isDigit(bs[i+3]) {
+ bs[i] = dddToByte(bs[i+1:])
+ copy(bs[i+1:ls-3], bs[i+4:])
+ ls -= 3
+ compOff += 3
+ } else {
+ copy(bs[i:ls-1], bs[i+1:])
+ ls--
+ compOff++
+ }
+
+ wasDot = false
+ case '.':
+ if wasDot {
// two dots back to back is not legal
- return lenmsg, labels, ErrRdata
+ return len(msg), ErrRdata
}
- if i-begin >= 1<<6 { // top two bits of length must be clear
- return lenmsg, labels, ErrRdata
+ wasDot = true
+
+ labelLen := i - begin
+ if labelLen >= 1<<6 { // top two bits of length must be clear
+ return len(msg), ErrRdata
}
+
// off can already (we're in a loop) be bigger than len(msg)
// this happens when a name isn't fully qualified
- if off+1 > lenmsg {
- return lenmsg, labels, ErrBuf
- }
- if msg != nil {
- msg[off] = byte(i - begin)
- }
- offset := off
- off++
- for j := begin; j < i; j++ {
- if off+1 > lenmsg {
- return lenmsg, labels, ErrBuf
- }
- if msg != nil {
- msg[off] = bs[j]
- }
- off++
- }
- if compress && !bsFresh {
- roBs = string(bs)
- bsFresh = true
+ if off+1+labelLen > len(msg) {
+ return len(msg), ErrBuf
}
+
// Don't try to compress '.'
- // We should only compress when compress it true, but we should also still pick
+ // We should only compress when compress is true, but we should also still pick
// up names that can be used for *future* compression(s).
- if compression != nil && roBs[begin:] != "." {
- if p, ok := compression[roBs[begin:]]; !ok {
- // Only offsets smaller than this can be used.
- if offset < maxCompressionOffset {
- compression[roBs[begin:]] = offset
- }
- } else {
+ if compression.valid() && !isRootLabel(s, bs, begin, ls) {
+ if p, ok := compression.find(s[compBegin:]); ok {
// The first hit is the longest matching dname
// keep the pointer offset we get back and store
// the offset of the current name, because that's
// where we need to insert the pointer later
// If compress is true, we're allowed to compress this dname
- if pointer == -1 && compress {
- pointer = p // Where to point to
- nameoffset = offset // Where to point from
- break
+ if compress {
+ pointer = p // Where to point to
+ break loop
}
+ } else if off < maxCompressionOffset {
+ // Only offsets smaller than maxCompressionOffset can be used.
+ compression.insert(s[compBegin:], off)
}
}
- labels++
+
+ // The following is covered by the length check above.
+ msg[off] = byte(labelLen)
+
+ if bs == nil {
+ copy(msg[off+1:], s[begin:i])
+ } else {
+ copy(msg[off+1:], bs[begin:i])
+ }
+ off += 1 + labelLen
+
begin = i + 1
+ compBegin = begin + compOff
+ default:
+ wasDot = false
}
- escapedDot = false
}
+
// Root label is special
- if len(bs) == 1 && bs[0] == '.' {
- return off, labels, nil
+ if isRootLabel(s, bs, 0, ls) {
+ return off, nil
}
+
// If we did compression and we find something add the pointer here
if pointer != -1 {
- // Clear the msg buffer after the pointer location, otherwise
- // packDataNsec writes the wrong data to msg.
- tainted := msg[nameoffset:off]
- for i := range tainted {
- tainted[i] = 0
- }
// We have two bytes (14 bits) to put the pointer in
- // if msg == nil, we will never do compression
- binary.BigEndian.PutUint16(msg[nameoffset:], uint16(pointer^0xC000))
- off = nameoffset + 1
- goto End
+ binary.BigEndian.PutUint16(msg[off:], uint16(pointer^0xC000))
+ return off + 2, nil
}
- if msg != nil && off < len(msg) {
+
+ if off < len(msg) {
msg[off] = 0
}
-End:
- off++
- return off, labels, nil
+
+ return off + 1, nil
+}
+
+// isRootLabel returns whether s or bs, from off to end, is the root
+// label ".".
+//
+// If bs is nil, s will be checked, otherwise bs will be checked.
+func isRootLabel(s string, bs []byte, off, end int) bool {
+ if bs == nil {
+ return s[off:end] == "."
+ }
+
+ return end-off == 1 && bs[off] == '.'
}
// Unpack a domain name.
@@ -336,12 +397,16 @@ End:
// In theory, the pointers are only allowed to jump backward.
// We let them jump anywhere and stop jumping after a while.
-// UnpackDomainName unpacks a domain name into a string.
+// UnpackDomainName unpacks a domain name into a string. It returns
+// the name, the new offset into msg and any error that occurred.
+//
+// When an error is encountered, the unpacked name will be discarded
+// and len(msg) will be returned as the offset.
func UnpackDomainName(msg []byte, off int) (string, int, error) {
- s := make([]byte, 0, 64)
+ s := make([]byte, 0, maxDomainNamePresentationLength)
off1 := 0
lenmsg := len(msg)
- maxLen := maxDomainNameWireOctets
+ budget := maxDomainNameWireOctets
ptr := 0 // number of pointers followed
Loop:
for {
@@ -360,25 +425,19 @@ Loop:
if off+c > lenmsg {
return "", lenmsg, ErrBuf
}
- for j := off; j < off+c; j++ {
- switch b := msg[j]; b {
+ budget -= c + 1 // +1 for the label separator
+ if budget <= 0 {
+ return "", lenmsg, ErrLongDomain
+ }
+ for _, b := range msg[off : off+c] {
+ switch b {
case '.', '(', ')', ';', ' ', '@':
fallthrough
case '"', '\\':
s = append(s, '\\', b)
- // presentation-format \X escapes add an extra byte
- maxLen++
default:
- if b < 32 || b >= 127 { // unprintable, use \DDD
- var buf [3]byte
- bufs := strconv.AppendInt(buf[:0], int64(b), 10)
- s = append(s, '\\')
- for i := len(bufs); i < 3; i++ {
- s = append(s, '0')
- }
- s = append(s, bufs...)
- // presentation-format \DDD escapes add 3 extra bytes
- maxLen += 3
+ if b < ' ' || b > '~' { // unprintable, use \DDD
+ s = append(s, escapeByte(b)...)
} else {
s = append(s, b)
}
@@ -400,7 +459,7 @@ Loop:
if ptr == 0 {
off1 = off
}
- if ptr++; ptr > 10 {
+ if ptr++; ptr > maxCompressionPointers {
return "", lenmsg, &Error{err: "too many compression pointers"}
}
// pointer should guarantee that it advances and points forwards at least
@@ -416,10 +475,7 @@ Loop:
off1 = off
}
if len(s) == 0 {
- s = []byte(".")
- } else if len(s) >= maxLen {
- // error if the name is too long, but don't throw it away
- return string(s), lenmsg, ErrLongDomain
+ return ".", off1, nil
}
return string(s), off1, nil
}
@@ -433,11 +489,11 @@ func packTxt(txt []string, msg []byte, offset int, tmp []byte) (int, error) {
return offset, nil
}
var err error
- for i := range txt {
- if len(txt[i]) > len(tmp) {
+ for _, s := range txt {
+ if len(s) > len(tmp) {
return offset, ErrBuf
}
- offset, err = packTxtString(txt[i], msg, offset, tmp)
+ offset, err = packTxtString(s, msg, offset, tmp)
if err != nil {
return offset, err
}
@@ -528,10 +584,12 @@ func unpackTxt(msg []byte, off0 int) (ss []string, off int, err error) {
func isDigit(b byte) bool { return b >= '0' && b <= '9' }
func dddToByte(s []byte) byte {
+ _ = s[2] // bounds check hint to compiler; see golang.org/issue/14808
return byte((s[0]-'0')*100 + (s[1]-'0')*10 + (s[2] - '0'))
}
func dddStringToByte(s string) byte {
+ _ = s[2] // bounds check hint to compiler; see golang.org/issue/14808
return byte((s[0]-'0')*100 + (s[1]-'0')*10 + (s[2] - '0'))
}
@@ -549,19 +607,38 @@ func intToBytes(i *big.Int, length int) []byte {
// PackRR packs a resource record rr into msg[off:].
// See PackDomainName for documentation about the compression.
func PackRR(rr RR, msg []byte, off int, compression map[string]int, compress bool) (off1 int, err error) {
+ headerEnd, off1, err := packRR(rr, msg, off, compressionMap{ext: compression}, compress)
+ if err == nil {
+ // packRR no longer sets the Rdlength field on the rr, but
+ // callers might be expecting it so we set it here.
+ rr.Header().Rdlength = uint16(off1 - headerEnd)
+ }
+ return off1, err
+}
+
+func packRR(rr RR, msg []byte, off int, compression compressionMap, compress bool) (headerEnd int, off1 int, err error) {
if rr == nil {
- return len(msg), &Error{err: "nil rr"}
+ return len(msg), len(msg), &Error{err: "nil rr"}
}
- off1, err = rr.pack(msg, off, compression, compress)
+ headerEnd, err = rr.Header().packHeader(msg, off, compression, compress)
if err != nil {
- return len(msg), err
+ return headerEnd, len(msg), err
}
- // TODO(miek): Not sure if this is needed? If removed we can remove rawmsg.go as well.
- if rawSetRdlength(msg, off, off1) {
- return off1, nil
+
+ off1, err = rr.pack(msg, headerEnd, compression, compress)
+ if err != nil {
+ return headerEnd, len(msg), err
}
- return off, ErrRdata
+
+ rdlength := off1 - headerEnd
+ if int(uint16(rdlength)) != rdlength { // overflow
+ return headerEnd, len(msg), ErrRdata
+ }
+
+ // The RDLENGTH field is the last field in the header and we set it here.
+ binary.BigEndian.PutUint16(msg[headerEnd-2:], uint16(rdlength))
+ return headerEnd, off1, nil
}
// UnpackRR unpacks msg[off:] into an RR.
@@ -577,17 +654,28 @@ func UnpackRR(msg []byte, off int) (rr RR, off1 int, err error) {
// UnpackRRWithHeader unpacks the record type specific payload given an existing
// RR_Header.
func UnpackRRWithHeader(h RR_Header, msg []byte, off int) (rr RR, off1 int, err error) {
+ if newFn, ok := TypeToRR[h.Rrtype]; ok {
+ rr = newFn()
+ *rr.Header() = h
+ } else {
+ rr = &RFC3597{Hdr: h}
+ }
+
+ if noRdata(h) {
+ return rr, off, nil
+ }
+
end := off + int(h.Rdlength)
- if fn, known := typeToUnpack[h.Rrtype]; !known {
- rr, off, err = unpackRFC3597(h, msg, off)
- } else {
- rr, off, err = fn(h, msg, off)
+ off, err = rr.unpack(msg, off)
+ if err != nil {
+ return nil, end, err
}
if off != end {
return &h, end, &Error{err: "bad rdlength"}
}
- return rr, off, err
+
+ return rr, off, nil
}
// unpackRRslice unpacks msg[off:] into an []RR.
@@ -668,32 +756,33 @@ func (dns *Msg) Pack() (msg []byte, err error) {
// PackBuffer packs a Msg, using the given buffer buf. If buf is too small a new buffer is allocated.
func (dns *Msg) PackBuffer(buf []byte) (msg []byte, err error) {
- var compression map[string]int
- if dns.Compress {
- compression = make(map[string]int) // Compression pointer mappings.
+ // If this message can't be compressed, avoid filling the
+ // compression map and creating garbage.
+ if dns.Compress && dns.isCompressible() {
+ compression := make(map[string]uint16) // Compression pointer mappings.
+ return dns.packBufferWithCompressionMap(buf, compressionMap{int: compression}, true)
}
- return dns.packBufferWithCompressionMap(buf, compression)
+
+ return dns.packBufferWithCompressionMap(buf, compressionMap{}, false)
}
// packBufferWithCompressionMap packs a Msg, using the given buffer buf.
-func (dns *Msg) packBufferWithCompressionMap(buf []byte, compression map[string]int) (msg []byte, err error) {
- // We use a similar function in tsig.go's stripTsig.
-
- var dh Header
-
+func (dns *Msg) packBufferWithCompressionMap(buf []byte, compression compressionMap, compress bool) (msg []byte, err error) {
if dns.Rcode < 0 || dns.Rcode > 0xFFF {
return nil, ErrRcode
}
- if dns.Rcode > 0xF {
- // Regular RCODE field is 4 bits
- opt := dns.IsEdns0()
- if opt == nil {
- return nil, ErrExtendedRcode
- }
- opt.SetExtendedRcode(uint8(dns.Rcode >> 4))
+
+ // Set extended rcode unconditionally if we have an opt, this will allow
+ // reseting the extended rcode bits if they need to.
+ if opt := dns.IsEdns0(); opt != nil {
+ opt.SetExtendedRcode(uint16(dns.Rcode))
+ } else if dns.Rcode > 0xF {
+ // If Rcode is an extended one and opt is nil, error out.
+ return nil, ErrExtendedRcode
}
// Convert convenient Msg into wire-like Header.
+ var dh Header
dh.Id = dns.Id
dh.Bits = uint16(dns.Opcode)<<11 | uint16(dns.Rcode&0xF)
if dns.Response {
@@ -721,50 +810,44 @@ func (dns *Msg) packBufferWithCompressionMap(buf []byte, compression map[string]
dh.Bits |= _CD
}
- // Prepare variable sized arrays.
- question := dns.Question
- answer := dns.Answer
- ns := dns.Ns
- extra := dns.Extra
-
- dh.Qdcount = uint16(len(question))
- dh.Ancount = uint16(len(answer))
- dh.Nscount = uint16(len(ns))
- dh.Arcount = uint16(len(extra))
+ dh.Qdcount = uint16(len(dns.Question))
+ dh.Ancount = uint16(len(dns.Answer))
+ dh.Nscount = uint16(len(dns.Ns))
+ dh.Arcount = uint16(len(dns.Extra))
// We need the uncompressed length here, because we first pack it and then compress it.
msg = buf
- uncompressedLen := compressedLen(dns, false)
+ uncompressedLen := msgLenWithCompressionMap(dns, nil)
if packLen := uncompressedLen + 1; len(msg) < packLen {
msg = make([]byte, packLen)
}
// Pack it in: header and then the pieces.
off := 0
- off, err = dh.pack(msg, off, compression, dns.Compress)
+ off, err = dh.pack(msg, off, compression, compress)
if err != nil {
return nil, err
}
- for i := 0; i < len(question); i++ {
- off, err = question[i].pack(msg, off, compression, dns.Compress)
+ for _, r := range dns.Question {
+ off, err = r.pack(msg, off, compression, compress)
if err != nil {
return nil, err
}
}
- for i := 0; i < len(answer); i++ {
- off, err = PackRR(answer[i], msg, off, compression, dns.Compress)
+ for _, r := range dns.Answer {
+ _, off, err = packRR(r, msg, off, compression, compress)
if err != nil {
return nil, err
}
}
- for i := 0; i < len(ns); i++ {
- off, err = PackRR(ns[i], msg, off, compression, dns.Compress)
+ for _, r := range dns.Ns {
+ _, off, err = packRR(r, msg, off, compression, compress)
if err != nil {
return nil, err
}
}
- for i := 0; i < len(extra); i++ {
- off, err = PackRR(extra[i], msg, off, compression, dns.Compress)
+ for _, r := range dns.Extra {
+ _, off, err = packRR(r, msg, off, compression, compress)
if err != nil {
return nil, err
}
@@ -772,28 +855,7 @@ func (dns *Msg) packBufferWithCompressionMap(buf []byte, compression map[string]
return msg[:off], nil
}
-// Unpack unpacks a binary message to a Msg structure.
-func (dns *Msg) Unpack(msg []byte) (err error) {
- var (
- dh Header
- off int
- )
- if dh, off, err = unpackMsgHdr(msg, off); err != nil {
- return err
- }
-
- dns.Id = dh.Id
- dns.Response = dh.Bits&_QR != 0
- dns.Opcode = int(dh.Bits>>11) & 0xF
- dns.Authoritative = dh.Bits&_AA != 0
- dns.Truncated = dh.Bits&_TC != 0
- dns.RecursionDesired = dh.Bits&_RD != 0
- dns.RecursionAvailable = dh.Bits&_RA != 0
- dns.Zero = dh.Bits&_Z != 0
- dns.AuthenticatedData = dh.Bits&_AD != 0
- dns.CheckingDisabled = dh.Bits&_CD != 0
- dns.Rcode = int(dh.Bits & 0xF)
-
+func (dns *Msg) unpack(dh Header, msg []byte, off int) (err error) {
// If we are at the end of the message we should return *just* the
// header. This can still be useful to the caller. 9.9.9.9 sends these
// when responding with REFUSED for instance.
@@ -812,8 +874,6 @@ func (dns *Msg) Unpack(msg []byte) (err error) {
var q Question
q, off, err = unpackQuestion(msg, off)
if err != nil {
- // Even if Truncated is set, we only will set ErrTruncated if we
- // actually got the questions
return err
}
if off1 == off { // Offset does not increase anymore, dh.Qdcount is a lie!
@@ -837,16 +897,29 @@ func (dns *Msg) Unpack(msg []byte) (err error) {
// The header counts might have been wrong so we need to update it
dh.Arcount = uint16(len(dns.Extra))
+ // Set extended Rcode
+ if opt := dns.IsEdns0(); opt != nil {
+ dns.Rcode |= opt.ExtendedRcode()
+ }
+
if off != len(msg) {
// TODO(miek) make this an error?
// use PackOpt to let people tell how detailed the error reporting should be?
// println("dns: extra bytes in dns packet", off, "<", len(msg))
- } else if dns.Truncated {
- // Whether we ran into a an error or not, we want to return that it
- // was truncated
- err = ErrTruncated
}
return err
+
+}
+
+// Unpack unpacks a binary message to a Msg structure.
+func (dns *Msg) Unpack(msg []byte) (err error) {
+ dh, off, err := unpackMsgHdr(msg, 0)
+ if err != nil {
+ return err
+ }
+
+ dns.setHdr(dh)
+ return dns.unpack(dh, msg, off)
}
// Convert a complete message to a string with dig-like output.
@@ -861,182 +934,148 @@ func (dns *Msg) String() string {
s += "ADDITIONAL: " + strconv.Itoa(len(dns.Extra)) + "\n"
if len(dns.Question) > 0 {
s += "\n;; QUESTION SECTION:\n"
- for i := 0; i < len(dns.Question); i++ {
- s += dns.Question[i].String() + "\n"
+ for _, r := range dns.Question {
+ s += r.String() + "\n"
}
}
if len(dns.Answer) > 0 {
s += "\n;; ANSWER SECTION:\n"
- for i := 0; i < len(dns.Answer); i++ {
- if dns.Answer[i] != nil {
- s += dns.Answer[i].String() + "\n"
+ for _, r := range dns.Answer {
+ if r != nil {
+ s += r.String() + "\n"
}
}
}
if len(dns.Ns) > 0 {
s += "\n;; AUTHORITY SECTION:\n"
- for i := 0; i < len(dns.Ns); i++ {
- if dns.Ns[i] != nil {
- s += dns.Ns[i].String() + "\n"
+ for _, r := range dns.Ns {
+ if r != nil {
+ s += r.String() + "\n"
}
}
}
if len(dns.Extra) > 0 {
s += "\n;; ADDITIONAL SECTION:\n"
- for i := 0; i < len(dns.Extra); i++ {
- if dns.Extra[i] != nil {
- s += dns.Extra[i].String() + "\n"
+ for _, r := range dns.Extra {
+ if r != nil {
+ s += r.String() + "\n"
}
}
}
return s
}
+// isCompressible returns whether the msg may be compressible.
+func (dns *Msg) isCompressible() bool {
+ // If we only have one question, there is nothing we can ever compress.
+ return len(dns.Question) > 1 || len(dns.Answer) > 0 ||
+ len(dns.Ns) > 0 || len(dns.Extra) > 0
+}
+
// Len returns the message length when in (un)compressed wire format.
// If dns.Compress is true compression it is taken into account. Len()
// is provided to be a faster way to get the size of the resulting packet,
// than packing it, measuring the size and discarding the buffer.
-func (dns *Msg) Len() int { return compressedLen(dns, dns.Compress) }
-
-func compressedLenWithCompressionMap(dns *Msg, compression map[string]int) int {
- l := 12 // Message header is always 12 bytes
- for _, r := range dns.Question {
- compressionLenHelper(compression, r.Name, l)
- l += r.len()
+func (dns *Msg) Len() int {
+ // If this message can't be compressed, avoid filling the
+ // compression map and creating garbage.
+ if dns.Compress && dns.isCompressible() {
+ compression := make(map[string]struct{})
+ return msgLenWithCompressionMap(dns, compression)
}
- l += compressionLenSlice(l, compression, dns.Answer)
- l += compressionLenSlice(l, compression, dns.Ns)
- l += compressionLenSlice(l, compression, dns.Extra)
- return l
+
+ return msgLenWithCompressionMap(dns, nil)
}
-// compressedLen returns the message length when in compressed wire format
-// when compress is true, otherwise the uncompressed length is returned.
-func compressedLen(dns *Msg, compress bool) int {
- // We always return one more than needed.
- if compress {
- compression := map[string]int{}
- return compressedLenWithCompressionMap(dns, compression)
- }
- l := 12 // Message header is always 12 bytes
+func msgLenWithCompressionMap(dns *Msg, compression map[string]struct{}) int {
+ l := headerSize
for _, r := range dns.Question {
- l += r.len()
+ l += r.len(l, compression)
}
for _, r := range dns.Answer {
if r != nil {
- l += r.len()
+ l += r.len(l, compression)
}
}
for _, r := range dns.Ns {
if r != nil {
- l += r.len()
+ l += r.len(l, compression)
}
}
for _, r := range dns.Extra {
if r != nil {
- l += r.len()
+ l += r.len(l, compression)
}
}
return l
}
-func compressionLenSlice(lenp int, c map[string]int, rs []RR) int {
- initLen := lenp
- for _, r := range rs {
- if r == nil {
+func domainNameLen(s string, off int, compression map[string]struct{}, compress bool) int {
+ if s == "" || s == "." {
+ return 1
+ }
+
+ escaped := strings.Contains(s, "\\")
+
+ if compression != nil && (compress || off < maxCompressionOffset) {
+ // compressionLenSearch will insert the entry into the compression
+ // map if it doesn't contain it.
+ if l, ok := compressionLenSearch(compression, s, off); ok && compress {
+ if escaped {
+ return escapedNameLen(s[:l]) + 2
+ }
+
+ return l + 2
+ }
+ }
+
+ if escaped {
+ return escapedNameLen(s) + 1
+ }
+
+ return len(s) + 1
+}
+
+func escapedNameLen(s string) int {
+ nameLen := len(s)
+ for i := 0; i < len(s); i++ {
+ if s[i] != '\\' {
continue
}
- // TmpLen is to track len of record at 14bits boudaries
- tmpLen := lenp
- x := r.len()
- // track this length, and the global length in len, while taking compression into account for both.
- k, ok, _ := compressionLenSearch(c, r.Header().Name)
- if ok {
- // Size of x is reduced by k, but we add 1 since k includes the '.' and label descriptor take 2 bytes
- // so, basically x:= x - k - 1 + 2
- x += 1 - k
- }
-
- tmpLen += compressionLenHelper(c, r.Header().Name, tmpLen)
- k, ok, _ = compressionLenSearchType(c, r)
- if ok {
- x += 1 - k
- }
- lenp += x
- tmpLen = lenp
- tmpLen += compressionLenHelperType(c, r, tmpLen)
-
- }
- return lenp - initLen
-}
-
-// Put the parts of the name in the compression map, return the size in bytes added in payload
-func compressionLenHelper(c map[string]int, s string, currentLen int) int {
- if currentLen > maxCompressionOffset {
- // We won't be able to add any label that could be re-used later anyway
- return 0
- }
- if _, ok := c[s]; ok {
- return 0
- }
- initLen := currentLen
- pref := ""
- prev := s
- lbs := Split(s)
- for j := 0; j < len(lbs); j++ {
- pref = s[lbs[j]:]
- currentLen += len(prev) - len(pref)
- prev = pref
- if _, ok := c[pref]; !ok {
- // If first byte label is within the first 14bits, it might be re-used later
- if currentLen < maxCompressionOffset {
- c[pref] = currentLen
- }
+ if i+3 < len(s) && isDigit(s[i+1]) && isDigit(s[i+2]) && isDigit(s[i+3]) {
+ nameLen -= 3
+ i += 3
} else {
- added := currentLen - initLen
- if j > 0 {
- // We added a new PTR
- added += 2
- }
- return added
+ nameLen--
+ i++
}
}
- return currentLen - initLen
+
+ return nameLen
}
-// Look for each part in the compression map and returns its length,
-// keep on searching so we get the longest match.
-// Will return the size of compression found, whether a match has been
-// found and the size of record if added in payload
-func compressionLenSearch(c map[string]int, s string) (int, bool, int) {
- off := 0
- end := false
- if s == "" { // don't bork on bogus data
- return 0, false, 0
- }
- fullSize := 0
- for {
+func compressionLenSearch(c map[string]struct{}, s string, msgOff int) (int, bool) {
+ for off, end := 0, false; !end; off, end = NextLabel(s, off) {
if _, ok := c[s[off:]]; ok {
- return len(s[off:]), true, fullSize + off
+ return off, true
}
- if end {
- break
+
+ if msgOff+off < maxCompressionOffset {
+ c[s[off:]] = struct{}{}
}
- // Each label descriptor takes 2 bytes, add it
- fullSize += 2
- off, end = NextLabel(s, off)
}
- return 0, false, fullSize + len(s)
+
+ return 0, false
}
// Copy returns a new RR which is a deep-copy of r.
-func Copy(r RR) RR { r1 := r.copy(); return r1 }
+func Copy(r RR) RR { return r.copy() }
// Len returns the length (in octets) of the uncompressed RR in wire format.
-func Len(r RR) int { return r.len() }
+func Len(r RR) int { return r.len(0, nil) }
// Copy returns a new *Msg which is a deep-copy of dns.
func (dns *Msg) Copy() *Msg { return dns.CopyTo(new(Msg)) }
@@ -1052,40 +1091,27 @@ func (dns *Msg) CopyTo(r1 *Msg) *Msg {
}
rrArr := make([]RR, len(dns.Answer)+len(dns.Ns)+len(dns.Extra))
- var rri int
+ r1.Answer, rrArr = rrArr[:0:len(dns.Answer)], rrArr[len(dns.Answer):]
+ r1.Ns, rrArr = rrArr[:0:len(dns.Ns)], rrArr[len(dns.Ns):]
+ r1.Extra = rrArr[:0:len(dns.Extra)]
- if len(dns.Answer) > 0 {
- rrbegin := rri
- for i := 0; i < len(dns.Answer); i++ {
- rrArr[rri] = dns.Answer[i].copy()
- rri++
- }
- r1.Answer = rrArr[rrbegin:rri:rri]
+ for _, r := range dns.Answer {
+ r1.Answer = append(r1.Answer, r.copy())
}
- if len(dns.Ns) > 0 {
- rrbegin := rri
- for i := 0; i < len(dns.Ns); i++ {
- rrArr[rri] = dns.Ns[i].copy()
- rri++
- }
- r1.Ns = rrArr[rrbegin:rri:rri]
+ for _, r := range dns.Ns {
+ r1.Ns = append(r1.Ns, r.copy())
}
- if len(dns.Extra) > 0 {
- rrbegin := rri
- for i := 0; i < len(dns.Extra); i++ {
- rrArr[rri] = dns.Extra[i].copy()
- rri++
- }
- r1.Extra = rrArr[rrbegin:rri:rri]
+ for _, r := range dns.Extra {
+ r1.Extra = append(r1.Extra, r.copy())
}
return r1
}
-func (q *Question) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := PackDomainName(q.Name, msg, off, compression, compress)
+func (q *Question) pack(msg []byte, off int, compression compressionMap, compress bool) (int, error) {
+ off, err := packDomainName(q.Name, msg, off, compression, compress)
if err != nil {
return off, err
}
@@ -1126,7 +1152,7 @@ func unpackQuestion(msg []byte, off int) (Question, int, error) {
return q, off, err
}
-func (dh *Header) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+func (dh *Header) pack(msg []byte, off int, compression compressionMap, compress bool) (int, error) {
off, err := packUint16(dh.Id, msg, off)
if err != nil {
return off, err
@@ -1148,7 +1174,10 @@ func (dh *Header) pack(msg []byte, off int, compression map[string]int, compress
return off, err
}
off, err = packUint16(dh.Arcount, msg, off)
- return off, err
+ if err != nil {
+ return off, err
+ }
+ return off, nil
}
func unpackMsgHdr(msg []byte, off int) (Header, int, error) {
@@ -1177,5 +1206,23 @@ func unpackMsgHdr(msg []byte, off int) (Header, int, error) {
return dh, off, err
}
dh.Arcount, off, err = unpackUint16(msg, off)
- return dh, off, err
+ if err != nil {
+ return dh, off, err
+ }
+ return dh, off, nil
+}
+
+// setHdr set the header in the dns using the binary data in dh.
+func (dns *Msg) setHdr(dh Header) {
+ dns.Id = dh.Id
+ dns.Response = dh.Bits&_QR != 0
+ dns.Opcode = int(dh.Bits>>11) & 0xF
+ dns.Authoritative = dh.Bits&_AA != 0
+ dns.Truncated = dh.Bits&_TC != 0
+ dns.RecursionDesired = dh.Bits&_RD != 0
+ dns.RecursionAvailable = dh.Bits&_RA != 0
+ dns.Zero = dh.Bits&_Z != 0 // _Z covers the zero bit, which should be zero; not sure why we set it to the opposite.
+ dns.AuthenticatedData = dh.Bits&_AD != 0
+ dns.CheckingDisabled = dh.Bits&_CD != 0
+ dns.Rcode = int(dh.Bits & 0xF)
}
diff --git a/vendor/github.com/miekg/dns/msg_generate.go b/vendor/github.com/miekg/dns/msg_generate.go
index 8ba609f726..721a0fce32 100644
--- a/vendor/github.com/miekg/dns/msg_generate.go
+++ b/vendor/github.com/miekg/dns/msg_generate.go
@@ -80,13 +80,7 @@ func main() {
o := scope.Lookup(name)
st, _ := getTypeStruct(o.Type(), scope)
- fmt.Fprintf(b, "func (rr *%s) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {\n", name)
- fmt.Fprint(b, `off, err := rr.Hdr.pack(msg, off, compression, compress)
-if err != nil {
- return off, err
-}
-headerEnd := off
-`)
+ fmt.Fprintf(b, "func (rr *%s) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {\n", name)
for i := 1; i < st.NumFields(); i++ {
o := func(s string) {
fmt.Fprintf(b, s, st.Field(i).Name())
@@ -106,7 +100,7 @@ return off, err
case `dns:"nsec"`:
o("off, err = packDataNsec(rr.%s, msg, off)\n")
case `dns:"domain-name"`:
- o("off, err = packDataDomainNames(rr.%s, msg, off, compression, compress)\n")
+ o("off, err = packDataDomainNames(rr.%s, msg, off, compression, false)\n")
default:
log.Fatalln(name, st.Field(i).Name(), st.Tag(i))
}
@@ -116,9 +110,9 @@ return off, err
switch {
case st.Tag(i) == `dns:"-"`: // ignored
case st.Tag(i) == `dns:"cdomain-name"`:
- o("off, err = PackDomainName(rr.%s, msg, off, compression, compress)\n")
+ o("off, err = packDomainName(rr.%s, msg, off, compression, compress)\n")
case st.Tag(i) == `dns:"domain-name"`:
- o("off, err = PackDomainName(rr.%s, msg, off, compression, false)\n")
+ o("off, err = packDomainName(rr.%s, msg, off, compression, false)\n")
case st.Tag(i) == `dns:"a"`:
o("off, err = packDataA(rr.%s, msg, off)\n")
case st.Tag(i) == `dns:"aaaa"`:
@@ -154,7 +148,8 @@ if rr.%s != "-" {
fallthrough
case st.Tag(i) == `dns:"hex"`:
o("off, err = packStringHex(rr.%s, msg, off)\n")
-
+ case st.Tag(i) == `dns:"any"`:
+ o("off, err = packStringAny(rr.%s, msg, off)\n")
case st.Tag(i) == `dns:"octet"`:
o("off, err = packStringOctet(rr.%s, msg, off)\n")
case st.Tag(i) == "":
@@ -176,8 +171,6 @@ if rr.%s != "-" {
log.Fatalln(name, st.Field(i).Name(), st.Tag(i))
}
}
- // We have packed everything, only now we know the rdlength of this RR
- fmt.Fprintln(b, "rr.Header().Rdlength = uint16(off-headerEnd)")
fmt.Fprintln(b, "return off, nil }\n")
}
@@ -186,14 +179,8 @@ if rr.%s != "-" {
o := scope.Lookup(name)
st, _ := getTypeStruct(o.Type(), scope)
- fmt.Fprintf(b, "func unpack%s(h RR_Header, msg []byte, off int) (RR, int, error) {\n", name)
- fmt.Fprintf(b, "rr := new(%s)\n", name)
- fmt.Fprint(b, "rr.Hdr = h\n")
- fmt.Fprint(b, `if noRdata(h) {
-return rr, off, nil
- }
-var err error
-rdStart := off
+ fmt.Fprintf(b, "func (rr *%s) unpack(msg []byte, off int) (off1 int, err error) {\n", name)
+ fmt.Fprint(b, `rdStart := off
_ = rdStart
`)
@@ -201,7 +188,7 @@ _ = rdStart
o := func(s string) {
fmt.Fprintf(b, s, st.Field(i).Name())
fmt.Fprint(b, `if err != nil {
-return rr, off, err
+return off, err
}
`)
}
@@ -221,7 +208,7 @@ return rr, off, err
log.Fatalln(name, st.Field(i).Name(), st.Tag(i))
}
fmt.Fprint(b, `if err != nil {
-return rr, off, err
+return off, err
}
`)
continue
@@ -264,6 +251,8 @@ return rr, off, err
o("rr.%s, off, err = unpackStringBase64(msg, off, rdStart + int(rr.Hdr.Rdlength))\n")
case `dns:"hex"`:
o("rr.%s, off, err = unpackStringHex(msg, off, rdStart + int(rr.Hdr.Rdlength))\n")
+ case `dns:"any"`:
+ o("rr.%s, off, err = unpackStringAny(msg, off, rdStart + int(rr.Hdr.Rdlength))\n")
case `dns:"octet"`:
o("rr.%s, off, err = unpackStringOctet(msg, off)\n")
case "":
@@ -287,22 +276,13 @@ return rr, off, err
// If we've hit len(msg) we return without error.
if i < st.NumFields()-1 {
fmt.Fprintf(b, `if off == len(msg) {
-return rr, off, nil
+return off, nil
}
`)
}
}
- fmt.Fprintf(b, "return rr, off, err }\n\n")
+ fmt.Fprintf(b, "return off, nil }\n\n")
}
- // Generate typeToUnpack map
- fmt.Fprintln(b, "var typeToUnpack = map[uint16]func(RR_Header, []byte, int) (RR, int, error){")
- for _, name := range namedTypes {
- if name == "RFC3597" {
- continue
- }
- fmt.Fprintf(b, "Type%s: unpack%s,\n", name, name)
- }
- fmt.Fprintln(b, "}\n")
// gofmt
res, err := format.Source(b.Bytes())
diff --git a/vendor/github.com/miekg/dns/msg_helpers.go b/vendor/github.com/miekg/dns/msg_helpers.go
index 81fc2b1be3..0e96f0f345 100644
--- a/vendor/github.com/miekg/dns/msg_helpers.go
+++ b/vendor/github.com/miekg/dns/msg_helpers.go
@@ -25,12 +25,13 @@ func unpackDataA(msg []byte, off int) (net.IP, int, error) {
}
func packDataA(a net.IP, msg []byte, off int) (int, error) {
- // It must be a slice of 4, even if it is 16, we encode only the first 4
- if off+net.IPv4len > len(msg) {
- return len(msg), &Error{err: "overflow packing a"}
- }
switch len(a) {
case net.IPv4len, net.IPv6len:
+ // It must be a slice of 4, even if it is 16, we encode only the first 4
+ if off+net.IPv4len > len(msg) {
+ return len(msg), &Error{err: "overflow packing a"}
+ }
+
copy(msg[off:], a.To4())
off += net.IPv4len
case 0:
@@ -51,12 +52,12 @@ func unpackDataAAAA(msg []byte, off int) (net.IP, int, error) {
}
func packDataAAAA(aaaa net.IP, msg []byte, off int) (int, error) {
- if off+net.IPv6len > len(msg) {
- return len(msg), &Error{err: "overflow packing aaaa"}
- }
-
switch len(aaaa) {
case net.IPv6len:
+ if off+net.IPv6len > len(msg) {
+ return len(msg), &Error{err: "overflow packing aaaa"}
+ }
+
copy(msg[off:], aaaa)
off += net.IPv6len
case 0:
@@ -99,14 +100,14 @@ func unpackHeader(msg []byte, off int) (rr RR_Header, off1 int, truncmsg []byte,
return hdr, off, msg, err
}
-// pack packs an RR header, returning the offset to the end of the header.
+// packHeader packs an RR header, returning the offset to the end of the header.
// See PackDomainName for documentation about the compression.
-func (hdr RR_Header) pack(msg []byte, off int, compression map[string]int, compress bool) (off1 int, err error) {
+func (hdr RR_Header) packHeader(msg []byte, off int, compression compressionMap, compress bool) (int, error) {
if off == len(msg) {
return off, nil
}
- off, err = PackDomainName(hdr.Name, msg, off, compression, compress)
+ off, err := packDomainName(hdr.Name, msg, off, compression, compress)
if err != nil {
return len(msg), err
}
@@ -122,7 +123,7 @@ func (hdr RR_Header) pack(msg []byte, off int, compression map[string]int, compr
if err != nil {
return len(msg), err
}
- off, err = packUint16(hdr.Rdlength, msg, off)
+ off, err = packUint16(0, msg, off) // The RDLENGTH field will be set later in packRR.
if err != nil {
return len(msg), err
}
@@ -177,14 +178,14 @@ func unpackUint8(msg []byte, off int) (i uint8, off1 int, err error) {
if off+1 > len(msg) {
return 0, len(msg), &Error{err: "overflow unpacking uint8"}
}
- return uint8(msg[off]), off + 1, nil
+ return msg[off], off + 1, nil
}
func packUint8(i uint8, msg []byte, off int) (off1 int, err error) {
if off+1 > len(msg) {
return len(msg), &Error{err: "overflow packing uint8"}
}
- msg[off] = byte(i)
+ msg[off] = i
return off + 1, nil
}
@@ -223,8 +224,8 @@ func unpackUint48(msg []byte, off int) (i uint64, off1 int, err error) {
return 0, len(msg), &Error{err: "overflow unpacking uint64 as uint48"}
}
// Used in TSIG where the last 48 bits are occupied, so for now, assume a uint48 (6 bytes)
- i = uint64(uint64(msg[off])<<40 | uint64(msg[off+1])<<32 | uint64(msg[off+2])<<24 | uint64(msg[off+3])<<16 |
- uint64(msg[off+4])<<8 | uint64(msg[off+5]))
+ i = uint64(msg[off])<<40 | uint64(msg[off+1])<<32 | uint64(msg[off+2])<<24 | uint64(msg[off+3])<<16 |
+ uint64(msg[off+4])<<8 | uint64(msg[off+5])
off += 6
return i, off, nil
}
@@ -264,24 +265,36 @@ func unpackString(msg []byte, off int) (string, int, error) {
return "", off, &Error{err: "overflow unpacking txt"}
}
l := int(msg[off])
- if off+l+1 > len(msg) {
+ off++
+ if off+l > len(msg) {
return "", off, &Error{err: "overflow unpacking txt"}
}
var s strings.Builder
- s.Grow(l)
- for _, b := range msg[off+1 : off+1+l] {
+ consumed := 0
+ for i, b := range msg[off : off+l] {
switch {
case b == '"' || b == '\\':
+ if consumed == 0 {
+ s.Grow(l * 2)
+ }
+ s.Write(msg[off+consumed : off+i])
s.WriteByte('\\')
s.WriteByte(b)
+ consumed = i + 1
case b < ' ' || b > '~': // unprintable
- writeEscapedByte(&s, b)
- default:
- s.WriteByte(b)
+ if consumed == 0 {
+ s.Grow(l * 2)
+ }
+ s.Write(msg[off+consumed : off+i])
+ s.WriteString(escapeByte(b))
+ consumed = i + 1
}
}
- off += 1 + l
- return s.String(), off, nil
+ if consumed == 0 { // no escaping needed
+ return string(msg[off : off+l]), off + l, nil
+ }
+ s.Write(msg[off+consumed : off+l])
+ return s.String(), off + l, nil
}
func packString(s string, msg []byte, off int) (int, error) {
@@ -363,6 +376,22 @@ func packStringHex(s string, msg []byte, off int) (int, error) {
return off, nil
}
+func unpackStringAny(msg []byte, off, end int) (string, int, error) {
+ if end > len(msg) {
+ return "", len(msg), &Error{err: "overflow unpacking anything"}
+ }
+ return string(msg[off:end]), end, nil
+}
+
+func packStringAny(s string, msg []byte, off int) (int, error) {
+ if off+len(s) > len(msg) {
+ return len(msg), &Error{err: "overflow packing anything"}
+ }
+ copy(msg[off:off+len(s)], s)
+ off += len(s)
+ return off, nil
+}
+
func unpackStringTxt(msg []byte, off int) ([]string, int, error) {
txt, off, err := unpackTxt(msg, off)
if err != nil {
@@ -383,7 +412,7 @@ func packStringTxt(s []string, msg []byte, off int) (int, error) {
func unpackDataOpt(msg []byte, off int) ([]EDNS0, int, error) {
var edns []EDNS0
Option:
- code := uint16(0)
+ var code uint16
if off+4 > len(msg) {
return nil, len(msg), &Error{err: "overflow unpacking opt"}
}
@@ -478,7 +507,7 @@ Option:
func packDataOpt(options []EDNS0, msg []byte, off int) (int, error) {
for _, el := range options {
b, err := el.pack()
- if err != nil || off+3 > len(msg) {
+ if err != nil || off+4 > len(msg) {
return len(msg), &Error{err: "overflow packing opt"}
}
binary.BigEndian.PutUint16(msg[off:], el.Option()) // Option code
@@ -537,8 +566,7 @@ func unpackDataNsec(msg []byte, off int) ([]uint16, int, error) {
}
// Walk the bytes in the window and extract the type bits
- for j := 0; j < length; j++ {
- b := msg[off+j]
+ for j, b := range msg[off : off+length] {
// Check the bits one by one, and set the type
if b&0x80 == 0x80 {
nsec = append(nsec, uint16(window*256+j*8+0))
@@ -571,13 +599,35 @@ func unpackDataNsec(msg []byte, off int) ([]uint16, int, error) {
return nsec, off, nil
}
+// typeBitMapLen is a helper function which computes the "maximum" length of
+// a the NSEC Type BitMap field.
+func typeBitMapLen(bitmap []uint16) int {
+ var l int
+ var lastwindow, lastlength uint16
+ for _, t := range bitmap {
+ window := t / 256
+ length := (t-window*256)/8 + 1
+ if window > lastwindow && lastlength != 0 { // New window, jump to the new offset
+ l += int(lastlength) + 2
+ lastlength = 0
+ }
+ if window < lastwindow || length < lastlength {
+ // packDataNsec would return Error{err: "nsec bits out of order"} here, but
+ // when computing the length, we want do be liberal.
+ continue
+ }
+ lastwindow, lastlength = window, length
+ }
+ l += int(lastlength) + 2
+ return l
+}
+
func packDataNsec(bitmap []uint16, msg []byte, off int) (int, error) {
if len(bitmap) == 0 {
return off, nil
}
var lastwindow, lastlength uint16
- for j := 0; j < len(bitmap); j++ {
- t := bitmap[j]
+ for _, t := range bitmap {
window := t / 256
length := (t-window*256)/8 + 1
if window > lastwindow && lastlength != 0 { // New window, jump to the new offset
@@ -621,10 +671,10 @@ func unpackDataDomainNames(msg []byte, off, end int) ([]string, int, error) {
return servers, off, nil
}
-func packDataDomainNames(names []string, msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+func packDataDomainNames(names []string, msg []byte, off int, compression compressionMap, compress bool) (int, error) {
var err error
- for j := 0; j < len(names); j++ {
- off, err = PackDomainName(names[j], msg, off, compression, false && compress)
+ for _, name := range names {
+ off, err = packDomainName(name, msg, off, compression, compress)
if err != nil {
return len(msg), err
}
diff --git a/vendor/github.com/miekg/dns/msg_truncate.go b/vendor/github.com/miekg/dns/msg_truncate.go
new file mode 100644
index 0000000000..89d40757db
--- /dev/null
+++ b/vendor/github.com/miekg/dns/msg_truncate.go
@@ -0,0 +1,111 @@
+package dns
+
+// Truncate ensures the reply message will fit into the requested buffer
+// size by removing records that exceed the requested size.
+//
+// It will first check if the reply fits without compression and then with
+// compression. If it won't fit with compression, Truncate then walks the
+// record adding as many records as possible without exceeding the
+// requested buffer size.
+//
+// The TC bit will be set if any records were excluded from the message.
+// This indicates to that the client should retry over TCP.
+//
+// According to RFC 2181, the TC bit should only be set if not all of the
+// "required" RRs can be included in the response. Unfortunately, we have
+// no way of knowing which RRs are required so we set the TC bit if any RR
+// had to be omitted from the response.
+//
+// The appropriate buffer size can be retrieved from the requests OPT
+// record, if present, and is transport specific otherwise. dns.MinMsgSize
+// should be used for UDP requests without an OPT record, and
+// dns.MaxMsgSize for TCP requests without an OPT record.
+func (dns *Msg) Truncate(size int) {
+ if dns.IsTsig() != nil {
+ // To simplify this implementation, we don't perform
+ // truncation on responses with a TSIG record.
+ return
+ }
+
+ // RFC 6891 mandates that the payload size in an OPT record
+ // less than 512 bytes must be treated as equal to 512 bytes.
+ //
+ // For ease of use, we impose that restriction here.
+ if size < 512 {
+ size = 512
+ }
+
+ l := msgLenWithCompressionMap(dns, nil) // uncompressed length
+ if l <= size {
+ // Don't waste effort compressing this message.
+ dns.Compress = false
+ return
+ }
+
+ dns.Compress = true
+
+ edns0 := dns.popEdns0()
+ if edns0 != nil {
+ // Account for the OPT record that gets added at the end,
+ // by subtracting that length from our budget.
+ //
+ // The EDNS(0) OPT record must have the root domain and
+ // it's length is thus unaffected by compression.
+ size -= Len(edns0)
+ }
+
+ compression := make(map[string]struct{})
+
+ l = headerSize
+ for _, r := range dns.Question {
+ l += r.len(l, compression)
+ }
+
+ var numAnswer int
+ if l < size {
+ l, numAnswer = truncateLoop(dns.Answer, size, l, compression)
+ }
+
+ var numNS int
+ if l < size {
+ l, numNS = truncateLoop(dns.Ns, size, l, compression)
+ }
+
+ var numExtra int
+ if l < size {
+ l, numExtra = truncateLoop(dns.Extra, size, l, compression)
+ }
+
+ // See the function documentation for when we set this.
+ dns.Truncated = len(dns.Answer) > numAnswer ||
+ len(dns.Ns) > numNS || len(dns.Extra) > numExtra
+
+ dns.Answer = dns.Answer[:numAnswer]
+ dns.Ns = dns.Ns[:numNS]
+ dns.Extra = dns.Extra[:numExtra]
+
+ if edns0 != nil {
+ // Add the OPT record back onto the additional section.
+ dns.Extra = append(dns.Extra, edns0)
+ }
+}
+
+func truncateLoop(rrs []RR, size, l int, compression map[string]struct{}) (int, int) {
+ for i, r := range rrs {
+ if r == nil {
+ continue
+ }
+
+ l += r.len(l, compression)
+ if l > size {
+ // Return size, rather than l prior to this record,
+ // to prevent any further records being added.
+ return size, i
+ }
+ if l == size {
+ return l, i + 1
+ }
+ }
+
+ return l, len(rrs)
+}
diff --git a/vendor/github.com/miekg/dns/nsecx.go b/vendor/github.com/miekg/dns/nsecx.go
index 9b908c4478..8f071a4739 100644
--- a/vendor/github.com/miekg/dns/nsecx.go
+++ b/vendor/github.com/miekg/dns/nsecx.go
@@ -2,49 +2,44 @@ package dns
import (
"crypto/sha1"
- "hash"
+ "encoding/hex"
"strings"
)
-type saltWireFmt struct {
- Salt string `dns:"size-hex"`
-}
-
// HashName hashes a string (label) according to RFC 5155. It returns the hashed string in uppercase.
func HashName(label string, ha uint8, iter uint16, salt string) string {
- saltwire := new(saltWireFmt)
- saltwire.Salt = salt
- wire := make([]byte, DefaultMsgSize)
- n, err := packSaltWire(saltwire, wire)
+ if ha != SHA1 {
+ return ""
+ }
+
+ wireSalt := make([]byte, hex.DecodedLen(len(salt)))
+ n, err := packStringHex(salt, wireSalt, 0)
if err != nil {
return ""
}
- wire = wire[:n]
+ wireSalt = wireSalt[:n]
+
name := make([]byte, 255)
off, err := PackDomainName(strings.ToLower(label), name, 0, nil, false)
if err != nil {
return ""
}
name = name[:off]
- var s hash.Hash
- switch ha {
- case SHA1:
- s = sha1.New()
- default:
- return ""
- }
+ s := sha1.New()
// k = 0
s.Write(name)
- s.Write(wire)
+ s.Write(wireSalt)
nsec3 := s.Sum(nil)
+
// k > 0
for k := uint16(0); k < iter; k++ {
s.Reset()
s.Write(nsec3)
- s.Write(wire)
+ s.Write(wireSalt)
nsec3 = s.Sum(nsec3[:0])
}
+
return toBase32(nsec3)
}
@@ -63,8 +58,10 @@ func (rr *NSEC3) Cover(name string) bool {
}
nextHash := rr.NextDomain
- if ownerHash == nextHash { // empty interval
- return false
+
+ // if empty interval found, try cover wildcard hashes so nameHash shouldn't match with ownerHash
+ if ownerHash == nextHash && nameHash != ownerHash { // empty interval
+ return true
}
if ownerHash > nextHash { // end of zone
if nameHash > ownerHash { // covered since there is nothing after ownerHash
@@ -96,11 +93,3 @@ func (rr *NSEC3) Match(name string) bool {
}
return false
}
-
-func packSaltWire(sw *saltWireFmt, msg []byte) (int, error) {
- off, err := packStringHex(sw.Salt, msg, 0)
- if err != nil {
- return off, err
- }
- return off, nil
-}
diff --git a/vendor/github.com/miekg/dns/privaterr.go b/vendor/github.com/miekg/dns/privaterr.go
index 74544a74e5..e28f066374 100644
--- a/vendor/github.com/miekg/dns/privaterr.go
+++ b/vendor/github.com/miekg/dns/privaterr.go
@@ -1,9 +1,6 @@
package dns
-import (
- "fmt"
- "strings"
-)
+import "strings"
// PrivateRdata is an interface used for implementing "Private Use" RR types, see
// RFC 6895. This allows one to experiment with new RR types, without requesting an
@@ -18,7 +15,7 @@ type PrivateRdata interface {
// Unpack is used when unpacking a private RR from a buffer.
// TODO(miek): diff. signature than Pack, see edns0.go for instance.
Unpack([]byte) (int, error)
- // Copy copies the Rdata.
+ // Copy copies the Rdata into the PrivateRdata argument.
Copy(PrivateRdata) error
// Len returns the length in octets of the Rdata.
Len() int
@@ -29,21 +26,8 @@ type PrivateRdata interface {
type PrivateRR struct {
Hdr RR_Header
Data PrivateRdata
-}
-func mkPrivateRR(rrtype uint16) *PrivateRR {
- // Panics if RR is not an instance of PrivateRR.
- rrfunc, ok := TypeToRR[rrtype]
- if !ok {
- panic(fmt.Sprintf("dns: invalid operation with Private RR type %d", rrtype))
- }
-
- anyrr := rrfunc()
- switch rr := anyrr.(type) {
- case *PrivateRR:
- return rr
- }
- panic(fmt.Sprintf("dns: RR is not a PrivateRR, TypeToRR[%d] generator returned %T", rrtype, anyrr))
+ generator func() PrivateRdata // for copy
}
// Header return the RR header of r.
@@ -52,86 +36,71 @@ func (r *PrivateRR) Header() *RR_Header { return &r.Hdr }
func (r *PrivateRR) String() string { return r.Hdr.String() + r.Data.String() }
// Private len and copy parts to satisfy RR interface.
-func (r *PrivateRR) len() int { return r.Hdr.len() + r.Data.Len() }
+func (r *PrivateRR) len(off int, compression map[string]struct{}) int {
+ l := r.Hdr.len(off, compression)
+ l += r.Data.Len()
+ return l
+}
+
func (r *PrivateRR) copy() RR {
// make new RR like this:
- rr := mkPrivateRR(r.Hdr.Rrtype)
- rr.Hdr = r.Hdr
+ rr := &PrivateRR{r.Hdr, r.generator(), r.generator}
- err := r.Data.Copy(rr.Data)
- if err != nil {
- panic("dns: got value that could not be used to copy Private rdata")
+ if err := r.Data.Copy(rr.Data); err != nil {
+ panic("dns: got value that could not be used to copy Private rdata: " + err.Error())
}
+
return rr
}
-func (r *PrivateRR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := r.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+
+func (r *PrivateRR) pack(msg []byte, off int, compression compressionMap, compress bool) (int, error) {
n, err := r.Data.Pack(msg[off:])
if err != nil {
return len(msg), err
}
off += n
- r.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
+func (r *PrivateRR) unpack(msg []byte, off int) (int, error) {
+ off1, err := r.Data.Unpack(msg[off:])
+ off += off1
+ return off, err
+}
+
+func (r *PrivateRR) parse(c *zlexer, origin string) *ParseError {
+ var l lex
+ text := make([]string, 0, 2) // could be 0..N elements, median is probably 1
+Fetch:
+ for {
+ // TODO(miek): we could also be returning _QUOTE, this might or might not
+ // be an issue (basically parsing TXT becomes hard)
+ switch l, _ = c.Next(); l.value {
+ case zNewline, zEOF:
+ break Fetch
+ case zString:
+ text = append(text, l.token)
+ }
+ }
+
+ err := r.Data.Parse(text)
+ if err != nil {
+ return &ParseError{"", err.Error(), l}
+ }
+
+ return nil
+}
+
+func (r1 *PrivateRR) isDuplicate(r2 RR) bool { return false }
+
// PrivateHandle registers a private resource record type. It requires
// string and numeric representation of private RR type and generator function as argument.
func PrivateHandle(rtypestr string, rtype uint16, generator func() PrivateRdata) {
rtypestr = strings.ToUpper(rtypestr)
- TypeToRR[rtype] = func() RR { return &PrivateRR{RR_Header{}, generator()} }
+ TypeToRR[rtype] = func() RR { return &PrivateRR{RR_Header{}, generator(), generator} }
TypeToString[rtype] = rtypestr
StringToType[rtypestr] = rtype
-
- typeToUnpack[rtype] = func(h RR_Header, msg []byte, off int) (RR, int, error) {
- if noRdata(h) {
- return &h, off, nil
- }
- var err error
-
- rr := mkPrivateRR(h.Rrtype)
- rr.Hdr = h
-
- off1, err := rr.Data.Unpack(msg[off:])
- off += off1
- if err != nil {
- return rr, off, err
- }
- return rr, off, err
- }
-
- setPrivateRR := func(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := mkPrivateRR(h.Rrtype)
- rr.Hdr = h
-
- var l lex
- text := make([]string, 0, 2) // could be 0..N elements, median is probably 1
- Fetch:
- for {
- // TODO(miek): we could also be returning _QUOTE, this might or might not
- // be an issue (basically parsing TXT becomes hard)
- switch l, _ = c.Next(); l.value {
- case zNewline, zEOF:
- break Fetch
- case zString:
- text = append(text, l.token)
- }
- }
-
- err := rr.Data.Parse(text)
- if err != nil {
- return nil, &ParseError{f, err.Error(), l}, ""
- }
-
- return rr, nil, ""
- }
-
- typeToparserFunc[rtype] = parserFunc{setPrivateRR, true}
}
// PrivateHandleRemove removes definitions required to support private RR type.
@@ -140,8 +109,6 @@ func PrivateHandleRemove(rtype uint16) {
if ok {
delete(TypeToRR, rtype)
delete(TypeToString, rtype)
- delete(typeToparserFunc, rtype)
delete(StringToType, rtypestr)
- delete(typeToUnpack, rtype)
}
}
diff --git a/vendor/github.com/miekg/dns/rawmsg.go b/vendor/github.com/miekg/dns/rawmsg.go
deleted file mode 100644
index 6e21fba7e1..0000000000
--- a/vendor/github.com/miekg/dns/rawmsg.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package dns
-
-import "encoding/binary"
-
-// rawSetRdlength sets the rdlength in the header of
-// the RR. The offset 'off' must be positioned at the
-// start of the header of the RR, 'end' must be the
-// end of the RR.
-func rawSetRdlength(msg []byte, off, end int) bool {
- l := len(msg)
-Loop:
- for {
- if off+1 > l {
- return false
- }
- c := int(msg[off])
- off++
- switch c & 0xC0 {
- case 0x00:
- if c == 0x00 {
- // End of the domainname
- break Loop
- }
- if off+c > l {
- return false
- }
- off += c
-
- case 0xC0:
- // pointer, next byte included, ends domainname
- off++
- break Loop
- }
- }
- // The domainname has been seen, we at the start of the fixed part in the header.
- // Type is 2 bytes, class is 2 bytes, ttl 4 and then 2 bytes for the length.
- off += 2 + 2 + 4
- if off+2 > l {
- return false
- }
- //off+1 is the end of the header, 'end' is the end of the rr
- //so 'end' - 'off+2' is the length of the rdata
- rdatalen := end - (off + 2)
- if rdatalen > 0xFFFF {
- return false
- }
- binary.BigEndian.PutUint16(msg[off:], uint16(rdatalen))
- return true
-}
diff --git a/vendor/github.com/miekg/dns/reverse.go b/vendor/github.com/miekg/dns/reverse.go
index f6e7a47a6e..28151af835 100644
--- a/vendor/github.com/miekg/dns/reverse.go
+++ b/vendor/github.com/miekg/dns/reverse.go
@@ -12,6 +12,20 @@ var StringToOpcode = reverseInt(OpcodeToString)
// StringToRcode is a map of rcodes to strings.
var StringToRcode = reverseInt(RcodeToString)
+func init() {
+ // Preserve previous NOTIMP typo, see github.com/miekg/dns/issues/733.
+ StringToRcode["NOTIMPL"] = RcodeNotImplemented
+}
+
+// StringToAlgorithm is the reverse of AlgorithmToString.
+var StringToAlgorithm = reverseInt8(AlgorithmToString)
+
+// StringToHash is a map of names to hash IDs.
+var StringToHash = reverseInt8(HashToString)
+
+// StringToCertType is the reverseof CertTypeToString.
+var StringToCertType = reverseInt16(CertTypeToString)
+
// Reverse a map
func reverseInt8(m map[uint8]string) map[string]uint8 {
n := make(map[string]uint8, len(m))
diff --git a/vendor/github.com/miekg/dns/sanitize.go b/vendor/github.com/miekg/dns/sanitize.go
index cac15787ad..a638e862e3 100644
--- a/vendor/github.com/miekg/dns/sanitize.go
+++ b/vendor/github.com/miekg/dns/sanitize.go
@@ -15,10 +15,11 @@ func Dedup(rrs []RR, m map[string]RR) []RR {
for _, r := range rrs {
key := normalizedString(r)
keys = append(keys, &key)
- if _, ok := m[key]; ok {
+ if mr, ok := m[key]; ok {
// Shortest TTL wins.
- if m[key].Header().Ttl > r.Header().Ttl {
- m[key].Header().Ttl = r.Header().Ttl
+ rh, mrh := r.Header(), mr.Header()
+ if mrh.Ttl > rh.Ttl {
+ mrh.Ttl = rh.Ttl
}
continue
}
diff --git a/vendor/github.com/miekg/dns/scan.go b/vendor/github.com/miekg/dns/scan.go
index 61ace121e5..0f9361af01 100644
--- a/vendor/github.com/miekg/dns/scan.go
+++ b/vendor/github.com/miekg/dns/scan.go
@@ -79,13 +79,12 @@ func (e *ParseError) Error() (s string) {
}
type lex struct {
- token string // text of the token
- err bool // when true, token text has lexer error
- value uint8 // value: zString, _BLANK, etc.
- torc uint16 // type or class as parsed in the lexer, we only need to look this up in the grammar
- line int // line in the file
- column int // column in the file
- comment string // any comment text seen
+ token string // text of the token
+ err bool // when true, token text has lexer error
+ value uint8 // value: zString, _BLANK, etc.
+ torc uint16 // type or class as parsed in the lexer, we only need to look this up in the grammar
+ line int // line in the file
+ column int // column in the file
}
// Token holds the token that are returned when a zone file is parsed.
@@ -135,7 +134,7 @@ func ReadRR(r io.Reader, file string) (RR, error) {
}
// ParseZone reads a RFC 1035 style zonefile from r. It returns
-// *Tokens on the returned channel, each consisting of either a
+// Tokens on the returned channel, each consisting of either a
// parsed RR and optional comment or a nil RR and an error. The
// channel is closed by ParseZone when the end of r is reached.
//
@@ -144,7 +143,8 @@ func ReadRR(r io.Reader, file string) (RR, error) {
// origin, as if the file would start with an $ORIGIN directive.
//
// The directives $INCLUDE, $ORIGIN, $TTL and $GENERATE are all
-// supported.
+// supported. Note that $GENERATE's range support up to a maximum of
+// of 65535 steps.
//
// Basic usage pattern when reading from a string (z) containing the
// zone data:
@@ -204,6 +204,7 @@ func parseZone(r io.Reader, origin, file string, t chan *Token) {
//
// The directives $INCLUDE, $ORIGIN, $TTL and $GENERATE are all
// supported. Although $INCLUDE is disabled by default.
+// Note that $GENERATE's range support up to a maximum of 65535 steps.
//
// Basic usage pattern when reading from a string (z) containing the
// zone data:
@@ -244,8 +245,6 @@ type ZoneParser struct {
sub *ZoneParser
osFile *os.File
- com string
-
includeDepth uint8
includeAllowed bool
@@ -318,12 +317,19 @@ func (zp *ZoneParser) setParseError(err string, l lex) (RR, bool) {
// Comment returns an optional text comment that occurred alongside
// the RR.
func (zp *ZoneParser) Comment() string {
- return zp.com
+ if zp.parseErr != nil {
+ return ""
+ }
+
+ if zp.sub != nil {
+ return zp.sub.Comment()
+ }
+
+ return zp.c.Comment()
}
func (zp *ZoneParser) subNext() (RR, bool) {
if rr, ok := zp.sub.Next(); ok {
- zp.com = zp.sub.com
return rr, true
}
@@ -347,8 +353,6 @@ func (zp *ZoneParser) subNext() (RR, bool) {
// error. After Next returns (nil, false), the Err method will return
// any error that occurred during parsing.
func (zp *ZoneParser) Next() (RR, bool) {
- zp.com = ""
-
if zp.parseErr != nil {
return nil, false
}
@@ -501,9 +505,8 @@ func (zp *ZoneParser) Next() (RR, bool) {
return zp.setParseError("expecting $TTL value, not this...", l)
}
- if e, _ := slurpRemainder(zp.c, zp.file); e != nil {
- zp.parseErr = e
- return nil, false
+ if err := slurpRemainder(zp.c); err != nil {
+ return zp.setParseError(err.err, err.lex)
}
ttl, ok := stringToTTL(l.token)
@@ -525,9 +528,8 @@ func (zp *ZoneParser) Next() (RR, bool) {
return zp.setParseError("expecting $ORIGIN value, not this...", l)
}
- if e, _ := slurpRemainder(zp.c, zp.file); e != nil {
- zp.parseErr = e
- return nil, false
+ if err := slurpRemainder(zp.c); err != nil {
+ return zp.setParseError(err.err, err.lex)
}
name, ok := toAbsoluteName(l.token, zp.origin)
@@ -648,20 +650,44 @@ func (zp *ZoneParser) Next() (RR, bool) {
st = zExpectRdata
case zExpectRdata:
- r, e, c1 := setRR(*h, zp.c, zp.origin, zp.file)
- if e != nil {
- // If e.lex is nil than we have encounter a unknown RR type
- // in that case we substitute our current lex token
- if e.lex.token == "" && e.lex.value == 0 {
- e.lex = l // Uh, dirty
- }
-
- zp.parseErr = e
- return nil, false
+ var rr RR
+ if newFn, ok := TypeToRR[h.Rrtype]; ok && canParseAsRR(h.Rrtype) {
+ rr = newFn()
+ *rr.Header() = *h
+ } else {
+ rr = &RFC3597{Hdr: *h}
}
- zp.com = c1
- return r, true
+ _, isPrivate := rr.(*PrivateRR)
+ if !isPrivate && zp.c.Peek().token == "" {
+ // This is a dynamic update rr.
+
+ // TODO(tmthrgd): Previously slurpRemainder was only called
+ // for certain RR types, which may have been important.
+ if err := slurpRemainder(zp.c); err != nil {
+ return zp.setParseError(err.err, err.lex)
+ }
+
+ return rr, true
+ } else if l.value == zNewline {
+ return zp.setParseError("unexpected newline", l)
+ }
+
+ if err := rr.parse(zp.c, zp.origin); err != nil {
+ // err is a concrete *ParseError without the file field set.
+ // The setParseError call below will construct a new
+ // *ParseError with file set to zp.file.
+
+ // If err.lex is nil than we have encounter an unknown RR type
+ // in that case we substitute our current lex token.
+ if err.lex == (lex{}) {
+ return zp.setParseError(err.err, l)
+ }
+
+ return zp.setParseError(err.err, err.lex)
+ }
+
+ return rr, true
}
}
@@ -670,6 +696,18 @@ func (zp *ZoneParser) Next() (RR, bool) {
return nil, false
}
+// canParseAsRR returns true if the record type can be parsed as a
+// concrete RR. It blacklists certain record types that must be parsed
+// according to RFC 3597 because they lack a presentation format.
+func canParseAsRR(rrtype uint16) bool {
+ switch rrtype {
+ case TypeANY, TypeNULL, TypeOPT, TypeTSIG:
+ return false
+ default:
+ return true
+ }
+}
+
type zlexer struct {
br io.ByteReader
@@ -678,9 +716,11 @@ type zlexer struct {
line int
column int
- com string
+ comBuf string
+ comment string
- l lex
+ l lex
+ cachedL *lex
brace int
quote bool
@@ -746,13 +786,37 @@ func (zl *zlexer) readByte() (byte, bool) {
return c, true
}
+func (zl *zlexer) Peek() lex {
+ if zl.nextL {
+ return zl.l
+ }
+
+ l, ok := zl.Next()
+ if !ok {
+ return l
+ }
+
+ if zl.nextL {
+ // Cache l. Next returns zl.cachedL then zl.l.
+ zl.cachedL = &l
+ } else {
+ // In this case l == zl.l, so we just tell Next to return zl.l.
+ zl.nextL = true
+ }
+
+ return l
+}
+
func (zl *zlexer) Next() (lex, bool) {
l := &zl.l
- if zl.nextL {
+ switch {
+ case zl.cachedL != nil:
+ l, zl.cachedL = zl.cachedL, nil
+ return *l, true
+ case zl.nextL:
zl.nextL = false
return *l, true
- }
- if l.err {
+ case l.err:
// Parsing errors should be sticky.
return lex{value: zEOF}, false
}
@@ -767,14 +831,15 @@ func (zl *zlexer) Next() (lex, bool) {
escape bool
)
- if zl.com != "" {
- comi = copy(com[:], zl.com)
- zl.com = ""
+ if zl.comBuf != "" {
+ comi = copy(com[:], zl.comBuf)
+ zl.comBuf = ""
}
+ zl.comment = ""
+
for x, ok := zl.readByte(); ok; x, ok = zl.readByte() {
l.line, l.column = zl.line, zl.column
- l.comment = ""
if stri >= len(str) {
l.token = "token length insufficient for parsing"
@@ -898,20 +963,25 @@ func (zl *zlexer) Next() (lex, bool) {
}
zl.commt = true
- zl.com = ""
+ zl.comBuf = ""
if comi > 1 {
// A newline was previously seen inside a comment that
// was inside braces and we delayed adding it until now.
com[comi] = ' ' // convert newline to space
comi++
+ if comi >= len(com) {
+ l.token = "comment length insufficient for parsing"
+ l.err = true
+ return *l, true
+ }
}
com[comi] = ';'
comi++
if stri > 0 {
- zl.com = string(com[:comi])
+ zl.comBuf = string(com[:comi])
l.value = zString
l.token = string(str[:stri])
@@ -947,11 +1017,11 @@ func (zl *zlexer) Next() (lex, bool) {
l.value = zNewline
l.token = "\n"
- l.comment = string(com[:comi])
+ zl.comment = string(com[:comi])
return *l, true
}
- zl.com = string(com[:comi])
+ zl.comBuf = string(com[:comi])
break
}
@@ -977,9 +1047,9 @@ func (zl *zlexer) Next() (lex, bool) {
l.value = zNewline
l.token = "\n"
- l.comment = zl.com
- zl.com = ""
+ zl.comment = zl.comBuf
+ zl.comBuf = ""
zl.rrtype = false
zl.owner = true
@@ -1115,7 +1185,7 @@ func (zl *zlexer) Next() (lex, bool) {
// Send remainder of com
l.value = zNewline
l.token = "\n"
- l.comment = string(com[:comi])
+ zl.comment = string(com[:comi])
if retL != (lex{}) {
zl.nextL = true
@@ -1126,7 +1196,6 @@ func (zl *zlexer) Next() (lex, bool) {
}
if zl.brace != 0 {
- l.comment = "" // in case there was left over string and comment
l.token = "unbalanced brace"
l.err = true
return *l, true
@@ -1135,6 +1204,14 @@ func (zl *zlexer) Next() (lex, bool) {
return lex{value: zEOF}, false
}
+func (zl *zlexer) Comment() string {
+ if zl.l.err {
+ return ""
+ }
+
+ return zl.comment
+}
+
// Extract the class number from CLASSxx
func classToInt(token string) (uint16, bool) {
offset := 5
@@ -1163,8 +1240,7 @@ func typeToInt(token string) (uint16, bool) {
// stringToTTL parses things like 2w, 2m, etc, and returns the time in seconds.
func stringToTTL(token string) (uint32, bool) {
- s := uint32(0)
- i := uint32(0)
+ var s, i uint32
for _, c := range token {
switch c {
case 's', 'S':
@@ -1252,7 +1328,7 @@ func toAbsoluteName(name, origin string) (absolute string, ok bool) {
}
// check if name is already absolute
- if name[len(name)-1] == '.' {
+ if IsFqdn(name) {
return name, true
}
@@ -1292,24 +1368,21 @@ func locCheckEast(token string, longitude uint32) (uint32, bool) {
return longitude, false
}
-// "Eat" the rest of the "line". Return potential comments
-func slurpRemainder(c *zlexer, f string) (*ParseError, string) {
+// "Eat" the rest of the "line"
+func slurpRemainder(c *zlexer) *ParseError {
l, _ := c.Next()
- com := ""
switch l.value {
case zBlank:
l, _ = c.Next()
- com = l.comment
if l.value != zNewline && l.value != zEOF {
- return &ParseError{f, "garbage after rdata", l}, ""
+ return &ParseError{"", "garbage after rdata", l}
}
case zNewline:
- com = l.comment
case zEOF:
default:
- return &ParseError{f, "garbage after rdata", l}, ""
+ return &ParseError{"", "garbage after rdata", l}
}
- return nil, com
+ return nil
}
// Parse a 64 bit-like ipv6 address: "0014:4fff:ff20:ee64"
diff --git a/vendor/github.com/miekg/dns/scan_rr.go b/vendor/github.com/miekg/dns/scan_rr.go
index 935d22c3ff..93b24a697d 100644
--- a/vendor/github.com/miekg/dns/scan_rr.go
+++ b/vendor/github.com/miekg/dns/scan_rr.go
@@ -7,70 +7,35 @@ import (
"strings"
)
-type parserFunc struct {
- // Func defines the function that parses the tokens and returns the RR
- // or an error. The last string contains any comments in the line as
- // they returned by the lexer as well.
- Func func(h RR_Header, c *zlexer, origin string, file string) (RR, *ParseError, string)
- // Signals if the RR ending is of variable length, like TXT or records
- // that have Hexadecimal or Base64 as their last element in the Rdata. Records
- // that have a fixed ending or for instance A, AAAA, SOA and etc.
- Variable bool
-}
-
-// Parse the rdata of each rrtype.
-// All data from the channel c is either zString or zBlank.
-// After the rdata there may come a zBlank and then a zNewline
-// or immediately a zNewline. If this is not the case we flag
-// an *ParseError: garbage after rdata.
-func setRR(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- parserfunc, ok := typeToparserFunc[h.Rrtype]
- if ok {
- r, e, cm := parserfunc.Func(h, c, o, f)
- if parserfunc.Variable {
- return r, e, cm
- }
- if e != nil {
- return nil, e, ""
- }
- e, cm = slurpRemainder(c, f)
- if e != nil {
- return nil, e, ""
- }
- return r, nil, cm
- }
- // RFC3957 RR (Unknown RR handling)
- return setRFC3597(h, c, o, f)
-}
-
// A remainder of the rdata with embedded spaces, return the parsed string (sans the spaces)
// or an error
-func endingToString(c *zlexer, errstr, f string) (string, *ParseError, string) {
- s := ""
+func endingToString(c *zlexer, errstr string) (string, *ParseError) {
+ var s string
l, _ := c.Next() // zString
for l.value != zNewline && l.value != zEOF {
if l.err {
- return s, &ParseError{f, errstr, l}, ""
+ return s, &ParseError{"", errstr, l}
}
switch l.value {
case zString:
s += l.token
case zBlank: // Ok
default:
- return "", &ParseError{f, errstr, l}, ""
+ return "", &ParseError{"", errstr, l}
}
l, _ = c.Next()
}
- return s, nil, l.comment
+
+ return s, nil
}
// A remainder of the rdata with embedded spaces, split on unquoted whitespace
// and return the parsed string slice or an error
-func endingToTxtSlice(c *zlexer, errstr, f string) ([]string, *ParseError, string) {
+func endingToTxtSlice(c *zlexer, errstr string) ([]string, *ParseError) {
// Get the remaining data until we see a zNewline
l, _ := c.Next()
if l.err {
- return nil, &ParseError{f, errstr, l}, ""
+ return nil, &ParseError{"", errstr, l}
}
// Build the slice
@@ -79,7 +44,7 @@ func endingToTxtSlice(c *zlexer, errstr, f string) ([]string, *ParseError, strin
empty := false
for l.value != zNewline && l.value != zEOF {
if l.err {
- return nil, &ParseError{f, errstr, l}, ""
+ return nil, &ParseError{"", errstr, l}
}
switch l.value {
case zString:
@@ -106,7 +71,7 @@ func endingToTxtSlice(c *zlexer, errstr, f string) ([]string, *ParseError, strin
case zBlank:
if quote {
// zBlank can only be seen in between txt parts.
- return nil, &ParseError{f, errstr, l}, ""
+ return nil, &ParseError{"", errstr, l}
}
case zQuote:
if empty && quote {
@@ -115,115 +80,79 @@ func endingToTxtSlice(c *zlexer, errstr, f string) ([]string, *ParseError, strin
quote = !quote
empty = true
default:
- return nil, &ParseError{f, errstr, l}, ""
+ return nil, &ParseError{"", errstr, l}
}
l, _ = c.Next()
}
+
if quote {
- return nil, &ParseError{f, errstr, l}, ""
+ return nil, &ParseError{"", errstr, l}
}
- return s, nil, l.comment
+
+ return s, nil
}
-func setA(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(A)
- rr.Hdr = h
-
+func (rr *A) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
rr.A = net.ParseIP(l.token)
- if rr.A == nil || l.err {
- return nil, &ParseError{f, "bad A A", l}, ""
+ // IPv4 addresses cannot include ":".
+ // We do this rather than use net.IP's To4() because
+ // To4() treats IPv4-mapped IPv6 addresses as being
+ // IPv4.
+ isIPv4 := !strings.Contains(l.token, ":")
+ if rr.A == nil || !isIPv4 || l.err {
+ return &ParseError{"", "bad A A", l}
}
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setAAAA(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(AAAA)
- rr.Hdr = h
-
+func (rr *AAAA) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
rr.AAAA = net.ParseIP(l.token)
- if rr.AAAA == nil || l.err {
- return nil, &ParseError{f, "bad AAAA AAAA", l}, ""
+ // IPv6 addresses must include ":", and IPv4
+ // addresses cannot include ":".
+ isIPv6 := strings.Contains(l.token, ":")
+ if rr.AAAA == nil || !isIPv6 || l.err {
+ return &ParseError{"", "bad AAAA AAAA", l}
}
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setNS(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(NS)
- rr.Hdr = h
-
+func (rr *NS) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.Ns = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad NS Ns", l}, ""
+ return &ParseError{"", "bad NS Ns", l}
}
rr.Ns = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setPTR(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(PTR)
- rr.Hdr = h
-
+func (rr *PTR) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.Ptr = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad PTR Ptr", l}, ""
+ return &ParseError{"", "bad PTR Ptr", l}
}
rr.Ptr = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setNSAPPTR(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(NSAPPTR)
- rr.Hdr = h
-
+func (rr *NSAPPTR) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.Ptr = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad NSAP-PTR Ptr", l}, ""
+ return &ParseError{"", "bad NSAP-PTR Ptr", l}
}
rr.Ptr = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setRP(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(RP)
- rr.Hdr = h
-
+func (rr *RP) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.Mbox = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
mbox, mboxOk := toAbsoluteName(l.token, o)
if l.err || !mboxOk {
- return nil, &ParseError{f, "bad RP Mbox", l}, ""
+ return &ParseError{"", "bad RP Mbox", l}
}
rr.Mbox = mbox
@@ -233,78 +162,51 @@ func setRP(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
txt, txtOk := toAbsoluteName(l.token, o)
if l.err || !txtOk {
- return nil, &ParseError{f, "bad RP Txt", l}, ""
+ return &ParseError{"", "bad RP Txt", l}
}
rr.Txt = txt
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setMR(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(MR)
- rr.Hdr = h
-
+func (rr *MR) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.Mr = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad MR Mr", l}, ""
+ return &ParseError{"", "bad MR Mr", l}
}
rr.Mr = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setMB(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(MB)
- rr.Hdr = h
-
+func (rr *MB) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.Mb = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad MB Mb", l}, ""
+ return &ParseError{"", "bad MB Mb", l}
}
rr.Mb = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setMG(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(MG)
- rr.Hdr = h
-
+func (rr *MG) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.Mg = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad MG Mg", l}, ""
+ return &ParseError{"", "bad MG Mg", l}
}
rr.Mg = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setHINFO(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(HINFO)
- rr.Hdr = h
-
- chunks, e, c1 := endingToTxtSlice(c, "bad HINFO Fields", f)
+func (rr *HINFO) parse(c *zlexer, o string) *ParseError {
+ chunks, e := endingToTxtSlice(c, "bad HINFO Fields")
if e != nil {
- return nil, e, c1
+ return e
}
if ln := len(chunks); ln == 0 {
- return rr, nil, ""
+ return nil
} else if ln == 1 {
// Can we split it?
if out := strings.Fields(chunks[0]); len(out) > 1 {
@@ -317,22 +219,14 @@ func setHINFO(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
rr.Cpu = chunks[0]
rr.Os = strings.Join(chunks[1:], " ")
- return rr, nil, ""
+ return nil
}
-func setMINFO(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(MINFO)
- rr.Hdr = h
-
+func (rr *MINFO) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.Rmail = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
rmail, rmailOk := toAbsoluteName(l.token, o)
if l.err || !rmailOk {
- return nil, &ParseError{f, "bad MINFO Rmail", l}, ""
+ return &ParseError{"", "bad MINFO Rmail", l}
}
rr.Rmail = rmail
@@ -342,61 +236,38 @@ func setMINFO(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
email, emailOk := toAbsoluteName(l.token, o)
if l.err || !emailOk {
- return nil, &ParseError{f, "bad MINFO Email", l}, ""
+ return &ParseError{"", "bad MINFO Email", l}
}
rr.Email = email
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setMF(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(MF)
- rr.Hdr = h
-
+func (rr *MF) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.Mf = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad MF Mf", l}, ""
+ return &ParseError{"", "bad MF Mf", l}
}
rr.Mf = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setMD(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(MD)
- rr.Hdr = h
-
+func (rr *MD) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.Md = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad MD Md", l}, ""
+ return &ParseError{"", "bad MD Md", l}
}
rr.Md = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setMX(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(MX)
- rr.Hdr = h
-
+func (rr *MX) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad MX Pref", l}, ""
+ return &ParseError{"", "bad MX Pref", l}
}
rr.Preference = uint16(i)
@@ -406,25 +277,18 @@ func setMX(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad MX Mx", l}, ""
+ return &ParseError{"", "bad MX Mx", l}
}
rr.Mx = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setRT(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(RT)
- rr.Hdr = h
-
+func (rr *RT) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil {
- return nil, &ParseError{f, "bad RT Preference", l}, ""
+ return &ParseError{"", "bad RT Preference", l}
}
rr.Preference = uint16(i)
@@ -434,25 +298,18 @@ func setRT(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad RT Host", l}, ""
+ return &ParseError{"", "bad RT Host", l}
}
rr.Host = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setAFSDB(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(AFSDB)
- rr.Hdr = h
-
+func (rr *AFSDB) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad AFSDB Subtype", l}, ""
+ return &ParseError{"", "bad AFSDB Subtype", l}
}
rr.Subtype = uint16(i)
@@ -462,40 +319,26 @@ func setAFSDB(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad AFSDB Hostname", l}, ""
+ return &ParseError{"", "bad AFSDB Hostname", l}
}
rr.Hostname = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setX25(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(X25)
- rr.Hdr = h
-
+func (rr *X25) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
if l.err {
- return nil, &ParseError{f, "bad X25 PSDNAddress", l}, ""
+ return &ParseError{"", "bad X25 PSDNAddress", l}
}
rr.PSDNAddress = l.token
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setKX(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(KX)
- rr.Hdr = h
-
+func (rr *KX) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad KX Pref", l}, ""
+ return &ParseError{"", "bad KX Pref", l}
}
rr.Preference = uint16(i)
@@ -505,61 +348,37 @@ func setKX(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad KX Exchanger", l}, ""
+ return &ParseError{"", "bad KX Exchanger", l}
}
rr.Exchanger = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setCNAME(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(CNAME)
- rr.Hdr = h
-
+func (rr *CNAME) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.Target = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad CNAME Target", l}, ""
+ return &ParseError{"", "bad CNAME Target", l}
}
rr.Target = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setDNAME(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(DNAME)
- rr.Hdr = h
-
+func (rr *DNAME) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.Target = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad DNAME Target", l}, ""
+ return &ParseError{"", "bad DNAME Target", l}
}
rr.Target = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setSOA(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(SOA)
- rr.Hdr = h
-
+func (rr *SOA) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.Ns = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
ns, nsOk := toAbsoluteName(l.token, o)
if l.err || !nsOk {
- return nil, &ParseError{f, "bad SOA Ns", l}, ""
+ return &ParseError{"", "bad SOA Ns", l}
}
rr.Ns = ns
@@ -569,7 +388,7 @@ func setSOA(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
mbox, mboxOk := toAbsoluteName(l.token, o)
if l.err || !mboxOk {
- return nil, &ParseError{f, "bad SOA Mbox", l}, ""
+ return &ParseError{"", "bad SOA Mbox", l}
}
rr.Mbox = mbox
@@ -582,16 +401,16 @@ func setSOA(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
for i := 0; i < 5; i++ {
l, _ = c.Next()
if l.err {
- return nil, &ParseError{f, "bad SOA zone parameter", l}, ""
+ return &ParseError{"", "bad SOA zone parameter", l}
}
if j, e := strconv.ParseUint(l.token, 10, 32); e != nil {
if i == 0 {
// Serial must be a number
- return nil, &ParseError{f, "bad SOA zone parameter", l}, ""
+ return &ParseError{"", "bad SOA zone parameter", l}
}
// We allow other fields to be unitful duration strings
if v, ok = stringToTTL(l.token); !ok {
- return nil, &ParseError{f, "bad SOA zone parameter", l}, ""
+ return &ParseError{"", "bad SOA zone parameter", l}
}
} else {
@@ -614,21 +433,14 @@ func setSOA(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
rr.Minttl = v
}
}
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setSRV(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(SRV)
- rr.Hdr = h
-
+func (rr *SRV) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad SRV Priority", l}, ""
+ return &ParseError{"", "bad SRV Priority", l}
}
rr.Priority = uint16(i)
@@ -636,7 +448,7 @@ func setSRV(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
l, _ = c.Next() // zString
i, e = strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad SRV Weight", l}, ""
+ return &ParseError{"", "bad SRV Weight", l}
}
rr.Weight = uint16(i)
@@ -644,7 +456,7 @@ func setSRV(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
l, _ = c.Next() // zString
i, e = strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad SRV Port", l}, ""
+ return &ParseError{"", "bad SRV Port", l}
}
rr.Port = uint16(i)
@@ -654,24 +466,17 @@ func setSRV(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad SRV Target", l}, ""
+ return &ParseError{"", "bad SRV Target", l}
}
rr.Target = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setNAPTR(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(NAPTR)
- rr.Hdr = h
-
+func (rr *NAPTR) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad NAPTR Order", l}, ""
+ return &ParseError{"", "bad NAPTR Order", l}
}
rr.Order = uint16(i)
@@ -679,7 +484,7 @@ func setNAPTR(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
l, _ = c.Next() // zString
i, e = strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad NAPTR Preference", l}, ""
+ return &ParseError{"", "bad NAPTR Preference", l}
}
rr.Preference = uint16(i)
@@ -687,57 +492,57 @@ func setNAPTR(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
c.Next() // zBlank
l, _ = c.Next() // _QUOTE
if l.value != zQuote {
- return nil, &ParseError{f, "bad NAPTR Flags", l}, ""
+ return &ParseError{"", "bad NAPTR Flags", l}
}
l, _ = c.Next() // Either String or Quote
if l.value == zString {
rr.Flags = l.token
l, _ = c.Next() // _QUOTE
if l.value != zQuote {
- return nil, &ParseError{f, "bad NAPTR Flags", l}, ""
+ return &ParseError{"", "bad NAPTR Flags", l}
}
} else if l.value == zQuote {
rr.Flags = ""
} else {
- return nil, &ParseError{f, "bad NAPTR Flags", l}, ""
+ return &ParseError{"", "bad NAPTR Flags", l}
}
// Service
c.Next() // zBlank
l, _ = c.Next() // _QUOTE
if l.value != zQuote {
- return nil, &ParseError{f, "bad NAPTR Service", l}, ""
+ return &ParseError{"", "bad NAPTR Service", l}
}
l, _ = c.Next() // Either String or Quote
if l.value == zString {
rr.Service = l.token
l, _ = c.Next() // _QUOTE
if l.value != zQuote {
- return nil, &ParseError{f, "bad NAPTR Service", l}, ""
+ return &ParseError{"", "bad NAPTR Service", l}
}
} else if l.value == zQuote {
rr.Service = ""
} else {
- return nil, &ParseError{f, "bad NAPTR Service", l}, ""
+ return &ParseError{"", "bad NAPTR Service", l}
}
// Regexp
c.Next() // zBlank
l, _ = c.Next() // _QUOTE
if l.value != zQuote {
- return nil, &ParseError{f, "bad NAPTR Regexp", l}, ""
+ return &ParseError{"", "bad NAPTR Regexp", l}
}
l, _ = c.Next() // Either String or Quote
if l.value == zString {
rr.Regexp = l.token
l, _ = c.Next() // _QUOTE
if l.value != zQuote {
- return nil, &ParseError{f, "bad NAPTR Regexp", l}, ""
+ return &ParseError{"", "bad NAPTR Regexp", l}
}
} else if l.value == zQuote {
rr.Regexp = ""
} else {
- return nil, &ParseError{f, "bad NAPTR Regexp", l}, ""
+ return &ParseError{"", "bad NAPTR Regexp", l}
}
// After quote no space??
@@ -747,25 +552,17 @@ func setNAPTR(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad NAPTR Replacement", l}, ""
+ return &ParseError{"", "bad NAPTR Replacement", l}
}
rr.Replacement = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setTALINK(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(TALINK)
- rr.Hdr = h
-
+func (rr *TALINK) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.PreviousName = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
previousName, previousNameOk := toAbsoluteName(l.token, o)
if l.err || !previousNameOk {
- return nil, &ParseError{f, "bad TALINK PreviousName", l}, ""
+ return &ParseError{"", "bad TALINK PreviousName", l}
}
rr.PreviousName = previousName
@@ -775,16 +572,14 @@ func setTALINK(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
nextName, nextNameOk := toAbsoluteName(l.token, o)
if l.err || !nextNameOk {
- return nil, &ParseError{f, "bad TALINK NextName", l}, ""
+ return &ParseError{"", "bad TALINK NextName", l}
}
rr.NextName = nextName
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setLOC(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(LOC)
- rr.Hdr = h
+func (rr *LOC) parse(c *zlexer, o string) *ParseError {
// Non zero defaults for LOC record, see RFC 1876, Section 3.
rr.HorizPre = 165 // 10000
rr.VertPre = 162 // 10
@@ -793,12 +588,9 @@ func setLOC(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
// North
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
i, e := strconv.ParseUint(l.token, 10, 32)
if e != nil || l.err {
- return nil, &ParseError{f, "bad LOC Latitude", l}, ""
+ return &ParseError{"", "bad LOC Latitude", l}
}
rr.Latitude = 1000 * 60 * 60 * uint32(i)
@@ -810,14 +602,14 @@ func setLOC(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
}
i, e = strconv.ParseUint(l.token, 10, 32)
if e != nil || l.err {
- return nil, &ParseError{f, "bad LOC Latitude minutes", l}, ""
+ return &ParseError{"", "bad LOC Latitude minutes", l}
}
rr.Latitude += 1000 * 60 * uint32(i)
c.Next() // zBlank
l, _ = c.Next()
if i, e := strconv.ParseFloat(l.token, 32); e != nil || l.err {
- return nil, &ParseError{f, "bad LOC Latitude seconds", l}, ""
+ return &ParseError{"", "bad LOC Latitude seconds", l}
} else {
rr.Latitude += uint32(1000 * i)
}
@@ -828,14 +620,14 @@ func setLOC(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
goto East
}
// If still alive, flag an error
- return nil, &ParseError{f, "bad LOC Latitude North/South", l}, ""
+ return &ParseError{"", "bad LOC Latitude North/South", l}
East:
// East
c.Next() // zBlank
l, _ = c.Next()
if i, e := strconv.ParseUint(l.token, 10, 32); e != nil || l.err {
- return nil, &ParseError{f, "bad LOC Longitude", l}, ""
+ return &ParseError{"", "bad LOC Longitude", l}
} else {
rr.Longitude = 1000 * 60 * 60 * uint32(i)
}
@@ -846,14 +638,14 @@ East:
goto Altitude
}
if i, e := strconv.ParseUint(l.token, 10, 32); e != nil || l.err {
- return nil, &ParseError{f, "bad LOC Longitude minutes", l}, ""
+ return &ParseError{"", "bad LOC Longitude minutes", l}
} else {
rr.Longitude += 1000 * 60 * uint32(i)
}
c.Next() // zBlank
l, _ = c.Next()
if i, e := strconv.ParseFloat(l.token, 32); e != nil || l.err {
- return nil, &ParseError{f, "bad LOC Longitude seconds", l}, ""
+ return &ParseError{"", "bad LOC Longitude seconds", l}
} else {
rr.Longitude += uint32(1000 * i)
}
@@ -864,19 +656,19 @@ East:
goto Altitude
}
// If still alive, flag an error
- return nil, &ParseError{f, "bad LOC Longitude East/West", l}, ""
+ return &ParseError{"", "bad LOC Longitude East/West", l}
Altitude:
c.Next() // zBlank
l, _ = c.Next()
if len(l.token) == 0 || l.err {
- return nil, &ParseError{f, "bad LOC Altitude", l}, ""
+ return &ParseError{"", "bad LOC Altitude", l}
}
if l.token[len(l.token)-1] == 'M' || l.token[len(l.token)-1] == 'm' {
l.token = l.token[0 : len(l.token)-1]
}
if i, e := strconv.ParseFloat(l.token, 32); e != nil {
- return nil, &ParseError{f, "bad LOC Altitude", l}, ""
+ return &ParseError{"", "bad LOC Altitude", l}
} else {
rr.Altitude = uint32(i*100.0 + 10000000.0 + 0.5)
}
@@ -891,19 +683,19 @@ Altitude:
case 0: // Size
e, m, ok := stringToCm(l.token)
if !ok {
- return nil, &ParseError{f, "bad LOC Size", l}, ""
+ return &ParseError{"", "bad LOC Size", l}
}
rr.Size = e&0x0f | m<<4&0xf0
case 1: // HorizPre
e, m, ok := stringToCm(l.token)
if !ok {
- return nil, &ParseError{f, "bad LOC HorizPre", l}, ""
+ return &ParseError{"", "bad LOC HorizPre", l}
}
rr.HorizPre = e&0x0f | m<<4&0xf0
case 2: // VertPre
e, m, ok := stringToCm(l.token)
if !ok {
- return nil, &ParseError{f, "bad LOC VertPre", l}, ""
+ return &ParseError{"", "bad LOC VertPre", l}
}
rr.VertPre = e&0x0f | m<<4&0xf0
}
@@ -911,33 +703,26 @@ Altitude:
case zBlank:
// Ok
default:
- return nil, &ParseError{f, "bad LOC Size, HorizPre or VertPre", l}, ""
+ return &ParseError{"", "bad LOC Size, HorizPre or VertPre", l}
}
l, _ = c.Next()
}
- return rr, nil, ""
+ return nil
}
-func setHIP(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(HIP)
- rr.Hdr = h
-
+func (rr *HIP) parse(c *zlexer, o string) *ParseError {
// HitLength is not represented
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, l.comment
- }
-
i, e := strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad HIP PublicKeyAlgorithm", l}, ""
+ return &ParseError{"", "bad HIP PublicKeyAlgorithm", l}
}
rr.PublicKeyAlgorithm = uint8(i)
c.Next() // zBlank
l, _ = c.Next() // zString
if len(l.token) == 0 || l.err {
- return nil, &ParseError{f, "bad HIP Hit", l}, ""
+ return &ParseError{"", "bad HIP Hit", l}
}
rr.Hit = l.token // This can not contain spaces, see RFC 5205 Section 6.
rr.HitLength = uint8(len(rr.Hit)) / 2
@@ -945,7 +730,7 @@ func setHIP(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
c.Next() // zBlank
l, _ = c.Next() // zString
if len(l.token) == 0 || l.err {
- return nil, &ParseError{f, "bad HIP PublicKey", l}, ""
+ return &ParseError{"", "bad HIP PublicKey", l}
}
rr.PublicKey = l.token // This cannot contain spaces
rr.PublicKeyLength = uint16(base64.StdEncoding.DecodedLen(len(rr.PublicKey)))
@@ -958,33 +743,27 @@ func setHIP(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
case zString:
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad HIP RendezvousServers", l}, ""
+ return &ParseError{"", "bad HIP RendezvousServers", l}
}
xs = append(xs, name)
case zBlank:
// Ok
default:
- return nil, &ParseError{f, "bad HIP RendezvousServers", l}, ""
+ return &ParseError{"", "bad HIP RendezvousServers", l}
}
l, _ = c.Next()
}
+
rr.RendezvousServers = xs
- return rr, nil, l.comment
+ return nil
}
-func setCERT(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(CERT)
- rr.Hdr = h
-
+func (rr *CERT) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, l.comment
- }
-
if v, ok := StringToCertType[l.token]; ok {
rr.Type = v
} else if i, e := strconv.ParseUint(l.token, 10, 16); e != nil {
- return nil, &ParseError{f, "bad CERT Type", l}, ""
+ return &ParseError{"", "bad CERT Type", l}
} else {
rr.Type = uint16(i)
}
@@ -992,7 +771,7 @@ func setCERT(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
l, _ = c.Next() // zString
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad CERT KeyTag", l}, ""
+ return &ParseError{"", "bad CERT KeyTag", l}
}
rr.KeyTag = uint16(i)
c.Next() // zBlank
@@ -1000,42 +779,33 @@ func setCERT(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
if v, ok := StringToAlgorithm[l.token]; ok {
rr.Algorithm = v
} else if i, e := strconv.ParseUint(l.token, 10, 8); e != nil {
- return nil, &ParseError{f, "bad CERT Algorithm", l}, ""
+ return &ParseError{"", "bad CERT Algorithm", l}
} else {
rr.Algorithm = uint8(i)
}
- s, e1, c1 := endingToString(c, "bad CERT Certificate", f)
+ s, e1 := endingToString(c, "bad CERT Certificate")
if e1 != nil {
- return nil, e1, c1
+ return e1
}
rr.Certificate = s
- return rr, nil, c1
+ return nil
}
-func setOPENPGPKEY(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(OPENPGPKEY)
- rr.Hdr = h
-
- s, e, c1 := endingToString(c, "bad OPENPGPKEY PublicKey", f)
+func (rr *OPENPGPKEY) parse(c *zlexer, o string) *ParseError {
+ s, e := endingToString(c, "bad OPENPGPKEY PublicKey")
if e != nil {
- return nil, e, c1
+ return e
}
rr.PublicKey = s
- return rr, nil, c1
+ return nil
}
-func setCSYNC(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(CSYNC)
- rr.Hdr = h
-
+func (rr *CSYNC) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, l.comment
- }
j, e := strconv.ParseUint(l.token, 10, 32)
if e != nil {
// Serial must be a number
- return nil, &ParseError{f, "bad CSYNC serial", l}, ""
+ return &ParseError{"", "bad CSYNC serial", l}
}
rr.Serial = uint32(j)
@@ -1045,7 +815,7 @@ func setCSYNC(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
j, e = strconv.ParseUint(l.token, 10, 16)
if e != nil {
// Serial must be a number
- return nil, &ParseError{f, "bad CSYNC flags", l}, ""
+ return &ParseError{"", "bad CSYNC flags", l}
}
rr.Flags = uint16(j)
@@ -1063,45 +833,34 @@ func setCSYNC(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
tokenUpper := strings.ToUpper(l.token)
if k, ok = StringToType[tokenUpper]; !ok {
if k, ok = typeToInt(l.token); !ok {
- return nil, &ParseError{f, "bad CSYNC TypeBitMap", l}, ""
+ return &ParseError{"", "bad CSYNC TypeBitMap", l}
}
}
rr.TypeBitMap = append(rr.TypeBitMap, k)
default:
- return nil, &ParseError{f, "bad CSYNC TypeBitMap", l}, ""
+ return &ParseError{"", "bad CSYNC TypeBitMap", l}
}
l, _ = c.Next()
}
- return rr, nil, l.comment
+ return nil
}
-func setSIG(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- r, e, s := setRRSIG(h, c, o, f)
- if r != nil {
- return &SIG{*r.(*RRSIG)}, e, s
- }
- return nil, e, s
+func (rr *SIG) parse(c *zlexer, o string) *ParseError {
+ return rr.RRSIG.parse(c, o)
}
-func setRRSIG(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(RRSIG)
- rr.Hdr = h
-
+func (rr *RRSIG) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, l.comment
- }
-
tokenUpper := strings.ToUpper(l.token)
if t, ok := StringToType[tokenUpper]; !ok {
if strings.HasPrefix(tokenUpper, "TYPE") {
t, ok = typeToInt(l.token)
if !ok {
- return nil, &ParseError{f, "bad RRSIG Typecovered", l}, ""
+ return &ParseError{"", "bad RRSIG Typecovered", l}
}
rr.TypeCovered = t
} else {
- return nil, &ParseError{f, "bad RRSIG Typecovered", l}, ""
+ return &ParseError{"", "bad RRSIG Typecovered", l}
}
} else {
rr.TypeCovered = t
@@ -1111,7 +870,7 @@ func setRRSIG(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
l, _ = c.Next()
i, err := strconv.ParseUint(l.token, 10, 8)
if err != nil || l.err {
- return nil, &ParseError{f, "bad RRSIG Algorithm", l}, ""
+ return &ParseError{"", "bad RRSIG Algorithm", l}
}
rr.Algorithm = uint8(i)
@@ -1119,7 +878,7 @@ func setRRSIG(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
l, _ = c.Next()
i, err = strconv.ParseUint(l.token, 10, 8)
if err != nil || l.err {
- return nil, &ParseError{f, "bad RRSIG Labels", l}, ""
+ return &ParseError{"", "bad RRSIG Labels", l}
}
rr.Labels = uint8(i)
@@ -1127,7 +886,7 @@ func setRRSIG(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
l, _ = c.Next()
i, err = strconv.ParseUint(l.token, 10, 32)
if err != nil || l.err {
- return nil, &ParseError{f, "bad RRSIG OrigTtl", l}, ""
+ return &ParseError{"", "bad RRSIG OrigTtl", l}
}
rr.OrigTtl = uint32(i)
@@ -1139,7 +898,7 @@ func setRRSIG(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
// TODO(miek): error out on > MAX_UINT32, same below
rr.Expiration = uint32(i)
} else {
- return nil, &ParseError{f, "bad RRSIG Expiration", l}, ""
+ return &ParseError{"", "bad RRSIG Expiration", l}
}
} else {
rr.Expiration = i
@@ -1151,7 +910,7 @@ func setRRSIG(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
if i, err := strconv.ParseInt(l.token, 10, 64); err == nil {
rr.Inception = uint32(i)
} else {
- return nil, &ParseError{f, "bad RRSIG Inception", l}, ""
+ return &ParseError{"", "bad RRSIG Inception", l}
}
} else {
rr.Inception = i
@@ -1161,7 +920,7 @@ func setRRSIG(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
l, _ = c.Next()
i, err = strconv.ParseUint(l.token, 10, 16)
if err != nil || l.err {
- return nil, &ParseError{f, "bad RRSIG KeyTag", l}, ""
+ return &ParseError{"", "bad RRSIG KeyTag", l}
}
rr.KeyTag = uint16(i)
@@ -1170,32 +929,24 @@ func setRRSIG(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
rr.SignerName = l.token
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad RRSIG SignerName", l}, ""
+ return &ParseError{"", "bad RRSIG SignerName", l}
}
rr.SignerName = name
- s, e, c1 := endingToString(c, "bad RRSIG Signature", f)
+ s, e := endingToString(c, "bad RRSIG Signature")
if e != nil {
- return nil, e, c1
+ return e
}
rr.Signature = s
- return rr, nil, c1
+ return nil
}
-func setNSEC(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(NSEC)
- rr.Hdr = h
-
+func (rr *NSEC) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- rr.NextDomain = l.token
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, l.comment
- }
-
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad NSEC NextDomain", l}, ""
+ return &ParseError{"", "bad NSEC NextDomain", l}
}
rr.NextDomain = name
@@ -1213,50 +964,43 @@ func setNSEC(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
tokenUpper := strings.ToUpper(l.token)
if k, ok = StringToType[tokenUpper]; !ok {
if k, ok = typeToInt(l.token); !ok {
- return nil, &ParseError{f, "bad NSEC TypeBitMap", l}, ""
+ return &ParseError{"", "bad NSEC TypeBitMap", l}
}
}
rr.TypeBitMap = append(rr.TypeBitMap, k)
default:
- return nil, &ParseError{f, "bad NSEC TypeBitMap", l}, ""
+ return &ParseError{"", "bad NSEC TypeBitMap", l}
}
l, _ = c.Next()
}
- return rr, nil, l.comment
+ return nil
}
-func setNSEC3(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(NSEC3)
- rr.Hdr = h
-
+func (rr *NSEC3) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, l.comment
- }
-
i, e := strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad NSEC3 Hash", l}, ""
+ return &ParseError{"", "bad NSEC3 Hash", l}
}
rr.Hash = uint8(i)
c.Next() // zBlank
l, _ = c.Next()
i, e = strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad NSEC3 Flags", l}, ""
+ return &ParseError{"", "bad NSEC3 Flags", l}
}
rr.Flags = uint8(i)
c.Next() // zBlank
l, _ = c.Next()
i, e = strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad NSEC3 Iterations", l}, ""
+ return &ParseError{"", "bad NSEC3 Iterations", l}
}
rr.Iterations = uint16(i)
c.Next()
l, _ = c.Next()
if len(l.token) == 0 || l.err {
- return nil, &ParseError{f, "bad NSEC3 Salt", l}, ""
+ return &ParseError{"", "bad NSEC3 Salt", l}
}
if l.token != "-" {
rr.SaltLength = uint8(len(l.token)) / 2
@@ -1266,7 +1010,7 @@ func setNSEC3(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
c.Next()
l, _ = c.Next()
if len(l.token) == 0 || l.err {
- return nil, &ParseError{f, "bad NSEC3 NextDomain", l}, ""
+ return &ParseError{"", "bad NSEC3 NextDomain", l}
}
rr.HashLength = 20 // Fix for NSEC3 (sha1 160 bits)
rr.NextDomain = l.token
@@ -1285,44 +1029,37 @@ func setNSEC3(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
tokenUpper := strings.ToUpper(l.token)
if k, ok = StringToType[tokenUpper]; !ok {
if k, ok = typeToInt(l.token); !ok {
- return nil, &ParseError{f, "bad NSEC3 TypeBitMap", l}, ""
+ return &ParseError{"", "bad NSEC3 TypeBitMap", l}
}
}
rr.TypeBitMap = append(rr.TypeBitMap, k)
default:
- return nil, &ParseError{f, "bad NSEC3 TypeBitMap", l}, ""
+ return &ParseError{"", "bad NSEC3 TypeBitMap", l}
}
l, _ = c.Next()
}
- return rr, nil, l.comment
+ return nil
}
-func setNSEC3PARAM(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(NSEC3PARAM)
- rr.Hdr = h
-
+func (rr *NSEC3PARAM) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad NSEC3PARAM Hash", l}, ""
+ return &ParseError{"", "bad NSEC3PARAM Hash", l}
}
rr.Hash = uint8(i)
c.Next() // zBlank
l, _ = c.Next()
i, e = strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad NSEC3PARAM Flags", l}, ""
+ return &ParseError{"", "bad NSEC3PARAM Flags", l}
}
rr.Flags = uint8(i)
c.Next() // zBlank
l, _ = c.Next()
i, e = strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad NSEC3PARAM Iterations", l}, ""
+ return &ParseError{"", "bad NSEC3PARAM Iterations", l}
}
rr.Iterations = uint16(i)
c.Next()
@@ -1331,20 +1068,13 @@ func setNSEC3PARAM(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string
rr.SaltLength = uint8(len(l.token))
rr.Salt = l.token
}
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setEUI48(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(EUI48)
- rr.Hdr = h
-
+func (rr *EUI48) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
if len(l.token) != 17 || l.err {
- return nil, &ParseError{f, "bad EUI48 Address", l}, ""
+ return &ParseError{"", "bad EUI48 Address", l}
}
addr := make([]byte, 12)
dash := 0
@@ -1353,7 +1083,7 @@ func setEUI48(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
addr[i+1] = l.token[i+1+dash]
dash++
if l.token[i+1+dash] != '-' {
- return nil, &ParseError{f, "bad EUI48 Address", l}, ""
+ return &ParseError{"", "bad EUI48 Address", l}
}
}
addr[10] = l.token[15]
@@ -1361,23 +1091,16 @@ func setEUI48(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
i, e := strconv.ParseUint(string(addr), 16, 48)
if e != nil {
- return nil, &ParseError{f, "bad EUI48 Address", l}, ""
+ return &ParseError{"", "bad EUI48 Address", l}
}
rr.Address = i
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setEUI64(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(EUI64)
- rr.Hdr = h
-
+func (rr *EUI64) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
if len(l.token) != 23 || l.err {
- return nil, &ParseError{f, "bad EUI64 Address", l}, ""
+ return &ParseError{"", "bad EUI64 Address", l}
}
addr := make([]byte, 16)
dash := 0
@@ -1386,7 +1109,7 @@ func setEUI64(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
addr[i+1] = l.token[i+1+dash]
dash++
if l.token[i+1+dash] != '-' {
- return nil, &ParseError{f, "bad EUI64 Address", l}, ""
+ return &ParseError{"", "bad EUI64 Address", l}
}
}
addr[14] = l.token[21]
@@ -1394,200 +1117,152 @@ func setEUI64(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
i, e := strconv.ParseUint(string(addr), 16, 64)
if e != nil {
- return nil, &ParseError{f, "bad EUI68 Address", l}, ""
+ return &ParseError{"", "bad EUI68 Address", l}
}
- rr.Address = uint64(i)
- return rr, nil, ""
+ rr.Address = i
+ return slurpRemainder(c)
}
-func setSSHFP(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(SSHFP)
- rr.Hdr = h
-
+func (rr *SSHFP) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad SSHFP Algorithm", l}, ""
+ return &ParseError{"", "bad SSHFP Algorithm", l}
}
rr.Algorithm = uint8(i)
c.Next() // zBlank
l, _ = c.Next()
i, e = strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad SSHFP Type", l}, ""
+ return &ParseError{"", "bad SSHFP Type", l}
}
rr.Type = uint8(i)
c.Next() // zBlank
- s, e1, c1 := endingToString(c, "bad SSHFP Fingerprint", f)
+ s, e1 := endingToString(c, "bad SSHFP Fingerprint")
if e1 != nil {
- return nil, e1, c1
+ return e1
}
rr.FingerPrint = s
- return rr, nil, ""
+ return nil
}
-func setDNSKEYs(h RR_Header, c *zlexer, o, f, typ string) (RR, *ParseError, string) {
- rr := new(DNSKEY)
- rr.Hdr = h
-
+func (rr *DNSKEY) parseDNSKEY(c *zlexer, o, typ string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, l.comment
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad " + typ + " Flags", l}, ""
+ return &ParseError{"", "bad " + typ + " Flags", l}
}
rr.Flags = uint16(i)
c.Next() // zBlank
l, _ = c.Next() // zString
i, e = strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad " + typ + " Protocol", l}, ""
+ return &ParseError{"", "bad " + typ + " Protocol", l}
}
rr.Protocol = uint8(i)
c.Next() // zBlank
l, _ = c.Next() // zString
i, e = strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad " + typ + " Algorithm", l}, ""
+ return &ParseError{"", "bad " + typ + " Algorithm", l}
}
rr.Algorithm = uint8(i)
- s, e1, c1 := endingToString(c, "bad "+typ+" PublicKey", f)
+ s, e1 := endingToString(c, "bad "+typ+" PublicKey")
if e1 != nil {
- return nil, e1, c1
+ return e1
}
rr.PublicKey = s
- return rr, nil, c1
+ return nil
}
-func setKEY(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- r, e, s := setDNSKEYs(h, c, o, f, "KEY")
- if r != nil {
- return &KEY{*r.(*DNSKEY)}, e, s
- }
- return nil, e, s
+func (rr *DNSKEY) parse(c *zlexer, o string) *ParseError {
+ return rr.parseDNSKEY(c, o, "DNSKEY")
}
-func setDNSKEY(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- r, e, s := setDNSKEYs(h, c, o, f, "DNSKEY")
- return r, e, s
+func (rr *KEY) parse(c *zlexer, o string) *ParseError {
+ return rr.parseDNSKEY(c, o, "KEY")
}
-func setCDNSKEY(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- r, e, s := setDNSKEYs(h, c, o, f, "CDNSKEY")
- if r != nil {
- return &CDNSKEY{*r.(*DNSKEY)}, e, s
- }
- return nil, e, s
+func (rr *CDNSKEY) parse(c *zlexer, o string) *ParseError {
+ return rr.parseDNSKEY(c, o, "CDNSKEY")
}
-func setRKEY(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(RKEY)
- rr.Hdr = h
-
+func (rr *RKEY) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, l.comment
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad RKEY Flags", l}, ""
+ return &ParseError{"", "bad RKEY Flags", l}
}
rr.Flags = uint16(i)
c.Next() // zBlank
l, _ = c.Next() // zString
i, e = strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad RKEY Protocol", l}, ""
+ return &ParseError{"", "bad RKEY Protocol", l}
}
rr.Protocol = uint8(i)
c.Next() // zBlank
l, _ = c.Next() // zString
i, e = strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad RKEY Algorithm", l}, ""
+ return &ParseError{"", "bad RKEY Algorithm", l}
}
rr.Algorithm = uint8(i)
- s, e1, c1 := endingToString(c, "bad RKEY PublicKey", f)
+ s, e1 := endingToString(c, "bad RKEY PublicKey")
if e1 != nil {
- return nil, e1, c1
+ return e1
}
rr.PublicKey = s
- return rr, nil, c1
+ return nil
}
-func setEID(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(EID)
- rr.Hdr = h
- s, e, c1 := endingToString(c, "bad EID Endpoint", f)
+func (rr *EID) parse(c *zlexer, o string) *ParseError {
+ s, e := endingToString(c, "bad EID Endpoint")
if e != nil {
- return nil, e, c1
+ return e
}
rr.Endpoint = s
- return rr, nil, c1
+ return nil
}
-func setNIMLOC(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(NIMLOC)
- rr.Hdr = h
- s, e, c1 := endingToString(c, "bad NIMLOC Locator", f)
+func (rr *NIMLOC) parse(c *zlexer, o string) *ParseError {
+ s, e := endingToString(c, "bad NIMLOC Locator")
if e != nil {
- return nil, e, c1
+ return e
}
rr.Locator = s
- return rr, nil, c1
+ return nil
}
-func setGPOS(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(GPOS)
- rr.Hdr = h
-
+func (rr *GPOS) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
_, e := strconv.ParseFloat(l.token, 64)
if e != nil || l.err {
- return nil, &ParseError{f, "bad GPOS Longitude", l}, ""
+ return &ParseError{"", "bad GPOS Longitude", l}
}
rr.Longitude = l.token
c.Next() // zBlank
l, _ = c.Next()
_, e = strconv.ParseFloat(l.token, 64)
if e != nil || l.err {
- return nil, &ParseError{f, "bad GPOS Latitude", l}, ""
+ return &ParseError{"", "bad GPOS Latitude", l}
}
rr.Latitude = l.token
c.Next() // zBlank
l, _ = c.Next()
_, e = strconv.ParseFloat(l.token, 64)
if e != nil || l.err {
- return nil, &ParseError{f, "bad GPOS Altitude", l}, ""
+ return &ParseError{"", "bad GPOS Altitude", l}
}
rr.Altitude = l.token
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setDSs(h RR_Header, c *zlexer, o, f, typ string) (RR, *ParseError, string) {
- rr := new(DS)
- rr.Hdr = h
-
+func (rr *DS) parseDS(c *zlexer, o, typ string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, l.comment
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad " + typ + " KeyTag", l}, ""
+ return &ParseError{"", "bad " + typ + " KeyTag", l}
}
rr.KeyTag = uint16(i)
c.Next() // zBlank
@@ -1596,7 +1271,7 @@ func setDSs(h RR_Header, c *zlexer, o, f, typ string) (RR, *ParseError, string)
tokenUpper := strings.ToUpper(l.token)
i, ok := StringToAlgorithm[tokenUpper]
if !ok || l.err {
- return nil, &ParseError{f, "bad " + typ + " Algorithm", l}, ""
+ return &ParseError{"", "bad " + typ + " Algorithm", l}
}
rr.Algorithm = i
} else {
@@ -1606,50 +1281,34 @@ func setDSs(h RR_Header, c *zlexer, o, f, typ string) (RR, *ParseError, string)
l, _ = c.Next()
i, e = strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad " + typ + " DigestType", l}, ""
+ return &ParseError{"", "bad " + typ + " DigestType", l}
}
rr.DigestType = uint8(i)
- s, e1, c1 := endingToString(c, "bad "+typ+" Digest", f)
+ s, e1 := endingToString(c, "bad "+typ+" Digest")
if e1 != nil {
- return nil, e1, c1
+ return e1
}
rr.Digest = s
- return rr, nil, c1
+ return nil
}
-func setDS(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- r, e, s := setDSs(h, c, o, f, "DS")
- return r, e, s
+func (rr *DS) parse(c *zlexer, o string) *ParseError {
+ return rr.parseDS(c, o, "DS")
}
-func setDLV(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- r, e, s := setDSs(h, c, o, f, "DLV")
- if r != nil {
- return &DLV{*r.(*DS)}, e, s
- }
- return nil, e, s
+func (rr *DLV) parse(c *zlexer, o string) *ParseError {
+ return rr.parseDS(c, o, "DLV")
}
-func setCDS(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- r, e, s := setDSs(h, c, o, f, "CDS")
- if r != nil {
- return &CDS{*r.(*DS)}, e, s
- }
- return nil, e, s
+func (rr *CDS) parse(c *zlexer, o string) *ParseError {
+ return rr.parseDS(c, o, "CDS")
}
-func setTA(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(TA)
- rr.Hdr = h
-
+func (rr *TA) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, l.comment
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad TA KeyTag", l}, ""
+ return &ParseError{"", "bad TA KeyTag", l}
}
rr.KeyTag = uint16(i)
c.Next() // zBlank
@@ -1658,7 +1317,7 @@ func setTA(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
tokenUpper := strings.ToUpper(l.token)
i, ok := StringToAlgorithm[tokenUpper]
if !ok || l.err {
- return nil, &ParseError{f, "bad TA Algorithm", l}, ""
+ return &ParseError{"", "bad TA Algorithm", l}
}
rr.Algorithm = i
} else {
@@ -1668,274 +1327,214 @@ func setTA(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
l, _ = c.Next()
i, e = strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad TA DigestType", l}, ""
+ return &ParseError{"", "bad TA DigestType", l}
}
rr.DigestType = uint8(i)
- s, err, c1 := endingToString(c, "bad TA Digest", f)
+ s, err := endingToString(c, "bad TA Digest")
if err != nil {
- return nil, err, c1
+ return err
}
rr.Digest = s
- return rr, nil, c1
+ return nil
}
-func setTLSA(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(TLSA)
- rr.Hdr = h
-
+func (rr *TLSA) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, l.comment
- }
-
i, e := strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad TLSA Usage", l}, ""
+ return &ParseError{"", "bad TLSA Usage", l}
}
rr.Usage = uint8(i)
c.Next() // zBlank
l, _ = c.Next()
i, e = strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad TLSA Selector", l}, ""
+ return &ParseError{"", "bad TLSA Selector", l}
}
rr.Selector = uint8(i)
c.Next() // zBlank
l, _ = c.Next()
i, e = strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad TLSA MatchingType", l}, ""
+ return &ParseError{"", "bad TLSA MatchingType", l}
}
rr.MatchingType = uint8(i)
// So this needs be e2 (i.e. different than e), because...??t
- s, e2, c1 := endingToString(c, "bad TLSA Certificate", f)
+ s, e2 := endingToString(c, "bad TLSA Certificate")
if e2 != nil {
- return nil, e2, c1
+ return e2
}
rr.Certificate = s
- return rr, nil, c1
+ return nil
}
-func setSMIMEA(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(SMIMEA)
- rr.Hdr = h
-
+func (rr *SMIMEA) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, l.comment
- }
-
i, e := strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad SMIMEA Usage", l}, ""
+ return &ParseError{"", "bad SMIMEA Usage", l}
}
rr.Usage = uint8(i)
c.Next() // zBlank
l, _ = c.Next()
i, e = strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad SMIMEA Selector", l}, ""
+ return &ParseError{"", "bad SMIMEA Selector", l}
}
rr.Selector = uint8(i)
c.Next() // zBlank
l, _ = c.Next()
i, e = strconv.ParseUint(l.token, 10, 8)
if e != nil || l.err {
- return nil, &ParseError{f, "bad SMIMEA MatchingType", l}, ""
+ return &ParseError{"", "bad SMIMEA MatchingType", l}
}
rr.MatchingType = uint8(i)
// So this needs be e2 (i.e. different than e), because...??t
- s, e2, c1 := endingToString(c, "bad SMIMEA Certificate", f)
+ s, e2 := endingToString(c, "bad SMIMEA Certificate")
if e2 != nil {
- return nil, e2, c1
+ return e2
}
rr.Certificate = s
- return rr, nil, c1
+ return nil
}
-func setRFC3597(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(RFC3597)
- rr.Hdr = h
-
+func (rr *RFC3597) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
if l.token != "\\#" {
- return nil, &ParseError{f, "bad RFC3597 Rdata", l}, ""
+ return &ParseError{"", "bad RFC3597 Rdata", l}
}
c.Next() // zBlank
l, _ = c.Next()
rdlength, e := strconv.Atoi(l.token)
if e != nil || l.err {
- return nil, &ParseError{f, "bad RFC3597 Rdata ", l}, ""
+ return &ParseError{"", "bad RFC3597 Rdata ", l}
}
- s, e1, c1 := endingToString(c, "bad RFC3597 Rdata", f)
+ s, e1 := endingToString(c, "bad RFC3597 Rdata")
if e1 != nil {
- return nil, e1, c1
+ return e1
}
if rdlength*2 != len(s) {
- return nil, &ParseError{f, "bad RFC3597 Rdata", l}, ""
+ return &ParseError{"", "bad RFC3597 Rdata", l}
}
rr.Rdata = s
- return rr, nil, c1
+ return nil
}
-func setSPF(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(SPF)
- rr.Hdr = h
-
- s, e, c1 := endingToTxtSlice(c, "bad SPF Txt", f)
+func (rr *SPF) parse(c *zlexer, o string) *ParseError {
+ s, e := endingToTxtSlice(c, "bad SPF Txt")
if e != nil {
- return nil, e, ""
+ return e
}
rr.Txt = s
- return rr, nil, c1
+ return nil
}
-func setAVC(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(AVC)
- rr.Hdr = h
-
- s, e, c1 := endingToTxtSlice(c, "bad AVC Txt", f)
+func (rr *AVC) parse(c *zlexer, o string) *ParseError {
+ s, e := endingToTxtSlice(c, "bad AVC Txt")
if e != nil {
- return nil, e, ""
+ return e
}
rr.Txt = s
- return rr, nil, c1
+ return nil
}
-func setTXT(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(TXT)
- rr.Hdr = h
-
+func (rr *TXT) parse(c *zlexer, o string) *ParseError {
// no zBlank reading here, because all this rdata is TXT
- s, e, c1 := endingToTxtSlice(c, "bad TXT Txt", f)
+ s, e := endingToTxtSlice(c, "bad TXT Txt")
if e != nil {
- return nil, e, ""
+ return e
}
rr.Txt = s
- return rr, nil, c1
+ return nil
}
// identical to setTXT
-func setNINFO(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(NINFO)
- rr.Hdr = h
-
- s, e, c1 := endingToTxtSlice(c, "bad NINFO ZSData", f)
+func (rr *NINFO) parse(c *zlexer, o string) *ParseError {
+ s, e := endingToTxtSlice(c, "bad NINFO ZSData")
if e != nil {
- return nil, e, ""
+ return e
}
rr.ZSData = s
- return rr, nil, c1
+ return nil
}
-func setURI(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(URI)
- rr.Hdr = h
-
+func (rr *URI) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad URI Priority", l}, ""
+ return &ParseError{"", "bad URI Priority", l}
}
rr.Priority = uint16(i)
c.Next() // zBlank
l, _ = c.Next()
i, e = strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad URI Weight", l}, ""
+ return &ParseError{"", "bad URI Weight", l}
}
rr.Weight = uint16(i)
c.Next() // zBlank
- s, err, c1 := endingToTxtSlice(c, "bad URI Target", f)
+ s, err := endingToTxtSlice(c, "bad URI Target")
if err != nil {
- return nil, err, ""
+ return err
}
if len(s) != 1 {
- return nil, &ParseError{f, "bad URI Target", l}, ""
+ return &ParseError{"", "bad URI Target", l}
}
rr.Target = s[0]
- return rr, nil, c1
+ return nil
}
-func setDHCID(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
+func (rr *DHCID) parse(c *zlexer, o string) *ParseError {
// awesome record to parse!
- rr := new(DHCID)
- rr.Hdr = h
-
- s, e, c1 := endingToString(c, "bad DHCID Digest", f)
+ s, e := endingToString(c, "bad DHCID Digest")
if e != nil {
- return nil, e, c1
+ return e
}
rr.Digest = s
- return rr, nil, c1
+ return nil
}
-func setNID(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(NID)
- rr.Hdr = h
-
+func (rr *NID) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad NID Preference", l}, ""
+ return &ParseError{"", "bad NID Preference", l}
}
rr.Preference = uint16(i)
c.Next() // zBlank
l, _ = c.Next() // zString
u, err := stringToNodeID(l)
if err != nil || l.err {
- return nil, err, ""
+ return err
}
rr.NodeID = u
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setL32(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(L32)
- rr.Hdr = h
-
+func (rr *L32) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad L32 Preference", l}, ""
+ return &ParseError{"", "bad L32 Preference", l}
}
rr.Preference = uint16(i)
c.Next() // zBlank
l, _ = c.Next() // zString
rr.Locator32 = net.ParseIP(l.token)
if rr.Locator32 == nil || l.err {
- return nil, &ParseError{f, "bad L32 Locator", l}, ""
+ return &ParseError{"", "bad L32 Locator", l}
}
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setLP(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(LP)
- rr.Hdr = h
-
+func (rr *LP) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad LP Preference", l}, ""
+ return &ParseError{"", "bad LP Preference", l}
}
rr.Preference = uint16(i)
@@ -1944,98 +1543,67 @@ func setLP(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
rr.Fqdn = l.token
name, nameOk := toAbsoluteName(l.token, o)
if l.err || !nameOk {
- return nil, &ParseError{f, "bad LP Fqdn", l}, ""
+ return &ParseError{"", "bad LP Fqdn", l}
}
rr.Fqdn = name
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setL64(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(L64)
- rr.Hdr = h
-
+func (rr *L64) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad L64 Preference", l}, ""
+ return &ParseError{"", "bad L64 Preference", l}
}
rr.Preference = uint16(i)
c.Next() // zBlank
l, _ = c.Next() // zString
u, err := stringToNodeID(l)
if err != nil || l.err {
- return nil, err, ""
+ return err
}
rr.Locator64 = u
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setUID(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(UID)
- rr.Hdr = h
-
+func (rr *UID) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 32)
if e != nil || l.err {
- return nil, &ParseError{f, "bad UID Uid", l}, ""
+ return &ParseError{"", "bad UID Uid", l}
}
rr.Uid = uint32(i)
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setGID(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(GID)
- rr.Hdr = h
-
+func (rr *GID) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 32)
if e != nil || l.err {
- return nil, &ParseError{f, "bad GID Gid", l}, ""
+ return &ParseError{"", "bad GID Gid", l}
}
rr.Gid = uint32(i)
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setUINFO(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(UINFO)
- rr.Hdr = h
-
- s, e, c1 := endingToTxtSlice(c, "bad UINFO Uinfo", f)
+func (rr *UINFO) parse(c *zlexer, o string) *ParseError {
+ s, e := endingToTxtSlice(c, "bad UINFO Uinfo")
if e != nil {
- return nil, e, c1
+ return e
}
if ln := len(s); ln == 0 {
- return rr, nil, c1
+ return nil
}
rr.Uinfo = s[0] // silently discard anything after the first character-string
- return rr, nil, c1
+ return nil
}
-func setPX(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(PX)
- rr.Hdr = h
-
+func (rr *PX) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, ""
- }
-
i, e := strconv.ParseUint(l.token, 10, 16)
if e != nil || l.err {
- return nil, &ParseError{f, "bad PX Preference", l}, ""
+ return &ParseError{"", "bad PX Preference", l}
}
rr.Preference = uint16(i)
@@ -2044,7 +1612,7 @@ func setPX(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
rr.Map822 = l.token
map822, map822Ok := toAbsoluteName(l.token, o)
if l.err || !map822Ok {
- return nil, &ParseError{f, "bad PX Map822", l}, ""
+ return &ParseError{"", "bad PX Map822", l}
}
rr.Map822 = map822
@@ -2053,56 +1621,46 @@ func setPX(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
rr.Mapx400 = l.token
mapx400, mapx400Ok := toAbsoluteName(l.token, o)
if l.err || !mapx400Ok {
- return nil, &ParseError{f, "bad PX Mapx400", l}, ""
+ return &ParseError{"", "bad PX Mapx400", l}
}
rr.Mapx400 = mapx400
- return rr, nil, ""
+ return slurpRemainder(c)
}
-func setCAA(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(CAA)
- rr.Hdr = h
-
+func (rr *CAA) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
- if len(l.token) == 0 { // dynamic update rr.
- return rr, nil, l.comment
- }
-
i, err := strconv.ParseUint(l.token, 10, 8)
if err != nil || l.err {
- return nil, &ParseError{f, "bad CAA Flag", l}, ""
+ return &ParseError{"", "bad CAA Flag", l}
}
rr.Flag = uint8(i)
c.Next() // zBlank
l, _ = c.Next() // zString
if l.value != zString {
- return nil, &ParseError{f, "bad CAA Tag", l}, ""
+ return &ParseError{"", "bad CAA Tag", l}
}
rr.Tag = l.token
c.Next() // zBlank
- s, e, c1 := endingToTxtSlice(c, "bad CAA Value", f)
+ s, e := endingToTxtSlice(c, "bad CAA Value")
if e != nil {
- return nil, e, ""
+ return e
}
if len(s) != 1 {
- return nil, &ParseError{f, "bad CAA Value", l}, ""
+ return &ParseError{"", "bad CAA Value", l}
}
rr.Value = s[0]
- return rr, nil, c1
+ return nil
}
-func setTKEY(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
- rr := new(TKEY)
- rr.Hdr = h
-
+func (rr *TKEY) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
// Algorithm
if l.value != zString {
- return nil, &ParseError{f, "bad TKEY algorithm", l}, ""
+ return &ParseError{"", "bad TKEY algorithm", l}
}
rr.Algorithm = l.token
c.Next() // zBlank
@@ -2111,13 +1669,13 @@ func setTKEY(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
l, _ = c.Next()
i, err := strconv.ParseUint(l.token, 10, 8)
if err != nil || l.err {
- return nil, &ParseError{f, "bad TKEY key length", l}, ""
+ return &ParseError{"", "bad TKEY key length", l}
}
rr.KeySize = uint16(i)
c.Next() // zBlank
l, _ = c.Next()
if l.value != zString {
- return nil, &ParseError{f, "bad TKEY key", l}, ""
+ return &ParseError{"", "bad TKEY key", l}
}
rr.Key = l.token
c.Next() // zBlank
@@ -2126,84 +1684,15 @@ func setTKEY(h RR_Header, c *zlexer, o, f string) (RR, *ParseError, string) {
l, _ = c.Next()
i, err = strconv.ParseUint(l.token, 10, 8)
if err != nil || l.err {
- return nil, &ParseError{f, "bad TKEY otherdata length", l}, ""
+ return &ParseError{"", "bad TKEY otherdata length", l}
}
rr.OtherLen = uint16(i)
c.Next() // zBlank
l, _ = c.Next()
if l.value != zString {
- return nil, &ParseError{f, "bad TKEY otherday", l}, ""
+ return &ParseError{"", "bad TKEY otherday", l}
}
rr.OtherData = l.token
- return rr, nil, ""
-}
-
-var typeToparserFunc = map[uint16]parserFunc{
- TypeAAAA: {setAAAA, false},
- TypeAFSDB: {setAFSDB, false},
- TypeA: {setA, false},
- TypeCAA: {setCAA, true},
- TypeCDS: {setCDS, true},
- TypeCDNSKEY: {setCDNSKEY, true},
- TypeCERT: {setCERT, true},
- TypeCNAME: {setCNAME, false},
- TypeCSYNC: {setCSYNC, true},
- TypeDHCID: {setDHCID, true},
- TypeDLV: {setDLV, true},
- TypeDNAME: {setDNAME, false},
- TypeKEY: {setKEY, true},
- TypeDNSKEY: {setDNSKEY, true},
- TypeDS: {setDS, true},
- TypeEID: {setEID, true},
- TypeEUI48: {setEUI48, false},
- TypeEUI64: {setEUI64, false},
- TypeGID: {setGID, false},
- TypeGPOS: {setGPOS, false},
- TypeHINFO: {setHINFO, true},
- TypeHIP: {setHIP, true},
- TypeKX: {setKX, false},
- TypeL32: {setL32, false},
- TypeL64: {setL64, false},
- TypeLOC: {setLOC, true},
- TypeLP: {setLP, false},
- TypeMB: {setMB, false},
- TypeMD: {setMD, false},
- TypeMF: {setMF, false},
- TypeMG: {setMG, false},
- TypeMINFO: {setMINFO, false},
- TypeMR: {setMR, false},
- TypeMX: {setMX, false},
- TypeNAPTR: {setNAPTR, false},
- TypeNID: {setNID, false},
- TypeNIMLOC: {setNIMLOC, true},
- TypeNINFO: {setNINFO, true},
- TypeNSAPPTR: {setNSAPPTR, false},
- TypeNSEC3PARAM: {setNSEC3PARAM, false},
- TypeNSEC3: {setNSEC3, true},
- TypeNSEC: {setNSEC, true},
- TypeNS: {setNS, false},
- TypeOPENPGPKEY: {setOPENPGPKEY, true},
- TypePTR: {setPTR, false},
- TypePX: {setPX, false},
- TypeSIG: {setSIG, true},
- TypeRKEY: {setRKEY, true},
- TypeRP: {setRP, false},
- TypeRRSIG: {setRRSIG, true},
- TypeRT: {setRT, false},
- TypeSMIMEA: {setSMIMEA, true},
- TypeSOA: {setSOA, false},
- TypeSPF: {setSPF, true},
- TypeAVC: {setAVC, true},
- TypeSRV: {setSRV, false},
- TypeSSHFP: {setSSHFP, true},
- TypeTALINK: {setTALINK, false},
- TypeTA: {setTA, true},
- TypeTLSA: {setTLSA, true},
- TypeTXT: {setTXT, true},
- TypeUID: {setUID, false},
- TypeUINFO: {setUINFO, true},
- TypeURI: {setURI, true},
- TypeX25: {setX25, false},
- TypeTKEY: {setTKEY, true},
+ return nil
}
diff --git a/vendor/github.com/miekg/dns/serve_mux.go b/vendor/github.com/miekg/dns/serve_mux.go
index ae304db530..69deb33e80 100644
--- a/vendor/github.com/miekg/dns/serve_mux.go
+++ b/vendor/github.com/miekg/dns/serve_mux.go
@@ -36,33 +36,9 @@ func (mux *ServeMux) match(q string, t uint16) Handler {
return nil
}
+ q = strings.ToLower(q)
+
var handler Handler
-
- // TODO(tmthrgd): Once https://go-review.googlesource.com/c/go/+/137575
- // lands in a go release, replace the following with strings.ToLower.
- var sb strings.Builder
- for i := 0; i < len(q); i++ {
- c := q[i]
- if !(c >= 'A' && c <= 'Z') {
- continue
- }
-
- sb.Grow(len(q))
- sb.WriteString(q[:i])
-
- for ; i < len(q); i++ {
- c := q[i]
- if c >= 'A' && c <= 'Z' {
- c += 'a' - 'A'
- }
-
- sb.WriteByte(c)
- }
-
- q = sb.String()
- break
- }
-
for off, end := 0, false; !end; off, end = NextLabel(q, off) {
if h, ok := mux.z[q[off:]]; ok {
if t != TypeDS {
diff --git a/vendor/github.com/miekg/dns/server.go b/vendor/github.com/miekg/dns/server.go
index 4b4ec33c8d..3cf1a02401 100644
--- a/vendor/github.com/miekg/dns/server.go
+++ b/vendor/github.com/miekg/dns/server.go
@@ -3,7 +3,6 @@
package dns
import (
- "bytes"
"context"
"crypto/tls"
"encoding/binary"
@@ -12,26 +11,12 @@ import (
"net"
"strings"
"sync"
- "sync/atomic"
"time"
)
// Default maximum number of TCP queries before we close the socket.
const maxTCPQueries = 128
-// The maximum number of idle workers.
-//
-// This controls the maximum number of workers that are allowed to stay
-// idle waiting for incoming requests before being torn down.
-//
-// If this limit is reached, the server will just keep spawning new
-// workers (goroutines) for each incoming request. In this case, each
-// worker will only be used for a single request.
-const maxIdleWorkersCount = 10000
-
-// The maximum length of time a worker may idle for before being destroyed.
-const idleWorkerTimeout = 10 * time.Second
-
// aLongTimeAgo is a non-zero time, far in the past, used for
// immediate cancelation of network operations.
var aLongTimeAgo = time.Unix(1, 0)
@@ -81,7 +66,7 @@ type ConnectionStater interface {
}
type response struct {
- msg []byte
+ closed bool // connection has been closed
hijacked bool // connection has been hijacked by handler
tsigTimersOnly bool
tsigStatus error
@@ -91,7 +76,6 @@ type response struct {
tcp net.Conn // i/o connection if TCP was used
udpSession *SessionUDP // oob data to get egress interface right
writer Writer // writer to output the raw DNS bits
- wg *sync.WaitGroup // for gracefull shutdown
}
// HandleFailed returns a HandlerFunc that returns SERVFAIL for every request it gets.
@@ -161,11 +145,11 @@ type defaultReader struct {
*Server
}
-func (dr *defaultReader) ReadTCP(conn net.Conn, timeout time.Duration) ([]byte, error) {
+func (dr defaultReader) ReadTCP(conn net.Conn, timeout time.Duration) ([]byte, error) {
return dr.readTCP(conn, timeout)
}
-func (dr *defaultReader) ReadUDP(conn *net.UDPConn, timeout time.Duration) ([]byte, *SessionUDP, error) {
+func (dr defaultReader) ReadUDP(conn *net.UDPConn, timeout time.Duration) ([]byte, *SessionUDP, error) {
return dr.readUDP(conn, timeout)
}
@@ -202,9 +186,6 @@ type Server struct {
IdleTimeout func() time.Duration
// Secret(s) for Tsig map[]. The zonename must be in canonical form (lowercase, fqdn, see RFC 4034 Section 6.2).
TsigSecret map[string]string
- // Unsafe instructs the server to disregard any sanity checks and directly hand the message to
- // the handler. It will specifically not check if the query has the QR bit not set.
- Unsafe bool
// If NotifyStartedFunc is set it is called once the server has started listening.
NotifyStartedFunc func()
// DecorateReader is optional, allows customization of the process that reads raw DNS messages.
@@ -216,11 +197,9 @@ type Server struct {
// Whether to set the SO_REUSEPORT socket option, allowing multiple listeners to be bound to a single address.
// It is only supported on go1.11+ and when using ListenAndServe.
ReusePort bool
-
- // UDP packet or TCP connection queue
- queue chan *response
- // Workers count
- workersCount int32
+ // AcceptMsgFunc will check the incoming message and will reject it early in the process.
+ // By default DefaultMsgAcceptFunc will be used.
+ MsgAcceptFunc MsgAcceptFunc
// Shutdown handling
lock sync.RWMutex
@@ -239,51 +218,6 @@ func (srv *Server) isStarted() bool {
return started
}
-func (srv *Server) worker(w *response) {
- srv.serve(w)
-
- for {
- count := atomic.LoadInt32(&srv.workersCount)
- if count > maxIdleWorkersCount {
- return
- }
- if atomic.CompareAndSwapInt32(&srv.workersCount, count, count+1) {
- break
- }
- }
-
- defer atomic.AddInt32(&srv.workersCount, -1)
-
- inUse := false
- timeout := time.NewTimer(idleWorkerTimeout)
- defer timeout.Stop()
-LOOP:
- for {
- select {
- case w, ok := <-srv.queue:
- if !ok {
- break LOOP
- }
- inUse = true
- srv.serve(w)
- case <-timeout.C:
- if !inUse {
- break LOOP
- }
- inUse = false
- timeout.Reset(idleWorkerTimeout)
- }
- }
-}
-
-func (srv *Server) spawnWorker(w *response) {
- select {
- case srv.queue <- w:
- default:
- go srv.worker(w)
- }
-}
-
func makeUDPBuffer(size int) func() interface{} {
return func() interface{} {
return make([]byte, size)
@@ -291,14 +225,18 @@ func makeUDPBuffer(size int) func() interface{} {
}
func (srv *Server) init() {
- srv.queue = make(chan *response)
-
srv.shutdown = make(chan struct{})
srv.conns = make(map[net.Conn]struct{})
if srv.UDPSize == 0 {
srv.UDPSize = MinMsgSize
}
+ if srv.MsgAcceptFunc == nil {
+ srv.MsgAcceptFunc = DefaultMsgAcceptFunc
+ }
+ if srv.Handler == nil {
+ srv.Handler = DefaultServeMux
+ }
srv.udpPool.New = makeUDPBuffer(srv.UDPSize)
}
@@ -324,7 +262,6 @@ func (srv *Server) ListenAndServe() error {
}
srv.init()
- defer close(srv.queue)
switch srv.Net {
case "tcp", "tcp4", "tcp6":
@@ -379,7 +316,6 @@ func (srv *Server) ActivateAndServe() error {
}
srv.init()
- defer close(srv.queue)
pConn := srv.PacketConn
l := srv.Listener
@@ -459,11 +395,10 @@ var testShutdownNotify *sync.Cond
// getReadTimeout is a helper func to use system timeout if server did not intend to change it.
func (srv *Server) getReadTimeout() time.Duration {
- rtimeout := dnsTimeout
if srv.ReadTimeout != 0 {
- rtimeout = srv.ReadTimeout
+ return srv.ReadTimeout
}
- return rtimeout
+ return dnsTimeout
}
// serveTCP starts a TCP listener for the server.
@@ -496,11 +431,7 @@ func (srv *Server) serveTCP(l net.Listener) error {
srv.conns[rw] = struct{}{}
srv.lock.Unlock()
wg.Add(1)
- srv.spawnWorker(&response{
- tsigSecret: srv.TsigSecret,
- tcp: rw,
- wg: &wg,
- })
+ go srv.serveTCPConn(&wg, rw)
}
return nil
@@ -514,7 +445,7 @@ func (srv *Server) serveUDP(l *net.UDPConn) error {
srv.NotifyStartedFunc()
}
- reader := Reader(&defaultReader{srv})
+ reader := Reader(defaultReader{srv})
if srv.DecorateReader != nil {
reader = srv.DecorateReader(reader)
}
@@ -545,46 +476,22 @@ func (srv *Server) serveUDP(l *net.UDPConn) error {
continue
}
wg.Add(1)
- srv.spawnWorker(&response{
- msg: m,
- tsigSecret: srv.TsigSecret,
- udp: l,
- udpSession: s,
- wg: &wg,
- })
+ go srv.serveUDPPacket(&wg, m, l, s)
}
return nil
}
-func (srv *Server) serve(w *response) {
+// Serve a new TCP connection.
+func (srv *Server) serveTCPConn(wg *sync.WaitGroup, rw net.Conn) {
+ w := &response{tsigSecret: srv.TsigSecret, tcp: rw}
if srv.DecorateWriter != nil {
w.writer = srv.DecorateWriter(w)
} else {
w.writer = w
}
- if w.udp != nil {
- // serve UDP
- srv.serveDNS(w)
-
- w.wg.Done()
- return
- }
-
- defer func() {
- if !w.hijacked {
- w.Close()
- }
-
- srv.lock.Lock()
- delete(srv.conns, w.tcp)
- srv.lock.Unlock()
-
- w.wg.Done()
- }()
-
- reader := Reader(&defaultReader{srv})
+ reader := Reader(defaultReader{srv})
if srv.DecorateReader != nil {
reader = srv.DecorateReader(reader)
}
@@ -602,14 +509,13 @@ func (srv *Server) serve(w *response) {
}
for q := 0; (q < limit || limit == -1) && srv.isStarted(); q++ {
- var err error
- w.msg, err = reader.ReadTCP(w.tcp, timeout)
+ m, err := reader.ReadTCP(w.tcp, timeout)
if err != nil {
// TODO(tmthrgd): handle error
break
}
- srv.serveDNS(w)
- if w.tcp == nil {
+ srv.serveDNS(m, w)
+ if w.closed {
break // Close() was called
}
if w.hijacked {
@@ -619,25 +525,67 @@ func (srv *Server) serve(w *response) {
// idle timeout.
timeout = idleTimeout
}
-}
-func (srv *Server) disposeBuffer(w *response) {
- if w.udp != nil && cap(w.msg) == srv.UDPSize {
- srv.udpPool.Put(w.msg[:srv.UDPSize])
+ if !w.hijacked {
+ w.Close()
}
- w.msg = nil
+
+ srv.lock.Lock()
+ delete(srv.conns, w.tcp)
+ srv.lock.Unlock()
+
+ wg.Done()
}
-func (srv *Server) serveDNS(w *response) {
+// Serve a new UDP request.
+func (srv *Server) serveUDPPacket(wg *sync.WaitGroup, m []byte, u *net.UDPConn, s *SessionUDP) {
+ w := &response{tsigSecret: srv.TsigSecret, udp: u, udpSession: s}
+ if srv.DecorateWriter != nil {
+ w.writer = srv.DecorateWriter(w)
+ } else {
+ w.writer = w
+ }
+
+ srv.serveDNS(m, w)
+ wg.Done()
+}
+
+func (srv *Server) serveDNS(m []byte, w *response) {
+ dh, off, err := unpackMsgHdr(m, 0)
+ if err != nil {
+ // Let client hang, they are sending crap; any reply can be used to amplify.
+ return
+ }
+
req := new(Msg)
- err := req.Unpack(w.msg)
- if err != nil { // Send a FormatError back
- x := new(Msg)
- x.SetRcodeFormatError(req)
- w.WriteMsg(x)
- }
- if err != nil || !srv.Unsafe && req.Response {
- srv.disposeBuffer(w)
+ req.setHdr(dh)
+
+ switch action := srv.MsgAcceptFunc(dh); action {
+ case MsgAccept:
+ if req.unpack(dh, m, off) == nil {
+ break
+ }
+
+ fallthrough
+ case MsgReject, MsgRejectNotImplemented:
+ opcode := req.Opcode
+ req.SetRcodeFormatError(req)
+ req.Zero = false
+ if action == MsgRejectNotImplemented {
+ req.Opcode = opcode
+ req.Rcode = RcodeNotImplemented
+ }
+
+ // Are we allowed to delete any OPT records here?
+ req.Ns, req.Answer, req.Extra = nil, nil, nil
+
+ w.WriteMsg(req)
+ fallthrough
+ case MsgIgnore:
+ if w.udp != nil && cap(m) == srv.UDPSize {
+ srv.udpPool.Put(m[:srv.UDPSize])
+ }
+
return
}
@@ -645,7 +593,7 @@ func (srv *Server) serveDNS(w *response) {
if w.tsigSecret != nil {
if t := req.IsTsig(); t != nil {
if secret, ok := w.tsigSecret[t.Hdr.Name]; ok {
- w.tsigStatus = TsigVerify(w.msg, secret, "", false)
+ w.tsigStatus = TsigVerify(m, secret, "", false)
} else {
w.tsigStatus = ErrSecret
}
@@ -654,14 +602,11 @@ func (srv *Server) serveDNS(w *response) {
}
}
- srv.disposeBuffer(w)
-
- handler := srv.Handler
- if handler == nil {
- handler = DefaultServeMux
+ if w.udp != nil && cap(m) == srv.UDPSize {
+ srv.udpPool.Put(m[:srv.UDPSize])
}
- handler.ServeDNS(w, req) // Writes back to the client
+ srv.Handler.ServeDNS(w, req) // Writes back to the client
}
func (srv *Server) readTCP(conn net.Conn, timeout time.Duration) ([]byte, error) {
@@ -675,36 +620,16 @@ func (srv *Server) readTCP(conn net.Conn, timeout time.Duration) ([]byte, error)
}
srv.lock.RUnlock()
- l := make([]byte, 2)
- n, err := conn.Read(l)
- if err != nil || n != 2 {
- if err != nil {
- return nil, err
- }
- return nil, ErrShortRead
+ var length uint16
+ if err := binary.Read(conn, binary.BigEndian, &length); err != nil {
+ return nil, err
}
- length := binary.BigEndian.Uint16(l)
- if length == 0 {
- return nil, ErrShortRead
+
+ m := make([]byte, length)
+ if _, err := io.ReadFull(conn, m); err != nil {
+ return nil, err
}
- m := make([]byte, int(length))
- n, err = conn.Read(m[:int(length)])
- if err != nil || n == 0 {
- if err != nil {
- return nil, err
- }
- return nil, ErrShortRead
- }
- i := n
- for i < int(length) {
- j, err := conn.Read(m[i:int(length)])
- if err != nil {
- return nil, err
- }
- i += j
- }
- n = i
- m = m[:n]
+
return m, nil
}
@@ -728,6 +653,10 @@ func (srv *Server) readUDP(conn *net.UDPConn, timeout time.Duration) ([]byte, *S
// WriteMsg implements the ResponseWriter.WriteMsg method.
func (w *response) WriteMsg(m *Msg) (err error) {
+ if w.closed {
+ return &Error{err: "WriteMsg called after Close"}
+ }
+
var data []byte
if w.tsigSecret != nil { // if no secrets, dont check for the tsig (which is a longer check)
if t := m.IsTsig(); t != nil {
@@ -749,26 +678,25 @@ func (w *response) WriteMsg(m *Msg) (err error) {
// Write implements the ResponseWriter.Write method.
func (w *response) Write(m []byte) (int, error) {
+ if w.closed {
+ return 0, &Error{err: "Write called after Close"}
+ }
+
switch {
case w.udp != nil:
- n, err := WriteToSessionUDP(w.udp, m, w.udpSession)
- return n, err
+ return WriteToSessionUDP(w.udp, m, w.udpSession)
case w.tcp != nil:
- lm := len(m)
- if lm < 2 {
- return 0, io.ErrShortBuffer
- }
- if lm > MaxMsgSize {
+ if len(m) > MaxMsgSize {
return 0, &Error{err: "message too large"}
}
- l := make([]byte, 2, 2+lm)
- binary.BigEndian.PutUint16(l, uint16(lm))
- m = append(l, m...)
- n, err := io.Copy(w.tcp, bytes.NewReader(m))
+ l := make([]byte, 2)
+ binary.BigEndian.PutUint16(l, uint16(len(m)))
+
+ n, err := (&net.Buffers{l, m}).WriteTo(w.tcp)
return int(n), err
default:
- panic("dns: Write called after Close")
+ panic("dns: internal error: udp and tcp both nil")
}
}
@@ -780,7 +708,7 @@ func (w *response) LocalAddr() net.Addr {
case w.tcp != nil:
return w.tcp.LocalAddr()
default:
- panic("dns: LocalAddr called after Close")
+ panic("dns: internal error: udp and tcp both nil")
}
}
@@ -792,7 +720,7 @@ func (w *response) RemoteAddr() net.Addr {
case w.tcp != nil:
return w.tcp.RemoteAddr()
default:
- panic("dns: RemoteAddr called after Close")
+ panic("dns: internal error: udpSession and tcp both nil")
}
}
@@ -807,13 +735,20 @@ func (w *response) Hijack() { w.hijacked = true }
// Close implements the ResponseWriter.Close method
func (w *response) Close() error {
- // Can't close the udp conn, as that is actually the listener.
- if w.tcp != nil {
- e := w.tcp.Close()
- w.tcp = nil
- return e
+ if w.closed {
+ return &Error{err: "connection already closed"}
+ }
+ w.closed = true
+
+ switch {
+ case w.udp != nil:
+ // Can't close the udp conn, as that is actually the listener.
+ return nil
+ case w.tcp != nil:
+ return w.tcp.Close()
+ default:
+ panic("dns: internal error: udp and tcp both nil")
}
- return nil
}
// ConnectionState() implements the ConnectionStater.ConnectionState() interface.
diff --git a/vendor/github.com/miekg/dns/sig0.go b/vendor/github.com/miekg/dns/sig0.go
index 07c2acb196..55cf1c3863 100644
--- a/vendor/github.com/miekg/dns/sig0.go
+++ b/vendor/github.com/miekg/dns/sig0.go
@@ -21,15 +21,11 @@ func (rr *SIG) Sign(k crypto.Signer, m *Msg) ([]byte, error) {
if rr.KeyTag == 0 || len(rr.SignerName) == 0 || rr.Algorithm == 0 {
return nil, ErrKey
}
- rr.Header().Rrtype = TypeSIG
- rr.Header().Class = ClassANY
- rr.Header().Ttl = 0
- rr.Header().Name = "."
- rr.OrigTtl = 0
- rr.TypeCovered = 0
- rr.Labels = 0
- buf := make([]byte, m.Len()+rr.len())
+ rr.Hdr = RR_Header{Name: ".", Rrtype: TypeSIG, Class: ClassANY, Ttl: 0}
+ rr.OrigTtl, rr.TypeCovered, rr.Labels = 0, 0, 0
+
+ buf := make([]byte, m.Len()+Len(rr))
mbuf, err := m.PackBuffer(buf)
if err != nil {
return nil, err
@@ -107,7 +103,7 @@ func (rr *SIG) Verify(k *KEY, buf []byte) error {
anc := binary.BigEndian.Uint16(buf[6:])
auc := binary.BigEndian.Uint16(buf[8:])
adc := binary.BigEndian.Uint16(buf[10:])
- offset := 12
+ offset := headerSize
var err error
for i := uint16(0); i < qdc && offset < buflen; i++ {
_, offset, err = UnpackDomainName(buf, offset)
@@ -167,7 +163,7 @@ func (rr *SIG) Verify(k *KEY, buf []byte) error {
}
// If key has come from the DNS name compression might
// have mangled the case of the name
- if strings.ToLower(signername) != strings.ToLower(k.Header().Name) {
+ if !strings.EqualFold(signername, k.Header().Name) {
return &Error{err: "signer name doesn't match key name"}
}
sigend := offset
@@ -185,10 +181,8 @@ func (rr *SIG) Verify(k *KEY, buf []byte) error {
case DSA:
pk := k.publicKeyDSA()
sig = sig[1:]
- r := big.NewInt(0)
- r.SetBytes(sig[:len(sig)/2])
- s := big.NewInt(0)
- s.SetBytes(sig[len(sig)/2:])
+ r := new(big.Int).SetBytes(sig[:len(sig)/2])
+ s := new(big.Int).SetBytes(sig[len(sig)/2:])
if pk != nil {
if dsa.Verify(pk, hashed, r, s) {
return nil
@@ -202,10 +196,8 @@ func (rr *SIG) Verify(k *KEY, buf []byte) error {
}
case ECDSAP256SHA256, ECDSAP384SHA384:
pk := k.publicKeyECDSA()
- r := big.NewInt(0)
- r.SetBytes(sig[:len(sig)/2])
- s := big.NewInt(0)
- s.SetBytes(sig[len(sig)/2:])
+ r := new(big.Int).SetBytes(sig[:len(sig)/2])
+ s := new(big.Int).SetBytes(sig[len(sig)/2:])
if pk != nil {
if ecdsa.Verify(pk, hashed, r, s) {
return nil
diff --git a/vendor/github.com/miekg/dns/singleinflight.go b/vendor/github.com/miekg/dns/singleinflight.go
index 9573c7d0b8..febcc300fe 100644
--- a/vendor/github.com/miekg/dns/singleinflight.go
+++ b/vendor/github.com/miekg/dns/singleinflight.go
@@ -23,6 +23,8 @@ type call struct {
type singleflight struct {
sync.Mutex // protects m
m map[string]*call // lazily initialized
+
+ dontDeleteForTesting bool // this is only to be used by TestConcurrentExchanges
}
// Do executes and returns the results of the given function, making
@@ -49,9 +51,11 @@ func (g *singleflight) Do(key string, fn func() (*Msg, time.Duration, error)) (v
c.val, c.rtt, c.err = fn()
c.wg.Done()
- g.Lock()
- delete(g.m, key)
- g.Unlock()
+ if !g.dontDeleteForTesting {
+ g.Lock()
+ delete(g.m, key)
+ g.Unlock()
+ }
return c.val, c.rtt, c.err, c.dups > 0
}
diff --git a/vendor/github.com/miekg/dns/smimea.go b/vendor/github.com/miekg/dns/smimea.go
index 4e7ded4b38..89f09f0d10 100644
--- a/vendor/github.com/miekg/dns/smimea.go
+++ b/vendor/github.com/miekg/dns/smimea.go
@@ -14,10 +14,7 @@ func (r *SMIMEA) Sign(usage, selector, matchingType int, cert *x509.Certificate)
r.MatchingType = uint8(matchingType)
r.Certificate, err = CertificateToDANE(r.Selector, r.MatchingType, cert)
- if err != nil {
- return err
- }
- return nil
+ return err
}
// Verify verifies a SMIMEA record against an SSL certificate. If it is OK
diff --git a/vendor/github.com/miekg/dns/tlsa.go b/vendor/github.com/miekg/dns/tlsa.go
index 431e2fb5af..4e07983b97 100644
--- a/vendor/github.com/miekg/dns/tlsa.go
+++ b/vendor/github.com/miekg/dns/tlsa.go
@@ -14,10 +14,7 @@ func (r *TLSA) Sign(usage, selector, matchingType int, cert *x509.Certificate) (
r.MatchingType = uint8(matchingType)
r.Certificate, err = CertificateToDANE(r.Selector, r.MatchingType, cert)
- if err != nil {
- return err
- }
- return nil
+ return err
}
// Verify verifies a TLSA record against an SSL certificate. If it is OK
diff --git a/vendor/github.com/miekg/dns/tsig.go b/vendor/github.com/miekg/dns/tsig.go
index 4837b4ab1f..2c4ef03bac 100644
--- a/vendor/github.com/miekg/dns/tsig.go
+++ b/vendor/github.com/miekg/dns/tsig.go
@@ -54,6 +54,10 @@ func (rr *TSIG) String() string {
return s
}
+func (rr *TSIG) parse(c *zlexer, origin string) *ParseError {
+ panic("dns: internal error: parse should never be called on TSIG")
+}
+
// The following values must be put in wireformat, so that the MAC can be calculated.
// RFC 2845, section 3.4.2. TSIG Variables.
type tsigWireFmt struct {
@@ -113,13 +117,13 @@ func TsigGenerate(m *Msg, secret, requestMAC string, timersOnly bool) ([]byte, s
var h hash.Hash
switch strings.ToLower(rr.Algorithm) {
case HmacMD5:
- h = hmac.New(md5.New, []byte(rawsecret))
+ h = hmac.New(md5.New, rawsecret)
case HmacSHA1:
- h = hmac.New(sha1.New, []byte(rawsecret))
+ h = hmac.New(sha1.New, rawsecret)
case HmacSHA256:
- h = hmac.New(sha256.New, []byte(rawsecret))
+ h = hmac.New(sha256.New, rawsecret)
case HmacSHA512:
- h = hmac.New(sha512.New, []byte(rawsecret))
+ h = hmac.New(sha512.New, rawsecret)
default:
return nil, "", ErrKeyAlg
}
@@ -133,13 +137,12 @@ func TsigGenerate(m *Msg, secret, requestMAC string, timersOnly bool) ([]byte, s
t.Algorithm = rr.Algorithm
t.OrigId = m.Id
- tbuf := make([]byte, t.len())
- if off, err := PackRR(t, tbuf, 0, nil, false); err == nil {
- tbuf = tbuf[:off] // reset to actual size used
- } else {
+ tbuf := make([]byte, Len(t))
+ off, err := PackRR(t, tbuf, 0, nil, false)
+ if err != nil {
return nil, "", err
}
- mbuf = append(mbuf, tbuf...)
+ mbuf = append(mbuf, tbuf[:off]...)
// Update the ArCount directly in the buffer.
binary.BigEndian.PutUint16(mbuf[10:], uint16(len(m.Extra)+1))
diff --git a/vendor/github.com/miekg/dns/types.go b/vendor/github.com/miekg/dns/types.go
index 115f2c7bd0..95fce25df7 100644
--- a/vendor/github.com/miekg/dns/types.go
+++ b/vendor/github.com/miekg/dns/types.go
@@ -205,9 +205,6 @@ var CertTypeToString = map[uint16]string{
CertOID: "OID",
}
-// StringToCertType is the reverseof CertTypeToString.
-var StringToCertType = reverseInt16(CertTypeToString)
-
//go:generate go run types_generate.go
// Question holds a DNS question. There can be multiple questions in the
@@ -218,8 +215,10 @@ type Question struct {
Qclass uint16
}
-func (q *Question) len() int {
- return len(q.Name) + 1 + 2 + 2
+func (q *Question) len(off int, compression map[string]struct{}) int {
+ l := domainNameLen(q.Name, off, compression, true)
+ l += 2 + 2
+ return l
}
func (q *Question) String() (s string) {
@@ -239,6 +238,25 @@ type ANY struct {
func (rr *ANY) String() string { return rr.Hdr.String() }
+func (rr *ANY) parse(c *zlexer, origin string) *ParseError {
+ panic("dns: internal error: parse should never be called on ANY")
+}
+
+// NULL RR. See RFC 1035.
+type NULL struct {
+ Hdr RR_Header
+ Data string `dns:"any"`
+}
+
+func (rr *NULL) String() string {
+ // There is no presentation format; prefix string with a comment.
+ return ";" + rr.Hdr.String() + rr.Data
+}
+
+func (rr *NULL) parse(c *zlexer, origin string) *ParseError {
+ panic("dns: internal error: parse should never be called on NULL")
+}
+
// CNAME RR. See RFC 1034.
type CNAME struct {
Hdr RR_Header
@@ -351,7 +369,7 @@ func (rr *X25) String() string {
type RT struct {
Hdr RR_Header
Preference uint16
- Host string `dns:"cdomain-name"`
+ Host string `dns:"domain-name"` // RFC 3597 prohibits compressing records not defined in RFC 1035.
}
func (rr *RT) String() string {
@@ -386,7 +404,7 @@ type RP struct {
}
func (rr *RP) String() string {
- return rr.Hdr.String() + rr.Mbox + " " + sprintTxt([]string{rr.Txt})
+ return rr.Hdr.String() + sprintName(rr.Mbox) + " " + sprintName(rr.Txt)
}
// SOA RR. See RFC 1035.
@@ -420,25 +438,54 @@ func (rr *TXT) String() string { return rr.Hdr.String() + sprintTxt(rr.Txt) }
func sprintName(s string) string {
var dst strings.Builder
- dst.Grow(len(s))
+
for i := 0; i < len(s); {
if i+1 < len(s) && s[i] == '\\' && s[i+1] == '.' {
- dst.WriteString(s[i : i+2])
+ if dst.Len() != 0 {
+ dst.WriteString(s[i : i+2])
+ }
i += 2
continue
}
b, n := nextByte(s, i)
- switch {
- case n == 0:
- i++ // dangling back slash
- case b == '.':
- dst.WriteByte('.')
+ if n == 0 {
+ i++
+ continue
+ }
+ if b == '.' {
+ if dst.Len() != 0 {
+ dst.WriteByte('.')
+ }
+ i += n
+ continue
+ }
+ switch b {
+ case ' ', '\'', '@', ';', '(', ')', '"', '\\': // additional chars to escape
+ if dst.Len() == 0 {
+ dst.Grow(len(s) * 2)
+ dst.WriteString(s[:i])
+ }
+ dst.WriteByte('\\')
+ dst.WriteByte(b)
default:
- writeDomainNameByte(&dst, b)
+ if ' ' <= b && b <= '~' {
+ if dst.Len() != 0 {
+ dst.WriteByte(b)
+ }
+ } else {
+ if dst.Len() == 0 {
+ dst.Grow(len(s) * 2)
+ dst.WriteString(s[:i])
+ }
+ dst.WriteString(escapeByte(b))
+ }
}
i += n
}
+ if dst.Len() == 0 {
+ return s
+ }
return dst.String()
}
@@ -460,7 +507,7 @@ func sprintTxtOctet(s string) string {
case b == '.':
dst.WriteByte('.')
case b < ' ' || b > '~':
- writeEscapedByte(&dst, b)
+ dst.WriteString(escapeByte(b))
default:
dst.WriteByte(b)
}
@@ -492,36 +539,50 @@ func sprintTxt(txt []string) string {
return out.String()
}
-func writeDomainNameByte(s *strings.Builder, b byte) {
- switch b {
- case '.', ' ', '\'', '@', ';', '(', ')': // additional chars to escape
- s.WriteByte('\\')
- s.WriteByte(b)
- default:
- writeTXTStringByte(s, b)
- }
-}
-
func writeTXTStringByte(s *strings.Builder, b byte) {
switch {
case b == '"' || b == '\\':
s.WriteByte('\\')
s.WriteByte(b)
case b < ' ' || b > '~':
- writeEscapedByte(s, b)
+ s.WriteString(escapeByte(b))
default:
s.WriteByte(b)
}
}
-func writeEscapedByte(s *strings.Builder, b byte) {
- var buf [3]byte
- bufs := strconv.AppendInt(buf[:0], int64(b), 10)
- s.WriteByte('\\')
- for i := len(bufs); i < 3; i++ {
- s.WriteByte('0')
+const (
+ escapedByteSmall = "" +
+ `\000\001\002\003\004\005\006\007\008\009` +
+ `\010\011\012\013\014\015\016\017\018\019` +
+ `\020\021\022\023\024\025\026\027\028\029` +
+ `\030\031`
+ escapedByteLarge = `\127\128\129` +
+ `\130\131\132\133\134\135\136\137\138\139` +
+ `\140\141\142\143\144\145\146\147\148\149` +
+ `\150\151\152\153\154\155\156\157\158\159` +
+ `\160\161\162\163\164\165\166\167\168\169` +
+ `\170\171\172\173\174\175\176\177\178\179` +
+ `\180\181\182\183\184\185\186\187\188\189` +
+ `\190\191\192\193\194\195\196\197\198\199` +
+ `\200\201\202\203\204\205\206\207\208\209` +
+ `\210\211\212\213\214\215\216\217\218\219` +
+ `\220\221\222\223\224\225\226\227\228\229` +
+ `\230\231\232\233\234\235\236\237\238\239` +
+ `\240\241\242\243\244\245\246\247\248\249` +
+ `\250\251\252\253\254\255`
+)
+
+// escapeByte returns the \DDD escaping of b which must
+// satisfy b < ' ' || b > '~'.
+func escapeByte(b byte) string {
+ if b < ' ' {
+ return escapedByteSmall[b*4 : b*4+4]
}
- s.Write(bufs)
+
+ b -= '~' + 1
+ // The cast here is needed as b*4 may overflow byte.
+ return escapedByteLarge[int(b)*4 : int(b)*4+4]
}
func nextByte(s string, offset int) (byte, int) {
@@ -803,22 +864,16 @@ type NSEC struct {
func (rr *NSEC) String() string {
s := rr.Hdr.String() + sprintName(rr.NextDomain)
- for i := 0; i < len(rr.TypeBitMap); i++ {
- s += " " + Type(rr.TypeBitMap[i]).String()
+ for _, t := range rr.TypeBitMap {
+ s += " " + Type(t).String()
}
return s
}
-func (rr *NSEC) len() int {
- l := rr.Hdr.len() + len(rr.NextDomain) + 1
- lastwindow := uint32(2 ^ 32 + 1)
- for _, t := range rr.TypeBitMap {
- window := t / 256
- if uint32(window) != lastwindow {
- l += 1 + 32
- }
- lastwindow = uint32(window)
- }
+func (rr *NSEC) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.NextDomain, off+l, compression, false)
+ l += typeBitMapLen(rr.TypeBitMap)
return l
}
@@ -968,22 +1023,16 @@ func (rr *NSEC3) String() string {
" " + strconv.Itoa(int(rr.Iterations)) +
" " + saltToString(rr.Salt) +
" " + rr.NextDomain
- for i := 0; i < len(rr.TypeBitMap); i++ {
- s += " " + Type(rr.TypeBitMap[i]).String()
+ for _, t := range rr.TypeBitMap {
+ s += " " + Type(t).String()
}
return s
}
-func (rr *NSEC3) len() int {
- l := rr.Hdr.len() + 6 + len(rr.Salt)/2 + 1 + len(rr.NextDomain) + 1
- lastwindow := uint32(2 ^ 32 + 1)
- for _, t := range rr.TypeBitMap {
- window := t / 256
- if uint32(window) != lastwindow {
- l += 1 + 32
- }
- lastwindow = uint32(window)
- }
+func (rr *NSEC3) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += 6 + len(rr.Salt)/2 + 1 + len(rr.NextDomain) + 1
+ l += typeBitMapLen(rr.TypeBitMap)
return l
}
@@ -1022,10 +1071,16 @@ type TKEY struct {
// TKEY has no official presentation format, but this will suffice.
func (rr *TKEY) String() string {
- s := "\n;; TKEY PSEUDOSECTION:\n"
- s += rr.Hdr.String() + " " + rr.Algorithm + " " +
- strconv.Itoa(int(rr.KeySize)) + " " + rr.Key + " " +
- strconv.Itoa(int(rr.OtherLen)) + " " + rr.OtherData
+ s := ";" + rr.Hdr.String() +
+ " " + rr.Algorithm +
+ " " + TimeToString(rr.Inception) +
+ " " + TimeToString(rr.Expiration) +
+ " " + strconv.Itoa(int(rr.Mode)) +
+ " " + strconv.Itoa(int(rr.Error)) +
+ " " + strconv.Itoa(int(rr.KeySize)) +
+ " " + rr.Key +
+ " " + strconv.Itoa(int(rr.OtherLen)) +
+ " " + rr.OtherData
return s
}
@@ -1285,22 +1340,16 @@ type CSYNC struct {
func (rr *CSYNC) String() string {
s := rr.Hdr.String() + strconv.FormatInt(int64(rr.Serial), 10) + " " + strconv.Itoa(int(rr.Flags))
- for i := 0; i < len(rr.TypeBitMap); i++ {
- s += " " + Type(rr.TypeBitMap[i]).String()
+ for _, t := range rr.TypeBitMap {
+ s += " " + Type(t).String()
}
return s
}
-func (rr *CSYNC) len() int {
- l := rr.Hdr.len() + 4 + 2
- lastwindow := uint32(2 ^ 32 + 1)
- for _, t := range rr.TypeBitMap {
- window := t / 256
- if uint32(window) != lastwindow {
- l += 1 + 32
- }
- lastwindow = uint32(window)
- }
+func (rr *CSYNC) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += 4 + 2
+ l += typeBitMapLen(rr.TypeBitMap)
return l
}
diff --git a/vendor/github.com/miekg/dns/types_generate.go b/vendor/github.com/miekg/dns/types_generate.go
index b8db4f361c..8cda2a74c5 100644
--- a/vendor/github.com/miekg/dns/types_generate.go
+++ b/vendor/github.com/miekg/dns/types_generate.go
@@ -153,8 +153,8 @@ func main() {
if isEmbedded {
continue
}
- fmt.Fprintf(b, "func (rr *%s) len() int {\n", name)
- fmt.Fprintf(b, "l := rr.Hdr.len()\n")
+ fmt.Fprintf(b, "func (rr *%s) len(off int, compression map[string]struct{}) int {\n", name)
+ fmt.Fprintf(b, "l := rr.Hdr.len(off, compression)\n")
for i := 1; i < st.NumFields(); i++ {
o := func(s string) { fmt.Fprintf(b, s, st.Field(i).Name()) }
@@ -162,7 +162,11 @@ func main() {
switch st.Tag(i) {
case `dns:"-"`:
// ignored
- case `dns:"cdomain-name"`, `dns:"domain-name"`, `dns:"txt"`:
+ case `dns:"cdomain-name"`:
+ o("for _, x := range rr.%s { l += domainNameLen(x, off+l, compression, true) }\n")
+ case `dns:"domain-name"`:
+ o("for _, x := range rr.%s { l += domainNameLen(x, off+l, compression, false) }\n")
+ case `dns:"txt"`:
o("for _, x := range rr.%s { l += len(x) + 1 }\n")
default:
log.Fatalln(name, st.Field(i).Name(), st.Tag(i))
@@ -173,8 +177,10 @@ func main() {
switch {
case st.Tag(i) == `dns:"-"`:
// ignored
- case st.Tag(i) == `dns:"cdomain-name"`, st.Tag(i) == `dns:"domain-name"`:
- o("l += len(rr.%s) + 1\n")
+ case st.Tag(i) == `dns:"cdomain-name"`:
+ o("l += domainNameLen(rr.%s, off+l, compression, true)\n")
+ case st.Tag(i) == `dns:"domain-name"`:
+ o("l += domainNameLen(rr.%s, off+l, compression, false)\n")
case st.Tag(i) == `dns:"octet"`:
o("l += len(rr.%s)\n")
case strings.HasPrefix(st.Tag(i), `dns:"size-base64`):
@@ -183,14 +189,14 @@ func main() {
o("l += base64.StdEncoding.DecodedLen(len(rr.%s))\n")
case strings.HasPrefix(st.Tag(i), `dns:"size-hex:`): // this has an extra field where the length is stored
o("l += len(rr.%s)/2\n")
- case strings.HasPrefix(st.Tag(i), `dns:"size-hex`):
- fallthrough
case st.Tag(i) == `dns:"hex"`:
- o("l += len(rr.%s)/2 + 1\n")
+ o("l += len(rr.%s)/2\n")
+ case st.Tag(i) == `dns:"any"`:
+ o("l += len(rr.%s)\n")
case st.Tag(i) == `dns:"a"`:
- o("l += net.IPv4len // %s\n")
+ o("if len(rr.%s) != 0 { l += net.IPv4len }\n")
case st.Tag(i) == `dns:"aaaa"`:
- o("l += net.IPv6len // %s\n")
+ o("if len(rr.%s) != 0 { l += net.IPv6len }\n")
case st.Tag(i) == `dns:"txt"`:
o("for _, t := range rr.%s { l += len(t) + 1 }\n")
case st.Tag(i) == `dns:"uint48"`:
@@ -236,6 +242,13 @@ func main() {
splits := strings.Split(t, ".")
t = splits[len(splits)-1]
}
+ // For the EDNS0 interface (used in the OPT RR), we need to call the copy method on each element.
+ if t == "EDNS0" {
+ fmt.Fprintf(b, "%s := make([]%s, len(rr.%s));\nfor i,e := range rr.%s {\n %s[i] = e.copy()\n}\n",
+ f, t, f, f, f)
+ fields = append(fields, f)
+ continue
+ }
fmt.Fprintf(b, "%s := make([]%s, len(rr.%s)); copy(%s, rr.%s)\n",
f, t, f, f, f)
fields = append(fields, f)
diff --git a/vendor/github.com/miekg/dns/udp_windows.go b/vendor/github.com/miekg/dns/udp_windows.go
index 6778c3c6cf..e7dd8ca313 100644
--- a/vendor/github.com/miekg/dns/udp_windows.go
+++ b/vendor/github.com/miekg/dns/udp_windows.go
@@ -20,15 +20,13 @@ func ReadFromSessionUDP(conn *net.UDPConn, b []byte) (int, *SessionUDP, error) {
if err != nil {
return n, nil, err
}
- session := &SessionUDP{raddr.(*net.UDPAddr)}
- return n, session, err
+ return n, &SessionUDP{raddr.(*net.UDPAddr)}, err
}
// WriteToSessionUDP acts just like net.UDPConn.WriteTo(), but uses a *SessionUDP instead of a net.Addr.
// TODO(fastest963): Once go1.10 is released, use WriteMsgUDP.
func WriteToSessionUDP(conn *net.UDPConn, b []byte, session *SessionUDP) (int, error) {
- n, err := conn.WriteTo(b, session.raddr)
- return n, err
+ return conn.WriteTo(b, session.raddr)
}
// TODO(fastest963): Once go1.10 is released and we can use *MsgUDP methods
diff --git a/vendor/github.com/miekg/dns/update.go b/vendor/github.com/miekg/dns/update.go
index e90c5c968e..69dd386522 100644
--- a/vendor/github.com/miekg/dns/update.go
+++ b/vendor/github.com/miekg/dns/update.go
@@ -44,7 +44,8 @@ func (u *Msg) RRsetUsed(rr []RR) {
u.Answer = make([]RR, 0, len(rr))
}
for _, r := range rr {
- u.Answer = append(u.Answer, &ANY{Hdr: RR_Header{Name: r.Header().Name, Ttl: 0, Rrtype: r.Header().Rrtype, Class: ClassANY}})
+ h := r.Header()
+ u.Answer = append(u.Answer, &ANY{Hdr: RR_Header{Name: h.Name, Ttl: 0, Rrtype: h.Rrtype, Class: ClassANY}})
}
}
@@ -55,7 +56,8 @@ func (u *Msg) RRsetNotUsed(rr []RR) {
u.Answer = make([]RR, 0, len(rr))
}
for _, r := range rr {
- u.Answer = append(u.Answer, &ANY{Hdr: RR_Header{Name: r.Header().Name, Ttl: 0, Rrtype: r.Header().Rrtype, Class: ClassNONE}})
+ h := r.Header()
+ u.Answer = append(u.Answer, &ANY{Hdr: RR_Header{Name: h.Name, Ttl: 0, Rrtype: h.Rrtype, Class: ClassNONE}})
}
}
@@ -79,7 +81,8 @@ func (u *Msg) RemoveRRset(rr []RR) {
u.Ns = make([]RR, 0, len(rr))
}
for _, r := range rr {
- u.Ns = append(u.Ns, &ANY{Hdr: RR_Header{Name: r.Header().Name, Ttl: 0, Rrtype: r.Header().Rrtype, Class: ClassANY}})
+ h := r.Header()
+ u.Ns = append(u.Ns, &ANY{Hdr: RR_Header{Name: h.Name, Ttl: 0, Rrtype: h.Rrtype, Class: ClassANY}})
}
}
@@ -99,8 +102,9 @@ func (u *Msg) Remove(rr []RR) {
u.Ns = make([]RR, 0, len(rr))
}
for _, r := range rr {
- r.Header().Class = ClassNONE
- r.Header().Ttl = 0
+ h := r.Header()
+ h.Class = ClassNONE
+ h.Ttl = 0
u.Ns = append(u.Ns, r)
}
}
diff --git a/vendor/github.com/miekg/dns/version.go b/vendor/github.com/miekg/dns/version.go
index 0b0e9b6d83..0a833dc93b 100644
--- a/vendor/github.com/miekg/dns/version.go
+++ b/vendor/github.com/miekg/dns/version.go
@@ -3,7 +3,7 @@ package dns
import "fmt"
// Version is current version of this library.
-var Version = V{1, 0, 14}
+var Version = V{1, 1, 22}
// V holds the version of this library.
type V struct {
diff --git a/vendor/github.com/miekg/dns/xfr.go b/vendor/github.com/miekg/dns/xfr.go
index 5d0ff5c8a2..bb4ca3d879 100644
--- a/vendor/github.com/miekg/dns/xfr.go
+++ b/vendor/github.com/miekg/dns/xfr.go
@@ -35,30 +35,36 @@ type Transfer struct {
// channel, err := transfer.In(message, master)
//
func (t *Transfer) In(q *Msg, a string) (env chan *Envelope, err error) {
+ switch q.Question[0].Qtype {
+ case TypeAXFR, TypeIXFR:
+ default:
+ return nil, &Error{"unsupported question type"}
+ }
+
timeout := dnsTimeout
if t.DialTimeout != 0 {
timeout = t.DialTimeout
}
+
if t.Conn == nil {
t.Conn, err = DialTimeout("tcp", a, timeout)
if err != nil {
return nil, err
}
}
+
if err := t.WriteMsg(q); err != nil {
return nil, err
}
+
env = make(chan *Envelope)
- go func() {
- if q.Question[0].Qtype == TypeAXFR {
- go t.inAxfr(q, env)
- return
- }
- if q.Question[0].Qtype == TypeIXFR {
- go t.inIxfr(q, env)
- return
- }
- }()
+ switch q.Question[0].Qtype {
+ case TypeAXFR:
+ go t.inAxfr(q, env)
+ case TypeIXFR:
+ go t.inIxfr(q, env)
+ }
+
return env, nil
}
@@ -111,7 +117,7 @@ func (t *Transfer) inAxfr(q *Msg, c chan *Envelope) {
}
func (t *Transfer) inIxfr(q *Msg, c chan *Envelope) {
- serial := uint32(0) // The first serial seen is the current server serial
+ var serial uint32 // The first serial seen is the current server serial
axfr := true
n := 0
qser := q.Ns[0].(*SOA).Serial
@@ -192,11 +198,14 @@ func (t *Transfer) Out(w ResponseWriter, q *Msg, ch chan *Envelope) error {
r.Authoritative = true
// assume it fits TODO(miek): fix
r.Answer = append(r.Answer, x.RR...)
+ if tsig := q.IsTsig(); tsig != nil && w.TsigStatus() == nil {
+ r.SetTsig(tsig.Hdr.Name, tsig.Algorithm, tsig.Fudge, time.Now().Unix())
+ }
if err := w.WriteMsg(r); err != nil {
return err
}
+ w.TsigTimersOnly(true)
}
- w.TsigTimersOnly(true)
return nil
}
@@ -237,24 +246,18 @@ func (t *Transfer) WriteMsg(m *Msg) (err error) {
if err != nil {
return err
}
- if _, err = t.Write(out); err != nil {
- return err
- }
- return nil
+ _, err = t.Write(out)
+ return err
}
func isSOAFirst(in *Msg) bool {
- if len(in.Answer) > 0 {
- return in.Answer[0].Header().Rrtype == TypeSOA
- }
- return false
+ return len(in.Answer) > 0 &&
+ in.Answer[0].Header().Rrtype == TypeSOA
}
func isSOALast(in *Msg) bool {
- if len(in.Answer) > 0 {
- return in.Answer[len(in.Answer)-1].Header().Rrtype == TypeSOA
- }
- return false
+ return len(in.Answer) > 0 &&
+ in.Answer[len(in.Answer)-1].Header().Rrtype == TypeSOA
}
const errXFR = "bad xfr rcode: %d"
diff --git a/vendor/github.com/miekg/dns/zcompress.go b/vendor/github.com/miekg/dns/zcompress.go
deleted file mode 100644
index 6391a3501f..0000000000
--- a/vendor/github.com/miekg/dns/zcompress.go
+++ /dev/null
@@ -1,152 +0,0 @@
-// Code generated by "go run compress_generate.go"; DO NOT EDIT.
-
-package dns
-
-func compressionLenHelperType(c map[string]int, r RR, initLen int) int {
- currentLen := initLen
- switch x := r.(type) {
- case *AFSDB:
- currentLen -= len(x.Hostname) + 1
- currentLen += compressionLenHelper(c, x.Hostname, currentLen)
- case *CNAME:
- currentLen -= len(x.Target) + 1
- currentLen += compressionLenHelper(c, x.Target, currentLen)
- case *DNAME:
- currentLen -= len(x.Target) + 1
- currentLen += compressionLenHelper(c, x.Target, currentLen)
- case *HIP:
- for i := range x.RendezvousServers {
- currentLen -= len(x.RendezvousServers[i]) + 1
- }
- for i := range x.RendezvousServers {
- currentLen += compressionLenHelper(c, x.RendezvousServers[i], currentLen)
- }
- case *KX:
- currentLen -= len(x.Exchanger) + 1
- currentLen += compressionLenHelper(c, x.Exchanger, currentLen)
- case *LP:
- currentLen -= len(x.Fqdn) + 1
- currentLen += compressionLenHelper(c, x.Fqdn, currentLen)
- case *MB:
- currentLen -= len(x.Mb) + 1
- currentLen += compressionLenHelper(c, x.Mb, currentLen)
- case *MD:
- currentLen -= len(x.Md) + 1
- currentLen += compressionLenHelper(c, x.Md, currentLen)
- case *MF:
- currentLen -= len(x.Mf) + 1
- currentLen += compressionLenHelper(c, x.Mf, currentLen)
- case *MG:
- currentLen -= len(x.Mg) + 1
- currentLen += compressionLenHelper(c, x.Mg, currentLen)
- case *MINFO:
- currentLen -= len(x.Rmail) + 1
- currentLen += compressionLenHelper(c, x.Rmail, currentLen)
- currentLen -= len(x.Email) + 1
- currentLen += compressionLenHelper(c, x.Email, currentLen)
- case *MR:
- currentLen -= len(x.Mr) + 1
- currentLen += compressionLenHelper(c, x.Mr, currentLen)
- case *MX:
- currentLen -= len(x.Mx) + 1
- currentLen += compressionLenHelper(c, x.Mx, currentLen)
- case *NAPTR:
- currentLen -= len(x.Replacement) + 1
- currentLen += compressionLenHelper(c, x.Replacement, currentLen)
- case *NS:
- currentLen -= len(x.Ns) + 1
- currentLen += compressionLenHelper(c, x.Ns, currentLen)
- case *NSAPPTR:
- currentLen -= len(x.Ptr) + 1
- currentLen += compressionLenHelper(c, x.Ptr, currentLen)
- case *NSEC:
- currentLen -= len(x.NextDomain) + 1
- currentLen += compressionLenHelper(c, x.NextDomain, currentLen)
- case *PTR:
- currentLen -= len(x.Ptr) + 1
- currentLen += compressionLenHelper(c, x.Ptr, currentLen)
- case *PX:
- currentLen -= len(x.Map822) + 1
- currentLen += compressionLenHelper(c, x.Map822, currentLen)
- currentLen -= len(x.Mapx400) + 1
- currentLen += compressionLenHelper(c, x.Mapx400, currentLen)
- case *RP:
- currentLen -= len(x.Mbox) + 1
- currentLen += compressionLenHelper(c, x.Mbox, currentLen)
- currentLen -= len(x.Txt) + 1
- currentLen += compressionLenHelper(c, x.Txt, currentLen)
- case *RRSIG:
- currentLen -= len(x.SignerName) + 1
- currentLen += compressionLenHelper(c, x.SignerName, currentLen)
- case *RT:
- currentLen -= len(x.Host) + 1
- currentLen += compressionLenHelper(c, x.Host, currentLen)
- case *SIG:
- currentLen -= len(x.SignerName) + 1
- currentLen += compressionLenHelper(c, x.SignerName, currentLen)
- case *SOA:
- currentLen -= len(x.Ns) + 1
- currentLen += compressionLenHelper(c, x.Ns, currentLen)
- currentLen -= len(x.Mbox) + 1
- currentLen += compressionLenHelper(c, x.Mbox, currentLen)
- case *SRV:
- currentLen -= len(x.Target) + 1
- currentLen += compressionLenHelper(c, x.Target, currentLen)
- case *TALINK:
- currentLen -= len(x.PreviousName) + 1
- currentLen += compressionLenHelper(c, x.PreviousName, currentLen)
- currentLen -= len(x.NextName) + 1
- currentLen += compressionLenHelper(c, x.NextName, currentLen)
- case *TKEY:
- currentLen -= len(x.Algorithm) + 1
- currentLen += compressionLenHelper(c, x.Algorithm, currentLen)
- case *TSIG:
- currentLen -= len(x.Algorithm) + 1
- currentLen += compressionLenHelper(c, x.Algorithm, currentLen)
- }
- return currentLen - initLen
-}
-
-func compressionLenSearchType(c map[string]int, r RR) (int, bool, int) {
- switch x := r.(type) {
- case *CNAME:
- k1, ok1, sz1 := compressionLenSearch(c, x.Target)
- return k1, ok1, sz1
- case *MB:
- k1, ok1, sz1 := compressionLenSearch(c, x.Mb)
- return k1, ok1, sz1
- case *MD:
- k1, ok1, sz1 := compressionLenSearch(c, x.Md)
- return k1, ok1, sz1
- case *MF:
- k1, ok1, sz1 := compressionLenSearch(c, x.Mf)
- return k1, ok1, sz1
- case *MG:
- k1, ok1, sz1 := compressionLenSearch(c, x.Mg)
- return k1, ok1, sz1
- case *MINFO:
- k1, ok1, sz1 := compressionLenSearch(c, x.Rmail)
- k2, ok2, sz2 := compressionLenSearch(c, x.Email)
- return k1 + k2, ok1 && ok2, sz1 + sz2
- case *MR:
- k1, ok1, sz1 := compressionLenSearch(c, x.Mr)
- return k1, ok1, sz1
- case *MX:
- k1, ok1, sz1 := compressionLenSearch(c, x.Mx)
- return k1, ok1, sz1
- case *NS:
- k1, ok1, sz1 := compressionLenSearch(c, x.Ns)
- return k1, ok1, sz1
- case *PTR:
- k1, ok1, sz1 := compressionLenSearch(c, x.Ptr)
- return k1, ok1, sz1
- case *RT:
- k1, ok1, sz1 := compressionLenSearch(c, x.Host)
- return k1, ok1, sz1
- case *SOA:
- k1, ok1, sz1 := compressionLenSearch(c, x.Ns)
- k2, ok2, sz2 := compressionLenSearch(c, x.Mbox)
- return k1 + k2, ok1 && ok2, sz1 + sz2
- }
- return 0, false, 0
-}
diff --git a/vendor/github.com/miekg/dns/zduplicate.go b/vendor/github.com/miekg/dns/zduplicate.go
index ba9863b233..74389162fa 100644
--- a/vendor/github.com/miekg/dns/zduplicate.go
+++ b/vendor/github.com/miekg/dns/zduplicate.go
@@ -2,174 +2,62 @@
package dns
-// isDuplicateRdata calls the rdata specific functions
-func isDuplicateRdata(r1, r2 RR) bool {
- switch r1.Header().Rrtype {
- case TypeA:
- return isDuplicateA(r1.(*A), r2.(*A))
- case TypeAAAA:
- return isDuplicateAAAA(r1.(*AAAA), r2.(*AAAA))
- case TypeAFSDB:
- return isDuplicateAFSDB(r1.(*AFSDB), r2.(*AFSDB))
- case TypeAVC:
- return isDuplicateAVC(r1.(*AVC), r2.(*AVC))
- case TypeCAA:
- return isDuplicateCAA(r1.(*CAA), r2.(*CAA))
- case TypeCERT:
- return isDuplicateCERT(r1.(*CERT), r2.(*CERT))
- case TypeCNAME:
- return isDuplicateCNAME(r1.(*CNAME), r2.(*CNAME))
- case TypeCSYNC:
- return isDuplicateCSYNC(r1.(*CSYNC), r2.(*CSYNC))
- case TypeDHCID:
- return isDuplicateDHCID(r1.(*DHCID), r2.(*DHCID))
- case TypeDNAME:
- return isDuplicateDNAME(r1.(*DNAME), r2.(*DNAME))
- case TypeDNSKEY:
- return isDuplicateDNSKEY(r1.(*DNSKEY), r2.(*DNSKEY))
- case TypeDS:
- return isDuplicateDS(r1.(*DS), r2.(*DS))
- case TypeEID:
- return isDuplicateEID(r1.(*EID), r2.(*EID))
- case TypeEUI48:
- return isDuplicateEUI48(r1.(*EUI48), r2.(*EUI48))
- case TypeEUI64:
- return isDuplicateEUI64(r1.(*EUI64), r2.(*EUI64))
- case TypeGID:
- return isDuplicateGID(r1.(*GID), r2.(*GID))
- case TypeGPOS:
- return isDuplicateGPOS(r1.(*GPOS), r2.(*GPOS))
- case TypeHINFO:
- return isDuplicateHINFO(r1.(*HINFO), r2.(*HINFO))
- case TypeHIP:
- return isDuplicateHIP(r1.(*HIP), r2.(*HIP))
- case TypeKX:
- return isDuplicateKX(r1.(*KX), r2.(*KX))
- case TypeL32:
- return isDuplicateL32(r1.(*L32), r2.(*L32))
- case TypeL64:
- return isDuplicateL64(r1.(*L64), r2.(*L64))
- case TypeLOC:
- return isDuplicateLOC(r1.(*LOC), r2.(*LOC))
- case TypeLP:
- return isDuplicateLP(r1.(*LP), r2.(*LP))
- case TypeMB:
- return isDuplicateMB(r1.(*MB), r2.(*MB))
- case TypeMD:
- return isDuplicateMD(r1.(*MD), r2.(*MD))
- case TypeMF:
- return isDuplicateMF(r1.(*MF), r2.(*MF))
- case TypeMG:
- return isDuplicateMG(r1.(*MG), r2.(*MG))
- case TypeMINFO:
- return isDuplicateMINFO(r1.(*MINFO), r2.(*MINFO))
- case TypeMR:
- return isDuplicateMR(r1.(*MR), r2.(*MR))
- case TypeMX:
- return isDuplicateMX(r1.(*MX), r2.(*MX))
- case TypeNAPTR:
- return isDuplicateNAPTR(r1.(*NAPTR), r2.(*NAPTR))
- case TypeNID:
- return isDuplicateNID(r1.(*NID), r2.(*NID))
- case TypeNIMLOC:
- return isDuplicateNIMLOC(r1.(*NIMLOC), r2.(*NIMLOC))
- case TypeNINFO:
- return isDuplicateNINFO(r1.(*NINFO), r2.(*NINFO))
- case TypeNS:
- return isDuplicateNS(r1.(*NS), r2.(*NS))
- case TypeNSAPPTR:
- return isDuplicateNSAPPTR(r1.(*NSAPPTR), r2.(*NSAPPTR))
- case TypeNSEC:
- return isDuplicateNSEC(r1.(*NSEC), r2.(*NSEC))
- case TypeNSEC3:
- return isDuplicateNSEC3(r1.(*NSEC3), r2.(*NSEC3))
- case TypeNSEC3PARAM:
- return isDuplicateNSEC3PARAM(r1.(*NSEC3PARAM), r2.(*NSEC3PARAM))
- case TypeOPENPGPKEY:
- return isDuplicateOPENPGPKEY(r1.(*OPENPGPKEY), r2.(*OPENPGPKEY))
- case TypePTR:
- return isDuplicatePTR(r1.(*PTR), r2.(*PTR))
- case TypePX:
- return isDuplicatePX(r1.(*PX), r2.(*PX))
- case TypeRKEY:
- return isDuplicateRKEY(r1.(*RKEY), r2.(*RKEY))
- case TypeRP:
- return isDuplicateRP(r1.(*RP), r2.(*RP))
- case TypeRRSIG:
- return isDuplicateRRSIG(r1.(*RRSIG), r2.(*RRSIG))
- case TypeRT:
- return isDuplicateRT(r1.(*RT), r2.(*RT))
- case TypeSMIMEA:
- return isDuplicateSMIMEA(r1.(*SMIMEA), r2.(*SMIMEA))
- case TypeSOA:
- return isDuplicateSOA(r1.(*SOA), r2.(*SOA))
- case TypeSPF:
- return isDuplicateSPF(r1.(*SPF), r2.(*SPF))
- case TypeSRV:
- return isDuplicateSRV(r1.(*SRV), r2.(*SRV))
- case TypeSSHFP:
- return isDuplicateSSHFP(r1.(*SSHFP), r2.(*SSHFP))
- case TypeTA:
- return isDuplicateTA(r1.(*TA), r2.(*TA))
- case TypeTALINK:
- return isDuplicateTALINK(r1.(*TALINK), r2.(*TALINK))
- case TypeTKEY:
- return isDuplicateTKEY(r1.(*TKEY), r2.(*TKEY))
- case TypeTLSA:
- return isDuplicateTLSA(r1.(*TLSA), r2.(*TLSA))
- case TypeTSIG:
- return isDuplicateTSIG(r1.(*TSIG), r2.(*TSIG))
- case TypeTXT:
- return isDuplicateTXT(r1.(*TXT), r2.(*TXT))
- case TypeUID:
- return isDuplicateUID(r1.(*UID), r2.(*UID))
- case TypeUINFO:
- return isDuplicateUINFO(r1.(*UINFO), r2.(*UINFO))
- case TypeURI:
- return isDuplicateURI(r1.(*URI), r2.(*URI))
- case TypeX25:
- return isDuplicateX25(r1.(*X25), r2.(*X25))
- }
- return false
-}
-
// isDuplicate() functions
-func isDuplicateA(r1, r2 *A) bool {
- if len(r1.A) != len(r2.A) {
+func (r1 *A) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*A)
+ if !ok {
return false
}
- for i := 0; i < len(r1.A); i++ {
- if r1.A[i] != r2.A[i] {
- return false
- }
+ _ = r2
+ if !r1.A.Equal(r2.A) {
+ return false
}
return true
}
-func isDuplicateAAAA(r1, r2 *AAAA) bool {
- if len(r1.AAAA) != len(r2.AAAA) {
+func (r1 *AAAA) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*AAAA)
+ if !ok {
return false
}
- for i := 0; i < len(r1.AAAA); i++ {
- if r1.AAAA[i] != r2.AAAA[i] {
- return false
- }
+ _ = r2
+ if !r1.AAAA.Equal(r2.AAAA) {
+ return false
}
return true
}
-func isDuplicateAFSDB(r1, r2 *AFSDB) bool {
+func (r1 *AFSDB) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*AFSDB)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Subtype != r2.Subtype {
return false
}
- if !isDulicateName(r1.Hostname, r2.Hostname) {
+ if !isDuplicateName(r1.Hostname, r2.Hostname) {
return false
}
return true
}
-func isDuplicateAVC(r1, r2 *AVC) bool {
+func (r1 *ANY) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*ANY)
+ if !ok {
+ return false
+ }
+ _ = r2
+ return true
+}
+
+func (r1 *AVC) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*AVC)
+ if !ok {
+ return false
+ }
+ _ = r2
if len(r1.Txt) != len(r2.Txt) {
return false
}
@@ -181,7 +69,12 @@ func isDuplicateAVC(r1, r2 *AVC) bool {
return true
}
-func isDuplicateCAA(r1, r2 *CAA) bool {
+func (r1 *CAA) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*CAA)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Flag != r2.Flag {
return false
}
@@ -194,7 +87,12 @@ func isDuplicateCAA(r1, r2 *CAA) bool {
return true
}
-func isDuplicateCERT(r1, r2 *CERT) bool {
+func (r1 *CERT) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*CERT)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Type != r2.Type {
return false
}
@@ -210,14 +108,24 @@ func isDuplicateCERT(r1, r2 *CERT) bool {
return true
}
-func isDuplicateCNAME(r1, r2 *CNAME) bool {
- if !isDulicateName(r1.Target, r2.Target) {
+func (r1 *CNAME) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*CNAME)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if !isDuplicateName(r1.Target, r2.Target) {
return false
}
return true
}
-func isDuplicateCSYNC(r1, r2 *CSYNC) bool {
+func (r1 *CSYNC) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*CSYNC)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Serial != r2.Serial {
return false
}
@@ -235,21 +143,36 @@ func isDuplicateCSYNC(r1, r2 *CSYNC) bool {
return true
}
-func isDuplicateDHCID(r1, r2 *DHCID) bool {
+func (r1 *DHCID) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*DHCID)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Digest != r2.Digest {
return false
}
return true
}
-func isDuplicateDNAME(r1, r2 *DNAME) bool {
- if !isDulicateName(r1.Target, r2.Target) {
+func (r1 *DNAME) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*DNAME)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if !isDuplicateName(r1.Target, r2.Target) {
return false
}
return true
}
-func isDuplicateDNSKEY(r1, r2 *DNSKEY) bool {
+func (r1 *DNSKEY) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*DNSKEY)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Flags != r2.Flags {
return false
}
@@ -265,7 +188,12 @@ func isDuplicateDNSKEY(r1, r2 *DNSKEY) bool {
return true
}
-func isDuplicateDS(r1, r2 *DS) bool {
+func (r1 *DS) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*DS)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.KeyTag != r2.KeyTag {
return false
}
@@ -281,35 +209,60 @@ func isDuplicateDS(r1, r2 *DS) bool {
return true
}
-func isDuplicateEID(r1, r2 *EID) bool {
+func (r1 *EID) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*EID)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Endpoint != r2.Endpoint {
return false
}
return true
}
-func isDuplicateEUI48(r1, r2 *EUI48) bool {
+func (r1 *EUI48) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*EUI48)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Address != r2.Address {
return false
}
return true
}
-func isDuplicateEUI64(r1, r2 *EUI64) bool {
+func (r1 *EUI64) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*EUI64)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Address != r2.Address {
return false
}
return true
}
-func isDuplicateGID(r1, r2 *GID) bool {
+func (r1 *GID) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*GID)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Gid != r2.Gid {
return false
}
return true
}
-func isDuplicateGPOS(r1, r2 *GPOS) bool {
+func (r1 *GPOS) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*GPOS)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Longitude != r2.Longitude {
return false
}
@@ -322,7 +275,12 @@ func isDuplicateGPOS(r1, r2 *GPOS) bool {
return true
}
-func isDuplicateHINFO(r1, r2 *HINFO) bool {
+func (r1 *HINFO) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*HINFO)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Cpu != r2.Cpu {
return false
}
@@ -332,7 +290,12 @@ func isDuplicateHINFO(r1, r2 *HINFO) bool {
return true
}
-func isDuplicateHIP(r1, r2 *HIP) bool {
+func (r1 *HIP) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*HIP)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.HitLength != r2.HitLength {
return false
}
@@ -352,39 +315,49 @@ func isDuplicateHIP(r1, r2 *HIP) bool {
return false
}
for i := 0; i < len(r1.RendezvousServers); i++ {
- if !isDulicateName(r1.RendezvousServers[i], r2.RendezvousServers[i]) {
+ if !isDuplicateName(r1.RendezvousServers[i], r2.RendezvousServers[i]) {
return false
}
}
return true
}
-func isDuplicateKX(r1, r2 *KX) bool {
+func (r1 *KX) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*KX)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Preference != r2.Preference {
return false
}
- if !isDulicateName(r1.Exchanger, r2.Exchanger) {
+ if !isDuplicateName(r1.Exchanger, r2.Exchanger) {
return false
}
return true
}
-func isDuplicateL32(r1, r2 *L32) bool {
+func (r1 *L32) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*L32)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Preference != r2.Preference {
return false
}
- if len(r1.Locator32) != len(r2.Locator32) {
+ if !r1.Locator32.Equal(r2.Locator32) {
return false
}
- for i := 0; i < len(r1.Locator32); i++ {
- if r1.Locator32[i] != r2.Locator32[i] {
- return false
- }
- }
return true
}
-func isDuplicateL64(r1, r2 *L64) bool {
+func (r1 *L64) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*L64)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Preference != r2.Preference {
return false
}
@@ -394,7 +367,12 @@ func isDuplicateL64(r1, r2 *L64) bool {
return true
}
-func isDuplicateLOC(r1, r2 *LOC) bool {
+func (r1 *LOC) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*LOC)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Version != r2.Version {
return false
}
@@ -419,72 +397,117 @@ func isDuplicateLOC(r1, r2 *LOC) bool {
return true
}
-func isDuplicateLP(r1, r2 *LP) bool {
+func (r1 *LP) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*LP)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Preference != r2.Preference {
return false
}
- if !isDulicateName(r1.Fqdn, r2.Fqdn) {
+ if !isDuplicateName(r1.Fqdn, r2.Fqdn) {
return false
}
return true
}
-func isDuplicateMB(r1, r2 *MB) bool {
- if !isDulicateName(r1.Mb, r2.Mb) {
+func (r1 *MB) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*MB)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if !isDuplicateName(r1.Mb, r2.Mb) {
return false
}
return true
}
-func isDuplicateMD(r1, r2 *MD) bool {
- if !isDulicateName(r1.Md, r2.Md) {
+func (r1 *MD) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*MD)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if !isDuplicateName(r1.Md, r2.Md) {
return false
}
return true
}
-func isDuplicateMF(r1, r2 *MF) bool {
- if !isDulicateName(r1.Mf, r2.Mf) {
+func (r1 *MF) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*MF)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if !isDuplicateName(r1.Mf, r2.Mf) {
return false
}
return true
}
-func isDuplicateMG(r1, r2 *MG) bool {
- if !isDulicateName(r1.Mg, r2.Mg) {
+func (r1 *MG) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*MG)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if !isDuplicateName(r1.Mg, r2.Mg) {
return false
}
return true
}
-func isDuplicateMINFO(r1, r2 *MINFO) bool {
- if !isDulicateName(r1.Rmail, r2.Rmail) {
+func (r1 *MINFO) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*MINFO)
+ if !ok {
return false
}
- if !isDulicateName(r1.Email, r2.Email) {
+ _ = r2
+ if !isDuplicateName(r1.Rmail, r2.Rmail) {
+ return false
+ }
+ if !isDuplicateName(r1.Email, r2.Email) {
return false
}
return true
}
-func isDuplicateMR(r1, r2 *MR) bool {
- if !isDulicateName(r1.Mr, r2.Mr) {
+func (r1 *MR) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*MR)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if !isDuplicateName(r1.Mr, r2.Mr) {
return false
}
return true
}
-func isDuplicateMX(r1, r2 *MX) bool {
+func (r1 *MX) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*MX)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Preference != r2.Preference {
return false
}
- if !isDulicateName(r1.Mx, r2.Mx) {
+ if !isDuplicateName(r1.Mx, r2.Mx) {
return false
}
return true
}
-func isDuplicateNAPTR(r1, r2 *NAPTR) bool {
+func (r1 *NAPTR) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*NAPTR)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Order != r2.Order {
return false
}
@@ -500,13 +523,18 @@ func isDuplicateNAPTR(r1, r2 *NAPTR) bool {
if r1.Regexp != r2.Regexp {
return false
}
- if !isDulicateName(r1.Replacement, r2.Replacement) {
+ if !isDuplicateName(r1.Replacement, r2.Replacement) {
return false
}
return true
}
-func isDuplicateNID(r1, r2 *NID) bool {
+func (r1 *NID) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*NID)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Preference != r2.Preference {
return false
}
@@ -516,14 +544,24 @@ func isDuplicateNID(r1, r2 *NID) bool {
return true
}
-func isDuplicateNIMLOC(r1, r2 *NIMLOC) bool {
+func (r1 *NIMLOC) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*NIMLOC)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Locator != r2.Locator {
return false
}
return true
}
-func isDuplicateNINFO(r1, r2 *NINFO) bool {
+func (r1 *NINFO) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*NINFO)
+ if !ok {
+ return false
+ }
+ _ = r2
if len(r1.ZSData) != len(r2.ZSData) {
return false
}
@@ -535,22 +573,37 @@ func isDuplicateNINFO(r1, r2 *NINFO) bool {
return true
}
-func isDuplicateNS(r1, r2 *NS) bool {
- if !isDulicateName(r1.Ns, r2.Ns) {
+func (r1 *NS) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*NS)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if !isDuplicateName(r1.Ns, r2.Ns) {
return false
}
return true
}
-func isDuplicateNSAPPTR(r1, r2 *NSAPPTR) bool {
- if !isDulicateName(r1.Ptr, r2.Ptr) {
+func (r1 *NSAPPTR) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*NSAPPTR)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if !isDuplicateName(r1.Ptr, r2.Ptr) {
return false
}
return true
}
-func isDuplicateNSEC(r1, r2 *NSEC) bool {
- if !isDulicateName(r1.NextDomain, r2.NextDomain) {
+func (r1 *NSEC) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*NSEC)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if !isDuplicateName(r1.NextDomain, r2.NextDomain) {
return false
}
if len(r1.TypeBitMap) != len(r2.TypeBitMap) {
@@ -564,7 +617,12 @@ func isDuplicateNSEC(r1, r2 *NSEC) bool {
return true
}
-func isDuplicateNSEC3(r1, r2 *NSEC3) bool {
+func (r1 *NSEC3) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*NSEC3)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Hash != r2.Hash {
return false
}
@@ -597,7 +655,12 @@ func isDuplicateNSEC3(r1, r2 *NSEC3) bool {
return true
}
-func isDuplicateNSEC3PARAM(r1, r2 *NSEC3PARAM) bool {
+func (r1 *NSEC3PARAM) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*NSEC3PARAM)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Hash != r2.Hash {
return false
}
@@ -616,34 +679,78 @@ func isDuplicateNSEC3PARAM(r1, r2 *NSEC3PARAM) bool {
return true
}
-func isDuplicateOPENPGPKEY(r1, r2 *OPENPGPKEY) bool {
+func (r1 *NULL) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*NULL)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if r1.Data != r2.Data {
+ return false
+ }
+ return true
+}
+
+func (r1 *OPENPGPKEY) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*OPENPGPKEY)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.PublicKey != r2.PublicKey {
return false
}
return true
}
-func isDuplicatePTR(r1, r2 *PTR) bool {
- if !isDulicateName(r1.Ptr, r2.Ptr) {
+func (r1 *PTR) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*PTR)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if !isDuplicateName(r1.Ptr, r2.Ptr) {
return false
}
return true
}
-func isDuplicatePX(r1, r2 *PX) bool {
+func (r1 *PX) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*PX)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Preference != r2.Preference {
return false
}
- if !isDulicateName(r1.Map822, r2.Map822) {
+ if !isDuplicateName(r1.Map822, r2.Map822) {
return false
}
- if !isDulicateName(r1.Mapx400, r2.Mapx400) {
+ if !isDuplicateName(r1.Mapx400, r2.Mapx400) {
return false
}
return true
}
-func isDuplicateRKEY(r1, r2 *RKEY) bool {
+func (r1 *RFC3597) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*RFC3597)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if r1.Rdata != r2.Rdata {
+ return false
+ }
+ return true
+}
+
+func (r1 *RKEY) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*RKEY)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Flags != r2.Flags {
return false
}
@@ -659,17 +766,27 @@ func isDuplicateRKEY(r1, r2 *RKEY) bool {
return true
}
-func isDuplicateRP(r1, r2 *RP) bool {
- if !isDulicateName(r1.Mbox, r2.Mbox) {
+func (r1 *RP) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*RP)
+ if !ok {
return false
}
- if !isDulicateName(r1.Txt, r2.Txt) {
+ _ = r2
+ if !isDuplicateName(r1.Mbox, r2.Mbox) {
+ return false
+ }
+ if !isDuplicateName(r1.Txt, r2.Txt) {
return false
}
return true
}
-func isDuplicateRRSIG(r1, r2 *RRSIG) bool {
+func (r1 *RRSIG) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*RRSIG)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.TypeCovered != r2.TypeCovered {
return false
}
@@ -691,7 +808,7 @@ func isDuplicateRRSIG(r1, r2 *RRSIG) bool {
if r1.KeyTag != r2.KeyTag {
return false
}
- if !isDulicateName(r1.SignerName, r2.SignerName) {
+ if !isDuplicateName(r1.SignerName, r2.SignerName) {
return false
}
if r1.Signature != r2.Signature {
@@ -700,17 +817,27 @@ func isDuplicateRRSIG(r1, r2 *RRSIG) bool {
return true
}
-func isDuplicateRT(r1, r2 *RT) bool {
+func (r1 *RT) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*RT)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Preference != r2.Preference {
return false
}
- if !isDulicateName(r1.Host, r2.Host) {
+ if !isDuplicateName(r1.Host, r2.Host) {
return false
}
return true
}
-func isDuplicateSMIMEA(r1, r2 *SMIMEA) bool {
+func (r1 *SMIMEA) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*SMIMEA)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Usage != r2.Usage {
return false
}
@@ -726,11 +853,16 @@ func isDuplicateSMIMEA(r1, r2 *SMIMEA) bool {
return true
}
-func isDuplicateSOA(r1, r2 *SOA) bool {
- if !isDulicateName(r1.Ns, r2.Ns) {
+func (r1 *SOA) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*SOA)
+ if !ok {
return false
}
- if !isDulicateName(r1.Mbox, r2.Mbox) {
+ _ = r2
+ if !isDuplicateName(r1.Ns, r2.Ns) {
+ return false
+ }
+ if !isDuplicateName(r1.Mbox, r2.Mbox) {
return false
}
if r1.Serial != r2.Serial {
@@ -751,7 +883,12 @@ func isDuplicateSOA(r1, r2 *SOA) bool {
return true
}
-func isDuplicateSPF(r1, r2 *SPF) bool {
+func (r1 *SPF) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*SPF)
+ if !ok {
+ return false
+ }
+ _ = r2
if len(r1.Txt) != len(r2.Txt) {
return false
}
@@ -763,7 +900,12 @@ func isDuplicateSPF(r1, r2 *SPF) bool {
return true
}
-func isDuplicateSRV(r1, r2 *SRV) bool {
+func (r1 *SRV) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*SRV)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Priority != r2.Priority {
return false
}
@@ -773,13 +915,18 @@ func isDuplicateSRV(r1, r2 *SRV) bool {
if r1.Port != r2.Port {
return false
}
- if !isDulicateName(r1.Target, r2.Target) {
+ if !isDuplicateName(r1.Target, r2.Target) {
return false
}
return true
}
-func isDuplicateSSHFP(r1, r2 *SSHFP) bool {
+func (r1 *SSHFP) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*SSHFP)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Algorithm != r2.Algorithm {
return false
}
@@ -792,7 +939,12 @@ func isDuplicateSSHFP(r1, r2 *SSHFP) bool {
return true
}
-func isDuplicateTA(r1, r2 *TA) bool {
+func (r1 *TA) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*TA)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.KeyTag != r2.KeyTag {
return false
}
@@ -808,18 +960,28 @@ func isDuplicateTA(r1, r2 *TA) bool {
return true
}
-func isDuplicateTALINK(r1, r2 *TALINK) bool {
- if !isDulicateName(r1.PreviousName, r2.PreviousName) {
+func (r1 *TALINK) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*TALINK)
+ if !ok {
return false
}
- if !isDulicateName(r1.NextName, r2.NextName) {
+ _ = r2
+ if !isDuplicateName(r1.PreviousName, r2.PreviousName) {
+ return false
+ }
+ if !isDuplicateName(r1.NextName, r2.NextName) {
return false
}
return true
}
-func isDuplicateTKEY(r1, r2 *TKEY) bool {
- if !isDulicateName(r1.Algorithm, r2.Algorithm) {
+func (r1 *TKEY) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*TKEY)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if !isDuplicateName(r1.Algorithm, r2.Algorithm) {
return false
}
if r1.Inception != r2.Inception {
@@ -849,7 +1011,12 @@ func isDuplicateTKEY(r1, r2 *TKEY) bool {
return true
}
-func isDuplicateTLSA(r1, r2 *TLSA) bool {
+func (r1 *TLSA) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*TLSA)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Usage != r2.Usage {
return false
}
@@ -865,8 +1032,13 @@ func isDuplicateTLSA(r1, r2 *TLSA) bool {
return true
}
-func isDuplicateTSIG(r1, r2 *TSIG) bool {
- if !isDulicateName(r1.Algorithm, r2.Algorithm) {
+func (r1 *TSIG) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*TSIG)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if !isDuplicateName(r1.Algorithm, r2.Algorithm) {
return false
}
if r1.TimeSigned != r2.TimeSigned {
@@ -896,7 +1068,12 @@ func isDuplicateTSIG(r1, r2 *TSIG) bool {
return true
}
-func isDuplicateTXT(r1, r2 *TXT) bool {
+func (r1 *TXT) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*TXT)
+ if !ok {
+ return false
+ }
+ _ = r2
if len(r1.Txt) != len(r2.Txt) {
return false
}
@@ -908,21 +1085,36 @@ func isDuplicateTXT(r1, r2 *TXT) bool {
return true
}
-func isDuplicateUID(r1, r2 *UID) bool {
+func (r1 *UID) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*UID)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Uid != r2.Uid {
return false
}
return true
}
-func isDuplicateUINFO(r1, r2 *UINFO) bool {
+func (r1 *UINFO) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*UINFO)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Uinfo != r2.Uinfo {
return false
}
return true
}
-func isDuplicateURI(r1, r2 *URI) bool {
+func (r1 *URI) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*URI)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.Priority != r2.Priority {
return false
}
@@ -935,7 +1127,12 @@ func isDuplicateURI(r1, r2 *URI) bool {
return true
}
-func isDuplicateX25(r1, r2 *X25) bool {
+func (r1 *X25) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*X25)
+ if !ok {
+ return false
+ }
+ _ = r2
if r1.PSDNAddress != r2.PSDNAddress {
return false
}
diff --git a/vendor/github.com/miekg/dns/zmsg.go b/vendor/github.com/miekg/dns/zmsg.go
index 1a68f74da2..c4cf4757e8 100644
--- a/vendor/github.com/miekg/dns/zmsg.go
+++ b/vendor/github.com/miekg/dns/zmsg.go
@@ -4,82 +4,47 @@ package dns
// pack*() functions
-func (rr *A) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *A) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packDataA(rr.A, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *AAAA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *AAAA) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packDataAAAA(rr.AAAA, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *AFSDB) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *AFSDB) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Subtype, msg, off)
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.Hostname, msg, off, compression, false)
+ off, err = packDomainName(rr.Hostname, msg, off, compression, false)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *ANY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
- rr.Header().Rdlength = uint16(off - headerEnd)
+func (rr *ANY) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
return off, nil
}
-func (rr *AVC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *AVC) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packStringTxt(rr.Txt, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *CAA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *CAA) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint8(rr.Flag, msg, off)
if err != nil {
return off, err
@@ -92,16 +57,10 @@ func (rr *CAA) pack(msg []byte, off int, compression map[string]int, compress bo
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *CDNSKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *CDNSKEY) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Flags, msg, off)
if err != nil {
return off, err
@@ -118,16 +77,10 @@ func (rr *CDNSKEY) pack(msg []byte, off int, compression map[string]int, compres
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *CDS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *CDS) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.KeyTag, msg, off)
if err != nil {
return off, err
@@ -144,16 +97,10 @@ func (rr *CDS) pack(msg []byte, off int, compression map[string]int, compress bo
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *CERT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *CERT) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Type, msg, off)
if err != nil {
return off, err
@@ -170,30 +117,18 @@ func (rr *CERT) pack(msg []byte, off int, compression map[string]int, compress b
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *CNAME) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *CNAME) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Target, msg, off, compression, compress)
if err != nil {
return off, err
}
- headerEnd := off
- off, err = PackDomainName(rr.Target, msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *CSYNC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *CSYNC) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint32(rr.Serial, msg, off)
if err != nil {
return off, err
@@ -206,30 +141,18 @@ func (rr *CSYNC) pack(msg []byte, off int, compression map[string]int, compress
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *DHCID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *DHCID) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packStringBase64(rr.Digest, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *DLV) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *DLV) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.KeyTag, msg, off)
if err != nil {
return off, err
@@ -246,30 +169,18 @@ func (rr *DLV) pack(msg []byte, off int, compression map[string]int, compress bo
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *DNAME) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *DNAME) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Target, msg, off, compression, false)
if err != nil {
return off, err
}
- headerEnd := off
- off, err = PackDomainName(rr.Target, msg, off, compression, false)
- if err != nil {
- return off, err
- }
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *DNSKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *DNSKEY) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Flags, msg, off)
if err != nil {
return off, err
@@ -286,16 +197,10 @@ func (rr *DNSKEY) pack(msg []byte, off int, compression map[string]int, compress
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *DS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *DS) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.KeyTag, msg, off)
if err != nil {
return off, err
@@ -312,72 +217,42 @@ func (rr *DS) pack(msg []byte, off int, compression map[string]int, compress boo
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *EID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *EID) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packStringHex(rr.Endpoint, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *EUI48) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *EUI48) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint48(rr.Address, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *EUI64) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *EUI64) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint64(rr.Address, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *GID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *GID) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint32(rr.Gid, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *GPOS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *GPOS) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packString(rr.Longitude, msg, off)
if err != nil {
return off, err
@@ -390,16 +265,10 @@ func (rr *GPOS) pack(msg []byte, off int, compression map[string]int, compress b
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *HINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *HINFO) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packString(rr.Cpu, msg, off)
if err != nil {
return off, err
@@ -408,16 +277,10 @@ func (rr *HINFO) pack(msg []byte, off int, compression map[string]int, compress
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *HIP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *HIP) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint8(rr.HitLength, msg, off)
if err != nil {
return off, err
@@ -438,20 +301,14 @@ func (rr *HIP) pack(msg []byte, off int, compression map[string]int, compress bo
if err != nil {
return off, err
}
- off, err = packDataDomainNames(rr.RendezvousServers, msg, off, compression, compress)
+ off, err = packDataDomainNames(rr.RendezvousServers, msg, off, compression, false)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *KEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *KEY) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Flags, msg, off)
if err != nil {
return off, err
@@ -468,34 +325,22 @@ func (rr *KEY) pack(msg []byte, off int, compression map[string]int, compress bo
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *KX) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *KX) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Preference, msg, off)
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.Exchanger, msg, off, compression, false)
+ off, err = packDomainName(rr.Exchanger, msg, off, compression, false)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *L32) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *L32) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Preference, msg, off)
if err != nil {
return off, err
@@ -504,16 +349,10 @@ func (rr *L32) pack(msg []byte, off int, compression map[string]int, compress bo
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *L64) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *L64) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Preference, msg, off)
if err != nil {
return off, err
@@ -522,16 +361,10 @@ func (rr *L64) pack(msg []byte, off int, compression map[string]int, compress bo
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *LOC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *LOC) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint8(rr.Version, msg, off)
if err != nil {
return off, err
@@ -560,140 +393,86 @@ func (rr *LOC) pack(msg []byte, off int, compression map[string]int, compress bo
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *LP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *LP) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Preference, msg, off)
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.Fqdn, msg, off, compression, false)
+ off, err = packDomainName(rr.Fqdn, msg, off, compression, false)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *MB) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *MB) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Mb, msg, off, compression, compress)
if err != nil {
return off, err
}
- headerEnd := off
- off, err = PackDomainName(rr.Mb, msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *MD) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *MD) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Md, msg, off, compression, compress)
if err != nil {
return off, err
}
- headerEnd := off
- off, err = PackDomainName(rr.Md, msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *MF) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *MF) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Mf, msg, off, compression, compress)
if err != nil {
return off, err
}
- headerEnd := off
- off, err = PackDomainName(rr.Mf, msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *MG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *MG) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Mg, msg, off, compression, compress)
if err != nil {
return off, err
}
- headerEnd := off
- off, err = PackDomainName(rr.Mg, msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *MINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *MINFO) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Rmail, msg, off, compression, compress)
if err != nil {
return off, err
}
- headerEnd := off
- off, err = PackDomainName(rr.Rmail, msg, off, compression, compress)
+ off, err = packDomainName(rr.Email, msg, off, compression, compress)
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.Email, msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *MR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *MR) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Mr, msg, off, compression, compress)
if err != nil {
return off, err
}
- headerEnd := off
- off, err = PackDomainName(rr.Mr, msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *MX) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *MX) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Preference, msg, off)
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.Mx, msg, off, compression, compress)
+ off, err = packDomainName(rr.Mx, msg, off, compression, compress)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *NAPTR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *NAPTR) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Order, msg, off)
if err != nil {
return off, err
@@ -714,20 +493,14 @@ func (rr *NAPTR) pack(msg []byte, off int, compression map[string]int, compress
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.Replacement, msg, off, compression, false)
+ off, err = packDomainName(rr.Replacement, msg, off, compression, false)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *NID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *NID) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Preference, msg, off)
if err != nil {
return off, err
@@ -736,73 +509,43 @@ func (rr *NID) pack(msg []byte, off int, compression map[string]int, compress bo
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *NIMLOC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *NIMLOC) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packStringHex(rr.Locator, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *NINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *NINFO) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packStringTxt(rr.ZSData, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *NS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *NS) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Ns, msg, off, compression, compress)
if err != nil {
return off, err
}
- headerEnd := off
- off, err = PackDomainName(rr.Ns, msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *NSAPPTR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *NSAPPTR) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Ptr, msg, off, compression, false)
if err != nil {
return off, err
}
- headerEnd := off
- off, err = PackDomainName(rr.Ptr, msg, off, compression, false)
- if err != nil {
- return off, err
- }
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *NSEC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
- off, err = PackDomainName(rr.NextDomain, msg, off, compression, false)
+func (rr *NSEC) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.NextDomain, msg, off, compression, false)
if err != nil {
return off, err
}
@@ -810,16 +553,10 @@ func (rr *NSEC) pack(msg []byte, off int, compression map[string]int, compress b
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *NSEC3) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *NSEC3) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint8(rr.Hash, msg, off)
if err != nil {
return off, err
@@ -855,16 +592,10 @@ func (rr *NSEC3) pack(msg []byte, off int, compression map[string]int, compress
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *NSEC3PARAM) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *NSEC3PARAM) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint8(rr.Hash, msg, off)
if err != nil {
return off, err
@@ -888,94 +619,66 @@ func (rr *NSEC3PARAM) pack(msg []byte, off int, compression map[string]int, comp
return off, err
}
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *OPENPGPKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *NULL) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packStringAny(rr.Data, msg, off)
if err != nil {
return off, err
}
- headerEnd := off
+ return off, nil
+}
+
+func (rr *OPENPGPKEY) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packStringBase64(rr.PublicKey, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *OPT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *OPT) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packDataOpt(rr.Option, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *PTR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *PTR) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Ptr, msg, off, compression, compress)
if err != nil {
return off, err
}
- headerEnd := off
- off, err = PackDomainName(rr.Ptr, msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *PX) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *PX) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Preference, msg, off)
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.Map822, msg, off, compression, false)
+ off, err = packDomainName(rr.Map822, msg, off, compression, false)
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.Mapx400, msg, off, compression, false)
+ off, err = packDomainName(rr.Mapx400, msg, off, compression, false)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *RFC3597) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *RFC3597) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packStringHex(rr.Rdata, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *RKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *RKEY) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Flags, msg, off)
if err != nil {
return off, err
@@ -992,34 +695,22 @@ func (rr *RKEY) pack(msg []byte, off int, compression map[string]int, compress b
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *RP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *RP) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Mbox, msg, off, compression, false)
if err != nil {
return off, err
}
- headerEnd := off
- off, err = PackDomainName(rr.Mbox, msg, off, compression, false)
+ off, err = packDomainName(rr.Txt, msg, off, compression, false)
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.Txt, msg, off, compression, false)
- if err != nil {
- return off, err
- }
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *RRSIG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *RRSIG) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.TypeCovered, msg, off)
if err != nil {
return off, err
@@ -1048,7 +739,7 @@ func (rr *RRSIG) pack(msg []byte, off int, compression map[string]int, compress
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.SignerName, msg, off, compression, false)
+ off, err = packDomainName(rr.SignerName, msg, off, compression, false)
if err != nil {
return off, err
}
@@ -1056,34 +747,22 @@ func (rr *RRSIG) pack(msg []byte, off int, compression map[string]int, compress
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *RT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *RT) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Preference, msg, off)
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.Host, msg, off, compression, compress)
+ off, err = packDomainName(rr.Host, msg, off, compression, false)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *SIG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *SIG) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.TypeCovered, msg, off)
if err != nil {
return off, err
@@ -1112,7 +791,7 @@ func (rr *SIG) pack(msg []byte, off int, compression map[string]int, compress bo
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.SignerName, msg, off, compression, false)
+ off, err = packDomainName(rr.SignerName, msg, off, compression, false)
if err != nil {
return off, err
}
@@ -1120,16 +799,10 @@ func (rr *SIG) pack(msg []byte, off int, compression map[string]int, compress bo
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *SMIMEA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *SMIMEA) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint8(rr.Usage, msg, off)
if err != nil {
return off, err
@@ -1146,21 +819,15 @@ func (rr *SMIMEA) pack(msg []byte, off int, compression map[string]int, compress
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *SOA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *SOA) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Ns, msg, off, compression, compress)
if err != nil {
return off, err
}
- headerEnd := off
- off, err = PackDomainName(rr.Ns, msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- off, err = PackDomainName(rr.Mbox, msg, off, compression, compress)
+ off, err = packDomainName(rr.Mbox, msg, off, compression, compress)
if err != nil {
return off, err
}
@@ -1184,30 +851,18 @@ func (rr *SOA) pack(msg []byte, off int, compression map[string]int, compress bo
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *SPF) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *SPF) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packStringTxt(rr.Txt, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *SRV) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *SRV) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Priority, msg, off)
if err != nil {
return off, err
@@ -1220,20 +875,14 @@ func (rr *SRV) pack(msg []byte, off int, compression map[string]int, compress bo
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.Target, msg, off, compression, false)
+ off, err = packDomainName(rr.Target, msg, off, compression, false)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *SSHFP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *SSHFP) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint8(rr.Algorithm, msg, off)
if err != nil {
return off, err
@@ -1246,16 +895,10 @@ func (rr *SSHFP) pack(msg []byte, off int, compression map[string]int, compress
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *TA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *TA) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.KeyTag, msg, off)
if err != nil {
return off, err
@@ -1272,35 +915,23 @@ func (rr *TA) pack(msg []byte, off int, compression map[string]int, compress boo
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *TALINK) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
+func (rr *TALINK) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.PreviousName, msg, off, compression, false)
if err != nil {
return off, err
}
- headerEnd := off
- off, err = PackDomainName(rr.PreviousName, msg, off, compression, false)
+ off, err = packDomainName(rr.NextName, msg, off, compression, false)
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.NextName, msg, off, compression, false)
- if err != nil {
- return off, err
- }
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *TKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
- off, err = PackDomainName(rr.Algorithm, msg, off, compression, false)
+func (rr *TKEY) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Algorithm, msg, off, compression, false)
if err != nil {
return off, err
}
@@ -1336,16 +967,10 @@ func (rr *TKEY) pack(msg []byte, off int, compression map[string]int, compress b
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *TLSA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *TLSA) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint8(rr.Usage, msg, off)
if err != nil {
return off, err
@@ -1362,17 +987,11 @@ func (rr *TLSA) pack(msg []byte, off int, compression map[string]int, compress b
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *TSIG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
- off, err = PackDomainName(rr.Algorithm, msg, off, compression, false)
+func (rr *TSIG) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
+ off, err = packDomainName(rr.Algorithm, msg, off, compression, false)
if err != nil {
return off, err
}
@@ -1408,58 +1027,34 @@ func (rr *TSIG) pack(msg []byte, off int, compression map[string]int, compress b
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *TXT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *TXT) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packStringTxt(rr.Txt, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *UID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *UID) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint32(rr.Uid, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *UINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *UINFO) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packString(rr.Uinfo, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *URI) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *URI) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packUint16(rr.Priority, msg, off)
if err != nil {
return off, err
@@ -1472,2144 +1067,1656 @@ func (rr *URI) pack(msg []byte, off int, compression map[string]int, compress bo
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
-func (rr *X25) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
- off, err := rr.Hdr.pack(msg, off, compression, compress)
- if err != nil {
- return off, err
- }
- headerEnd := off
+func (rr *X25) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) {
off, err = packString(rr.PSDNAddress, msg, off)
if err != nil {
return off, err
}
- rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil
}
// unpack*() functions
-func unpackA(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(A)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *A) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.A, off, err = unpackDataA(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackAAAA(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(AAAA)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *AAAA) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.AAAA, off, err = unpackDataAAAA(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackAFSDB(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(AFSDB)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *AFSDB) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Subtype, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Hostname, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackANY(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(ANY)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *ANY) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
- return rr, off, err
+ return off, nil
}
-func unpackAVC(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(AVC)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *AVC) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Txt, off, err = unpackStringTxt(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackCAA(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(CAA)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *CAA) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Flag, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Tag, off, err = unpackString(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Value, off, err = unpackStringOctet(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackCDNSKEY(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(CDNSKEY)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *CDNSKEY) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Flags, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Protocol, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Algorithm, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackCDS(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(CDS)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *CDS) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.KeyTag, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Algorithm, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.DigestType, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackCERT(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(CERT)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *CERT) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Type, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.KeyTag, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Algorithm, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Certificate, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackCNAME(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(CNAME)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *CNAME) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Target, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackCSYNC(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(CSYNC)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *CSYNC) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Serial, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Flags, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.TypeBitMap, off, err = unpackDataNsec(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackDHCID(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(DHCID)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *DHCID) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Digest, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackDLV(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(DLV)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *DLV) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.KeyTag, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Algorithm, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.DigestType, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackDNAME(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(DNAME)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *DNAME) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Target, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackDNSKEY(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(DNSKEY)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *DNSKEY) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Flags, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Protocol, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Algorithm, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackDS(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(DS)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *DS) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.KeyTag, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Algorithm, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.DigestType, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackEID(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(EID)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *EID) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Endpoint, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackEUI48(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(EUI48)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *EUI48) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Address, off, err = unpackUint48(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackEUI64(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(EUI64)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *EUI64) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Address, off, err = unpackUint64(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackGID(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(GID)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *GID) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Gid, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackGPOS(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(GPOS)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *GPOS) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Longitude, off, err = unpackString(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Latitude, off, err = unpackString(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Altitude, off, err = unpackString(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackHINFO(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(HINFO)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *HINFO) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Cpu, off, err = unpackString(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Os, off, err = unpackString(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackHIP(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(HIP)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *HIP) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.HitLength, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.PublicKeyAlgorithm, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.PublicKeyLength, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Hit, off, err = unpackStringHex(msg, off, off+int(rr.HitLength))
if err != nil {
- return rr, off, err
+ return off, err
}
rr.PublicKey, off, err = unpackStringBase64(msg, off, off+int(rr.PublicKeyLength))
if err != nil {
- return rr, off, err
+ return off, err
}
rr.RendezvousServers, off, err = unpackDataDomainNames(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackKEY(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(KEY)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *KEY) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Flags, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Protocol, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Algorithm, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackKX(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(KX)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *KX) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Preference, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Exchanger, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackL32(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(L32)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *L32) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Preference, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Locator32, off, err = unpackDataA(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackL64(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(L64)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *L64) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Preference, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Locator64, off, err = unpackUint64(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackLOC(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(LOC)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *LOC) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Version, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Size, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.HorizPre, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.VertPre, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Latitude, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Longitude, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Altitude, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackLP(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(LP)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *LP) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Preference, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Fqdn, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackMB(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(MB)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *MB) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Mb, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackMD(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(MD)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *MD) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Md, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackMF(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(MF)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *MF) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Mf, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackMG(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(MG)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *MG) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Mg, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackMINFO(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(MINFO)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *MINFO) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Rmail, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Email, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackMR(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(MR)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *MR) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Mr, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackMX(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(MX)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *MX) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Preference, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Mx, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackNAPTR(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(NAPTR)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *NAPTR) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Order, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Preference, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Flags, off, err = unpackString(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Service, off, err = unpackString(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Regexp, off, err = unpackString(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Replacement, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackNID(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(NID)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *NID) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Preference, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.NodeID, off, err = unpackUint64(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackNIMLOC(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(NIMLOC)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *NIMLOC) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Locator, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackNINFO(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(NINFO)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *NINFO) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.ZSData, off, err = unpackStringTxt(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackNS(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(NS)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *NS) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Ns, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackNSAPPTR(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(NSAPPTR)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *NSAPPTR) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Ptr, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackNSEC(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(NSEC)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *NSEC) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.NextDomain, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.TypeBitMap, off, err = unpackDataNsec(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackNSEC3(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(NSEC3)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *NSEC3) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Hash, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Flags, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Iterations, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.SaltLength, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Salt, off, err = unpackStringHex(msg, off, off+int(rr.SaltLength))
if err != nil {
- return rr, off, err
+ return off, err
}
rr.HashLength, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.NextDomain, off, err = unpackStringBase32(msg, off, off+int(rr.HashLength))
if err != nil {
- return rr, off, err
+ return off, err
}
rr.TypeBitMap, off, err = unpackDataNsec(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackNSEC3PARAM(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(NSEC3PARAM)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *NSEC3PARAM) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Hash, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Flags, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Iterations, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.SaltLength, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Salt, off, err = unpackStringHex(msg, off, off+int(rr.SaltLength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackOPENPGPKEY(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(OPENPGPKEY)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
+func (rr *NULL) unpack(msg []byte, off int) (off1 int, err error) {
+ rdStart := off
+ _ = rdStart
+
+ rr.Data, off, err = unpackStringAny(msg, off, rdStart+int(rr.Hdr.Rdlength))
+ if err != nil {
+ return off, err
}
- var err error
+ return off, nil
+}
+
+func (rr *OPENPGPKEY) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackOPT(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(OPT)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *OPT) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Option, off, err = unpackDataOpt(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackPTR(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(PTR)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *PTR) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Ptr, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackPX(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(PX)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *PX) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Preference, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Map822, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Mapx400, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackRFC3597(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(RFC3597)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *RFC3597) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Rdata, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackRKEY(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(RKEY)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *RKEY) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Flags, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Protocol, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Algorithm, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackRP(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(RP)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *RP) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Mbox, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Txt, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackRRSIG(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(RRSIG)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *RRSIG) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.TypeCovered, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Algorithm, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Labels, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.OrigTtl, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Expiration, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Inception, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.KeyTag, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.SignerName, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Signature, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackRT(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(RT)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *RT) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Preference, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Host, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackSIG(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(SIG)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *SIG) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.TypeCovered, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Algorithm, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Labels, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.OrigTtl, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Expiration, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Inception, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.KeyTag, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.SignerName, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Signature, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackSMIMEA(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(SMIMEA)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *SMIMEA) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Usage, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Selector, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.MatchingType, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Certificate, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackSOA(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(SOA)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *SOA) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Ns, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Mbox, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Serial, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Refresh, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Retry, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Expire, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Minttl, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackSPF(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(SPF)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *SPF) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Txt, off, err = unpackStringTxt(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackSRV(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(SRV)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *SRV) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Priority, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Weight, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Port, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Target, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackSSHFP(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(SSHFP)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *SSHFP) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Algorithm, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Type, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.FingerPrint, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackTA(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(TA)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *TA) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.KeyTag, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Algorithm, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.DigestType, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackTALINK(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(TALINK)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *TALINK) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.PreviousName, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.NextName, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackTKEY(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(TKEY)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *TKEY) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Algorithm, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Inception, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Expiration, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Mode, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Error, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.KeySize, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Key, off, err = unpackStringHex(msg, off, off+int(rr.KeySize))
if err != nil {
- return rr, off, err
+ return off, err
}
rr.OtherLen, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.OtherData, off, err = unpackStringHex(msg, off, off+int(rr.OtherLen))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackTLSA(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(TLSA)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *TLSA) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Usage, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Selector, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.MatchingType, off, err = unpackUint8(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Certificate, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackTSIG(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(TSIG)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *TSIG) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Algorithm, off, err = UnpackDomainName(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.TimeSigned, off, err = unpackUint48(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Fudge, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.MACSize, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.MAC, off, err = unpackStringHex(msg, off, off+int(rr.MACSize))
if err != nil {
- return rr, off, err
+ return off, err
}
rr.OrigId, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Error, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.OtherLen, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.OtherData, off, err = unpackStringHex(msg, off, off+int(rr.OtherLen))
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackTXT(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(TXT)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *TXT) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Txt, off, err = unpackStringTxt(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackUID(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(UID)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *UID) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Uid, off, err = unpackUint32(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackUINFO(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(UINFO)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *UINFO) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Uinfo, off, err = unpackString(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackURI(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(URI)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *URI) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.Priority, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Weight, off, err = unpackUint16(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
if off == len(msg) {
- return rr, off, nil
+ return off, nil
}
rr.Target, off, err = unpackStringOctet(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
+ return off, nil
}
-func unpackX25(h RR_Header, msg []byte, off int) (RR, int, error) {
- rr := new(X25)
- rr.Hdr = h
- if noRdata(h) {
- return rr, off, nil
- }
- var err error
+func (rr *X25) unpack(msg []byte, off int) (off1 int, err error) {
rdStart := off
_ = rdStart
rr.PSDNAddress, off, err = unpackString(msg, off)
if err != nil {
- return rr, off, err
+ return off, err
}
- return rr, off, err
-}
-
-var typeToUnpack = map[uint16]func(RR_Header, []byte, int) (RR, int, error){
- TypeA: unpackA,
- TypeAAAA: unpackAAAA,
- TypeAFSDB: unpackAFSDB,
- TypeANY: unpackANY,
- TypeAVC: unpackAVC,
- TypeCAA: unpackCAA,
- TypeCDNSKEY: unpackCDNSKEY,
- TypeCDS: unpackCDS,
- TypeCERT: unpackCERT,
- TypeCNAME: unpackCNAME,
- TypeCSYNC: unpackCSYNC,
- TypeDHCID: unpackDHCID,
- TypeDLV: unpackDLV,
- TypeDNAME: unpackDNAME,
- TypeDNSKEY: unpackDNSKEY,
- TypeDS: unpackDS,
- TypeEID: unpackEID,
- TypeEUI48: unpackEUI48,
- TypeEUI64: unpackEUI64,
- TypeGID: unpackGID,
- TypeGPOS: unpackGPOS,
- TypeHINFO: unpackHINFO,
- TypeHIP: unpackHIP,
- TypeKEY: unpackKEY,
- TypeKX: unpackKX,
- TypeL32: unpackL32,
- TypeL64: unpackL64,
- TypeLOC: unpackLOC,
- TypeLP: unpackLP,
- TypeMB: unpackMB,
- TypeMD: unpackMD,
- TypeMF: unpackMF,
- TypeMG: unpackMG,
- TypeMINFO: unpackMINFO,
- TypeMR: unpackMR,
- TypeMX: unpackMX,
- TypeNAPTR: unpackNAPTR,
- TypeNID: unpackNID,
- TypeNIMLOC: unpackNIMLOC,
- TypeNINFO: unpackNINFO,
- TypeNS: unpackNS,
- TypeNSAPPTR: unpackNSAPPTR,
- TypeNSEC: unpackNSEC,
- TypeNSEC3: unpackNSEC3,
- TypeNSEC3PARAM: unpackNSEC3PARAM,
- TypeOPENPGPKEY: unpackOPENPGPKEY,
- TypeOPT: unpackOPT,
- TypePTR: unpackPTR,
- TypePX: unpackPX,
- TypeRKEY: unpackRKEY,
- TypeRP: unpackRP,
- TypeRRSIG: unpackRRSIG,
- TypeRT: unpackRT,
- TypeSIG: unpackSIG,
- TypeSMIMEA: unpackSMIMEA,
- TypeSOA: unpackSOA,
- TypeSPF: unpackSPF,
- TypeSRV: unpackSRV,
- TypeSSHFP: unpackSSHFP,
- TypeTA: unpackTA,
- TypeTALINK: unpackTALINK,
- TypeTKEY: unpackTKEY,
- TypeTLSA: unpackTLSA,
- TypeTSIG: unpackTSIG,
- TypeTXT: unpackTXT,
- TypeUID: unpackUID,
- TypeUINFO: unpackUINFO,
- TypeURI: unpackURI,
- TypeX25: unpackX25,
+ return off, nil
}
diff --git a/vendor/github.com/miekg/dns/ztypes.go b/vendor/github.com/miekg/dns/ztypes.go
index 965753b11b..f7ec8352fb 100644
--- a/vendor/github.com/miekg/dns/ztypes.go
+++ b/vendor/github.com/miekg/dns/ztypes.go
@@ -54,6 +54,7 @@ var TypeToRR = map[uint16]func() RR{
TypeNSEC: func() RR { return new(NSEC) },
TypeNSEC3: func() RR { return new(NSEC3) },
TypeNSEC3PARAM: func() RR { return new(NSEC3PARAM) },
+ TypeNULL: func() RR { return new(NULL) },
TypeOPENPGPKEY: func() RR { return new(OPENPGPKEY) },
TypeOPT: func() RR { return new(OPT) },
TypePTR: func() RR { return new(PTR) },
@@ -209,6 +210,7 @@ func (rr *NSAPPTR) Header() *RR_Header { return &rr.Hdr }
func (rr *NSEC) Header() *RR_Header { return &rr.Hdr }
func (rr *NSEC3) Header() *RR_Header { return &rr.Hdr }
func (rr *NSEC3PARAM) Header() *RR_Header { return &rr.Hdr }
+func (rr *NULL) Header() *RR_Header { return &rr.Hdr }
func (rr *OPENPGPKEY) Header() *RR_Header { return &rr.Hdr }
func (rr *OPT) Header() *RR_Header { return &rr.Hdr }
func (rr *PTR) Header() *RR_Header { return &rr.Hdr }
@@ -236,144 +238,150 @@ func (rr *URI) Header() *RR_Header { return &rr.Hdr }
func (rr *X25) Header() *RR_Header { return &rr.Hdr }
// len() functions
-func (rr *A) len() int {
- l := rr.Hdr.len()
- l += net.IPv4len // A
+func (rr *A) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ if len(rr.A) != 0 {
+ l += net.IPv4len
+ }
return l
}
-func (rr *AAAA) len() int {
- l := rr.Hdr.len()
- l += net.IPv6len // AAAA
+func (rr *AAAA) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ if len(rr.AAAA) != 0 {
+ l += net.IPv6len
+ }
return l
}
-func (rr *AFSDB) len() int {
- l := rr.Hdr.len()
+func (rr *AFSDB) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // Subtype
- l += len(rr.Hostname) + 1
+ l += domainNameLen(rr.Hostname, off+l, compression, false)
return l
}
-func (rr *ANY) len() int {
- l := rr.Hdr.len()
+func (rr *ANY) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
return l
}
-func (rr *AVC) len() int {
- l := rr.Hdr.len()
+func (rr *AVC) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
for _, x := range rr.Txt {
l += len(x) + 1
}
return l
}
-func (rr *CAA) len() int {
- l := rr.Hdr.len()
+func (rr *CAA) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l++ // Flag
l += len(rr.Tag) + 1
l += len(rr.Value)
return l
}
-func (rr *CERT) len() int {
- l := rr.Hdr.len()
+func (rr *CERT) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // Type
l += 2 // KeyTag
l++ // Algorithm
l += base64.StdEncoding.DecodedLen(len(rr.Certificate))
return l
}
-func (rr *CNAME) len() int {
- l := rr.Hdr.len()
- l += len(rr.Target) + 1
+func (rr *CNAME) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Target, off+l, compression, true)
return l
}
-func (rr *DHCID) len() int {
- l := rr.Hdr.len()
+func (rr *DHCID) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += base64.StdEncoding.DecodedLen(len(rr.Digest))
return l
}
-func (rr *DNAME) len() int {
- l := rr.Hdr.len()
- l += len(rr.Target) + 1
+func (rr *DNAME) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Target, off+l, compression, false)
return l
}
-func (rr *DNSKEY) len() int {
- l := rr.Hdr.len()
+func (rr *DNSKEY) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // Flags
l++ // Protocol
l++ // Algorithm
l += base64.StdEncoding.DecodedLen(len(rr.PublicKey))
return l
}
-func (rr *DS) len() int {
- l := rr.Hdr.len()
+func (rr *DS) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // KeyTag
l++ // Algorithm
l++ // DigestType
- l += len(rr.Digest)/2 + 1
+ l += len(rr.Digest) / 2
return l
}
-func (rr *EID) len() int {
- l := rr.Hdr.len()
- l += len(rr.Endpoint)/2 + 1
+func (rr *EID) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += len(rr.Endpoint) / 2
return l
}
-func (rr *EUI48) len() int {
- l := rr.Hdr.len()
+func (rr *EUI48) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 6 // Address
return l
}
-func (rr *EUI64) len() int {
- l := rr.Hdr.len()
+func (rr *EUI64) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 8 // Address
return l
}
-func (rr *GID) len() int {
- l := rr.Hdr.len()
+func (rr *GID) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 4 // Gid
return l
}
-func (rr *GPOS) len() int {
- l := rr.Hdr.len()
+func (rr *GPOS) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += len(rr.Longitude) + 1
l += len(rr.Latitude) + 1
l += len(rr.Altitude) + 1
return l
}
-func (rr *HINFO) len() int {
- l := rr.Hdr.len()
+func (rr *HINFO) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += len(rr.Cpu) + 1
l += len(rr.Os) + 1
return l
}
-func (rr *HIP) len() int {
- l := rr.Hdr.len()
+func (rr *HIP) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l++ // HitLength
l++ // PublicKeyAlgorithm
l += 2 // PublicKeyLength
l += len(rr.Hit) / 2
l += base64.StdEncoding.DecodedLen(len(rr.PublicKey))
for _, x := range rr.RendezvousServers {
- l += len(x) + 1
+ l += domainNameLen(x, off+l, compression, false)
}
return l
}
-func (rr *KX) len() int {
- l := rr.Hdr.len()
+func (rr *KX) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // Preference
- l += len(rr.Exchanger) + 1
+ l += domainNameLen(rr.Exchanger, off+l, compression, false)
return l
}
-func (rr *L32) len() int {
- l := rr.Hdr.len()
- l += 2 // Preference
- l += net.IPv4len // Locator32
+func (rr *L32) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += 2 // Preference
+ if len(rr.Locator32) != 0 {
+ l += net.IPv4len
+ }
return l
}
-func (rr *L64) len() int {
- l := rr.Hdr.len()
+func (rr *L64) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // Preference
l += 8 // Locator64
return l
}
-func (rr *LOC) len() int {
- l := rr.Hdr.len()
+func (rr *LOC) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l++ // Version
l++ // Size
l++ // HorizPre
@@ -383,89 +391,89 @@ func (rr *LOC) len() int {
l += 4 // Altitude
return l
}
-func (rr *LP) len() int {
- l := rr.Hdr.len()
+func (rr *LP) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // Preference
- l += len(rr.Fqdn) + 1
+ l += domainNameLen(rr.Fqdn, off+l, compression, false)
return l
}
-func (rr *MB) len() int {
- l := rr.Hdr.len()
- l += len(rr.Mb) + 1
+func (rr *MB) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Mb, off+l, compression, true)
return l
}
-func (rr *MD) len() int {
- l := rr.Hdr.len()
- l += len(rr.Md) + 1
+func (rr *MD) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Md, off+l, compression, true)
return l
}
-func (rr *MF) len() int {
- l := rr.Hdr.len()
- l += len(rr.Mf) + 1
+func (rr *MF) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Mf, off+l, compression, true)
return l
}
-func (rr *MG) len() int {
- l := rr.Hdr.len()
- l += len(rr.Mg) + 1
+func (rr *MG) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Mg, off+l, compression, true)
return l
}
-func (rr *MINFO) len() int {
- l := rr.Hdr.len()
- l += len(rr.Rmail) + 1
- l += len(rr.Email) + 1
+func (rr *MINFO) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Rmail, off+l, compression, true)
+ l += domainNameLen(rr.Email, off+l, compression, true)
return l
}
-func (rr *MR) len() int {
- l := rr.Hdr.len()
- l += len(rr.Mr) + 1
+func (rr *MR) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Mr, off+l, compression, true)
return l
}
-func (rr *MX) len() int {
- l := rr.Hdr.len()
+func (rr *MX) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // Preference
- l += len(rr.Mx) + 1
+ l += domainNameLen(rr.Mx, off+l, compression, true)
return l
}
-func (rr *NAPTR) len() int {
- l := rr.Hdr.len()
+func (rr *NAPTR) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // Order
l += 2 // Preference
l += len(rr.Flags) + 1
l += len(rr.Service) + 1
l += len(rr.Regexp) + 1
- l += len(rr.Replacement) + 1
+ l += domainNameLen(rr.Replacement, off+l, compression, false)
return l
}
-func (rr *NID) len() int {
- l := rr.Hdr.len()
+func (rr *NID) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // Preference
l += 8 // NodeID
return l
}
-func (rr *NIMLOC) len() int {
- l := rr.Hdr.len()
- l += len(rr.Locator)/2 + 1
+func (rr *NIMLOC) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += len(rr.Locator) / 2
return l
}
-func (rr *NINFO) len() int {
- l := rr.Hdr.len()
+func (rr *NINFO) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
for _, x := range rr.ZSData {
l += len(x) + 1
}
return l
}
-func (rr *NS) len() int {
- l := rr.Hdr.len()
- l += len(rr.Ns) + 1
+func (rr *NS) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Ns, off+l, compression, true)
return l
}
-func (rr *NSAPPTR) len() int {
- l := rr.Hdr.len()
- l += len(rr.Ptr) + 1
+func (rr *NSAPPTR) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Ptr, off+l, compression, false)
return l
}
-func (rr *NSEC3PARAM) len() int {
- l := rr.Hdr.len()
+func (rr *NSEC3PARAM) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l++ // Hash
l++ // Flags
l += 2 // Iterations
@@ -473,44 +481,49 @@ func (rr *NSEC3PARAM) len() int {
l += len(rr.Salt) / 2
return l
}
-func (rr *OPENPGPKEY) len() int {
- l := rr.Hdr.len()
+func (rr *NULL) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += len(rr.Data)
+ return l
+}
+func (rr *OPENPGPKEY) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += base64.StdEncoding.DecodedLen(len(rr.PublicKey))
return l
}
-func (rr *PTR) len() int {
- l := rr.Hdr.len()
- l += len(rr.Ptr) + 1
+func (rr *PTR) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Ptr, off+l, compression, true)
return l
}
-func (rr *PX) len() int {
- l := rr.Hdr.len()
+func (rr *PX) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // Preference
- l += len(rr.Map822) + 1
- l += len(rr.Mapx400) + 1
+ l += domainNameLen(rr.Map822, off+l, compression, false)
+ l += domainNameLen(rr.Mapx400, off+l, compression, false)
return l
}
-func (rr *RFC3597) len() int {
- l := rr.Hdr.len()
- l += len(rr.Rdata)/2 + 1
+func (rr *RFC3597) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += len(rr.Rdata) / 2
return l
}
-func (rr *RKEY) len() int {
- l := rr.Hdr.len()
+func (rr *RKEY) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // Flags
l++ // Protocol
l++ // Algorithm
l += base64.StdEncoding.DecodedLen(len(rr.PublicKey))
return l
}
-func (rr *RP) len() int {
- l := rr.Hdr.len()
- l += len(rr.Mbox) + 1
- l += len(rr.Txt) + 1
+func (rr *RP) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Mbox, off+l, compression, false)
+ l += domainNameLen(rr.Txt, off+l, compression, false)
return l
}
-func (rr *RRSIG) len() int {
- l := rr.Hdr.len()
+func (rr *RRSIG) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // TypeCovered
l++ // Algorithm
l++ // Labels
@@ -518,28 +531,28 @@ func (rr *RRSIG) len() int {
l += 4 // Expiration
l += 4 // Inception
l += 2 // KeyTag
- l += len(rr.SignerName) + 1
+ l += domainNameLen(rr.SignerName, off+l, compression, false)
l += base64.StdEncoding.DecodedLen(len(rr.Signature))
return l
}
-func (rr *RT) len() int {
- l := rr.Hdr.len()
+func (rr *RT) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // Preference
- l += len(rr.Host) + 1
+ l += domainNameLen(rr.Host, off+l, compression, false)
return l
}
-func (rr *SMIMEA) len() int {
- l := rr.Hdr.len()
+func (rr *SMIMEA) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l++ // Usage
l++ // Selector
l++ // MatchingType
- l += len(rr.Certificate)/2 + 1
+ l += len(rr.Certificate) / 2
return l
}
-func (rr *SOA) len() int {
- l := rr.Hdr.len()
- l += len(rr.Ns) + 1
- l += len(rr.Mbox) + 1
+func (rr *SOA) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Ns, off+l, compression, true)
+ l += domainNameLen(rr.Mbox, off+l, compression, true)
l += 4 // Serial
l += 4 // Refresh
l += 4 // Retry
@@ -547,45 +560,45 @@ func (rr *SOA) len() int {
l += 4 // Minttl
return l
}
-func (rr *SPF) len() int {
- l := rr.Hdr.len()
+func (rr *SPF) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
for _, x := range rr.Txt {
l += len(x) + 1
}
return l
}
-func (rr *SRV) len() int {
- l := rr.Hdr.len()
+func (rr *SRV) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // Priority
l += 2 // Weight
l += 2 // Port
- l += len(rr.Target) + 1
+ l += domainNameLen(rr.Target, off+l, compression, false)
return l
}
-func (rr *SSHFP) len() int {
- l := rr.Hdr.len()
+func (rr *SSHFP) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l++ // Algorithm
l++ // Type
- l += len(rr.FingerPrint)/2 + 1
+ l += len(rr.FingerPrint) / 2
return l
}
-func (rr *TA) len() int {
- l := rr.Hdr.len()
+func (rr *TA) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // KeyTag
l++ // Algorithm
l++ // DigestType
- l += len(rr.Digest)/2 + 1
+ l += len(rr.Digest) / 2
return l
}
-func (rr *TALINK) len() int {
- l := rr.Hdr.len()
- l += len(rr.PreviousName) + 1
- l += len(rr.NextName) + 1
+func (rr *TALINK) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.PreviousName, off+l, compression, false)
+ l += domainNameLen(rr.NextName, off+l, compression, false)
return l
}
-func (rr *TKEY) len() int {
- l := rr.Hdr.len()
- l += len(rr.Algorithm) + 1
+func (rr *TKEY) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Algorithm, off+l, compression, false)
l += 4 // Inception
l += 4 // Expiration
l += 2 // Mode
@@ -596,17 +609,17 @@ func (rr *TKEY) len() int {
l += len(rr.OtherData) / 2
return l
}
-func (rr *TLSA) len() int {
- l := rr.Hdr.len()
+func (rr *TLSA) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l++ // Usage
l++ // Selector
l++ // MatchingType
- l += len(rr.Certificate)/2 + 1
+ l += len(rr.Certificate) / 2
return l
}
-func (rr *TSIG) len() int {
- l := rr.Hdr.len()
- l += len(rr.Algorithm) + 1
+func (rr *TSIG) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
+ l += domainNameLen(rr.Algorithm, off+l, compression, false)
l += 6 // TimeSigned
l += 2 // Fudge
l += 2 // MACSize
@@ -617,32 +630,32 @@ func (rr *TSIG) len() int {
l += len(rr.OtherData) / 2
return l
}
-func (rr *TXT) len() int {
- l := rr.Hdr.len()
+func (rr *TXT) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
for _, x := range rr.Txt {
l += len(x) + 1
}
return l
}
-func (rr *UID) len() int {
- l := rr.Hdr.len()
+func (rr *UID) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 4 // Uid
return l
}
-func (rr *UINFO) len() int {
- l := rr.Hdr.len()
+func (rr *UINFO) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += len(rr.Uinfo) + 1
return l
}
-func (rr *URI) len() int {
- l := rr.Hdr.len()
+func (rr *URI) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += 2 // Priority
l += 2 // Weight
l += len(rr.Target)
return l
}
-func (rr *X25) len() int {
- l := rr.Hdr.len()
+func (rr *X25) len(off int, compression map[string]struct{}) int {
+ l := rr.Hdr.len(off, compression)
l += len(rr.PSDNAddress) + 1
return l
}
@@ -783,12 +796,17 @@ func (rr *NSEC3) copy() RR {
func (rr *NSEC3PARAM) copy() RR {
return &NSEC3PARAM{rr.Hdr, rr.Hash, rr.Flags, rr.Iterations, rr.SaltLength, rr.Salt}
}
+func (rr *NULL) copy() RR {
+ return &NULL{rr.Hdr, rr.Data}
+}
func (rr *OPENPGPKEY) copy() RR {
return &OPENPGPKEY{rr.Hdr, rr.PublicKey}
}
func (rr *OPT) copy() RR {
Option := make([]EDNS0, len(rr.Option))
- copy(Option, rr.Option)
+ for i, e := range rr.Option {
+ Option[i] = e.copy()
+ }
return &OPT{rr.Hdr, Option}
}
func (rr *PTR) copy() RR {
diff --git a/vendor/golang.org/x/crypto/internal/chacha20/asm_ppc64le.s b/vendor/golang.org/x/crypto/internal/chacha20/asm_ppc64le.s
index cde3fc989b..bc9b562489 100644
--- a/vendor/golang.org/x/crypto/internal/chacha20/asm_ppc64le.s
+++ b/vendor/golang.org/x/crypto/internal/chacha20/asm_ppc64le.s
@@ -10,15 +10,14 @@
// # details see http://www.openssl.org/~appro/cryptogams/.
// # ====================================================================
-// Original code can be found at the link below:
-// https://github.com/dot-asm/cryptogams/commit/a60f5b50ed908e91e5c39ca79126a4a876d5d8ff
+// Code for the perl script that generates the ppc64 assembler
+// can be found in the cryptogams repository at the link below. It is based on
+// the original from openssl.
-// There are some differences between CRYPTOGAMS code and this one. The round
-// loop for "_int" isn't the same as the original. Some adjustments were
-// necessary because there are less vector registers available. For example, some
-// X variables (r12, r13, r14, and r15) share the same register used by the
-// counter. The original code uses ctr to name the counter. Here we use CNT
-// because golang uses CTR as the counter register name.
+// https://github.com/dot-asm/cryptogams/commit/a60f5b50ed908e91
+
+// The differences in this and the original implementation are
+// due to the calling conventions and initialization of constants.
// +build ppc64le,!gccgo,!appengine
@@ -29,8 +28,9 @@
#define LEN R5
#define KEY R6
#define CNT R7
+#define TMP R15
-#define TEMP R8
+#define CONSTBASE R16
#define X0 R11
#define X1 R12
@@ -49,620 +49,417 @@
#define X14 R26
#define X15 R27
-#define CON0 X0
-#define CON1 X1
-#define CON2 X2
-#define CON3 X3
-#define KEY0 X4
-#define KEY1 X5
-#define KEY2 X6
-#define KEY3 X7
-#define KEY4 X8
-#define KEY5 X9
-#define KEY6 X10
-#define KEY7 X11
+DATA consts<>+0x00(SB)/8, $0x3320646e61707865
+DATA consts<>+0x08(SB)/8, $0x6b20657479622d32
+DATA consts<>+0x10(SB)/8, $0x0000000000000001
+DATA consts<>+0x18(SB)/8, $0x0000000000000000
+DATA consts<>+0x20(SB)/8, $0x0000000000000004
+DATA consts<>+0x28(SB)/8, $0x0000000000000000
+DATA consts<>+0x30(SB)/8, $0x0a0b08090e0f0c0d
+DATA consts<>+0x38(SB)/8, $0x0203000106070405
+DATA consts<>+0x40(SB)/8, $0x090a0b080d0e0f0c
+DATA consts<>+0x48(SB)/8, $0x0102030005060704
+DATA consts<>+0x50(SB)/8, $0x6170786561707865
+DATA consts<>+0x58(SB)/8, $0x6170786561707865
+DATA consts<>+0x60(SB)/8, $0x3320646e3320646e
+DATA consts<>+0x68(SB)/8, $0x3320646e3320646e
+DATA consts<>+0x70(SB)/8, $0x79622d3279622d32
+DATA consts<>+0x78(SB)/8, $0x79622d3279622d32
+DATA consts<>+0x80(SB)/8, $0x6b2065746b206574
+DATA consts<>+0x88(SB)/8, $0x6b2065746b206574
+DATA consts<>+0x90(SB)/8, $0x0000000100000000
+DATA consts<>+0x98(SB)/8, $0x0000000300000002
+GLOBL consts<>(SB), RODATA, $0xa0
-#define CNT0 X12
-#define CNT1 X13
-#define CNT2 X14
-#define CNT3 X15
-
-#define TMP0 R9
-#define TMP1 R10
-#define TMP2 R28
-#define TMP3 R29
-
-#define CONSTS R8
-
-#define A0 V0
-#define B0 V1
-#define C0 V2
-#define D0 V3
-#define A1 V4
-#define B1 V5
-#define C1 V6
-#define D1 V7
-#define A2 V8
-#define B2 V9
-#define C2 V10
-#define D2 V11
-#define T0 V12
-#define T1 V13
-#define T2 V14
-
-#define K0 V15
-#define K1 V16
-#define K2 V17
-#define K3 V18
-#define K4 V19
-#define K5 V20
-
-#define FOUR V21
-#define SIXTEEN V22
-#define TWENTY4 V23
-#define TWENTY V24
-#define TWELVE V25
-#define TWENTY5 V26
-#define SEVEN V27
-
-#define INPPERM V28
-#define OUTPERM V29
-#define OUTMASK V30
-
-#define DD0 V31
-#define DD1 SEVEN
-#define DD2 T0
-#define DD3 T1
-#define DD4 T2
-
-DATA ·consts+0x00(SB)/8, $0x3320646e61707865
-DATA ·consts+0x08(SB)/8, $0x6b20657479622d32
-DATA ·consts+0x10(SB)/8, $0x0000000000000001
-DATA ·consts+0x18(SB)/8, $0x0000000000000000
-DATA ·consts+0x20(SB)/8, $0x0000000000000004
-DATA ·consts+0x28(SB)/8, $0x0000000000000000
-DATA ·consts+0x30(SB)/8, $0x0a0b08090e0f0c0d
-DATA ·consts+0x38(SB)/8, $0x0203000106070405
-DATA ·consts+0x40(SB)/8, $0x090a0b080d0e0f0c
-DATA ·consts+0x48(SB)/8, $0x0102030005060704
-GLOBL ·consts(SB), RODATA, $80
-
-//func chaCha20_ctr32_vmx(out, inp *byte, len int, key *[32]byte, counter *[16]byte)
-TEXT ·chaCha20_ctr32_vmx(SB),NOSPLIT|NOFRAME,$0
- // Load the arguments inside the registers
+//func chaCha20_ctr32_vsx(out, inp *byte, len int, key *[8]uint32, counter *uint32)
+TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40
MOVD out+0(FP), OUT
MOVD inp+8(FP), INP
MOVD len+16(FP), LEN
MOVD key+24(FP), KEY
MOVD counter+32(FP), CNT
- MOVD $·consts(SB), CONSTS // point to consts addr
+ // Addressing for constants
+ MOVD $consts<>+0x00(SB), CONSTBASE
+ MOVD $16, R8
+ MOVD $32, R9
+ MOVD $48, R10
+ MOVD $64, R11
+ // V16
+ LXVW4X (CONSTBASE)(R0), VS48
+ ADD $80,CONSTBASE
- MOVD $16, X0
- MOVD $32, X1
- MOVD $48, X2
- MOVD $64, X3
- MOVD $31, X4
- MOVD $15, X5
+ // Load key into V17,V18
+ LXVW4X (KEY)(R0), VS49
+ LXVW4X (KEY)(R8), VS50
- // Load key
- LVX (KEY)(R0), K1
- LVSR (KEY)(R0), T0
- LVX (KEY)(X0), K2
- LVX (KEY)(X4), DD0
+ // Load CNT, NONCE into V19
+ LXVW4X (CNT)(R0), VS51
- // Load counter
- LVX (CNT)(R0), K3
- LVSR (CNT)(R0), T1
- LVX (CNT)(X5), DD1
+ // Clear V27
+ VXOR V27, V27, V27
- // Load constants
- LVX (CONSTS)(R0), K0
- LVX (CONSTS)(X0), K5
- LVX (CONSTS)(X1), FOUR
- LVX (CONSTS)(X2), SIXTEEN
- LVX (CONSTS)(X3), TWENTY4
+ // V28
+ LXVW4X (CONSTBASE)(R11), VS60
- // Align key and counter
- VPERM K2, K1, T0, K1
- VPERM DD0, K2, T0, K2
- VPERM DD1, K3, T1, K3
+ // splat slot from V19 -> V26
+ VSPLTW $0, V19, V26
- // Load counter to GPR
- MOVWZ 0(CNT), CNT0
- MOVWZ 4(CNT), CNT1
- MOVWZ 8(CNT), CNT2
- MOVWZ 12(CNT), CNT3
+ VSLDOI $4, V19, V27, V19
+ VSLDOI $12, V27, V19, V19
- // Adjust vectors for the initial state
- VADDUWM K3, K5, K3
- VADDUWM K3, K5, K4
- VADDUWM K4, K5, K5
+ VADDUWM V26, V28, V26
- // Synthesized constants
- VSPLTISW $-12, TWENTY
- VSPLTISW $12, TWELVE
- VSPLTISW $-7, TWENTY5
+ MOVD $10, R14
+ MOVD R14, CTR
- VXOR T0, T0, T0
- VSPLTISW $-1, OUTMASK
- LVSR (INP)(R0), INPPERM
- LVSL (OUT)(R0), OUTPERM
- VPERM OUTMASK, T0, OUTPERM, OUTMASK
+loop_outer_vsx:
+ // V0, V1, V2, V3
+ LXVW4X (R0)(CONSTBASE), VS32
+ LXVW4X (R8)(CONSTBASE), VS33
+ LXVW4X (R9)(CONSTBASE), VS34
+ LXVW4X (R10)(CONSTBASE), VS35
-loop_outer_vmx:
- // Load constant
- MOVD $0x61707865, CON0
- MOVD $0x3320646e, CON1
- MOVD $0x79622d32, CON2
- MOVD $0x6b206574, CON3
+ // splat values from V17, V18 into V4-V11
+ VSPLTW $0, V17, V4
+ VSPLTW $1, V17, V5
+ VSPLTW $2, V17, V6
+ VSPLTW $3, V17, V7
+ VSPLTW $0, V18, V8
+ VSPLTW $1, V18, V9
+ VSPLTW $2, V18, V10
+ VSPLTW $3, V18, V11
- VOR K0, K0, A0
- VOR K0, K0, A1
- VOR K0, K0, A2
- VOR K1, K1, B0
+ // VOR
+ VOR V26, V26, V12
- MOVD $10, TEMP
+ // splat values from V19 -> V13, V14, V15
+ VSPLTW $1, V19, V13
+ VSPLTW $2, V19, V14
+ VSPLTW $3, V19, V15
- // Load key to GPR
- MOVWZ 0(KEY), X4
- MOVWZ 4(KEY), X5
- MOVWZ 8(KEY), X6
- MOVWZ 12(KEY), X7
- VOR K1, K1, B1
- VOR K1, K1, B2
- MOVWZ 16(KEY), X8
- MOVWZ 0(CNT), X12
- MOVWZ 20(KEY), X9
- MOVWZ 4(CNT), X13
- VOR K2, K2, C0
- VOR K2, K2, C1
- MOVWZ 24(KEY), X10
- MOVWZ 8(CNT), X14
- VOR K2, K2, C2
- VOR K3, K3, D0
- MOVWZ 28(KEY), X11
- MOVWZ 12(CNT), X15
- VOR K4, K4, D1
- VOR K5, K5, D2
+ // splat const values
+ VSPLTISW $-16, V27
+ VSPLTISW $12, V28
+ VSPLTISW $8, V29
+ VSPLTISW $7, V30
- MOVD X4, TMP0
- MOVD X5, TMP1
- MOVD X6, TMP2
- MOVD X7, TMP3
- VSPLTISW $7, SEVEN
+loop_vsx:
+ VADDUWM V0, V4, V0
+ VADDUWM V1, V5, V1
+ VADDUWM V2, V6, V2
+ VADDUWM V3, V7, V3
- MOVD TEMP, CTR
+ VXOR V12, V0, V12
+ VXOR V13, V1, V13
+ VXOR V14, V2, V14
+ VXOR V15, V3, V15
-loop_vmx:
- // CRYPTOGAMS uses a macro to create a loop using perl. This isn't possible
- // using assembly macros. Therefore, the macro expansion result was used
- // in order to maintain the algorithm efficiency.
- // This loop generates three keystream blocks using VMX instructions and,
- // in parallel, one keystream block using scalar instructions.
- ADD X4, X0, X0
- ADD X5, X1, X1
- VADDUWM A0, B0, A0
- VADDUWM A1, B1, A1
- ADD X6, X2, X2
- ADD X7, X3, X3
- VADDUWM A2, B2, A2
- VXOR D0, A0, D0
- XOR X0, X12, X12
- XOR X1, X13, X13
- VXOR D1, A1, D1
- VXOR D2, A2, D2
- XOR X2, X14, X14
- XOR X3, X15, X15
- VPERM D0, D0, SIXTEEN, D0
- VPERM D1, D1, SIXTEEN, D1
- ROTLW $16, X12, X12
- ROTLW $16, X13, X13
- VPERM D2, D2, SIXTEEN, D2
- VADDUWM C0, D0, C0
- ROTLW $16, X14, X14
- ROTLW $16, X15, X15
- VADDUWM C1, D1, C1
- VADDUWM C2, D2, C2
- ADD X12, X8, X8
- ADD X13, X9, X9
- VXOR B0, C0, T0
- VXOR B1, C1, T1
- ADD X14, X10, X10
- ADD X15, X11, X11
- VXOR B2, C2, T2
- VRLW T0, TWELVE, B0
- XOR X8, X4, X4
- XOR X9, X5, X5
- VRLW T1, TWELVE, B1
- VRLW T2, TWELVE, B2
- XOR X10, X6, X6
- XOR X11, X7, X7
- VADDUWM A0, B0, A0
- VADDUWM A1, B1, A1
- ROTLW $12, X4, X4
- ROTLW $12, X5, X5
- VADDUWM A2, B2, A2
- VXOR D0, A0, D0
- ROTLW $12, X6, X6
- ROTLW $12, X7, X7
- VXOR D1, A1, D1
- VXOR D2, A2, D2
- ADD X4, X0, X0
- ADD X5, X1, X1
- VPERM D0, D0, TWENTY4, D0
- VPERM D1, D1, TWENTY4, D1
- ADD X6, X2, X2
- ADD X7, X3, X3
- VPERM D2, D2, TWENTY4, D2
- VADDUWM C0, D0, C0
- XOR X0, X12, X12
- XOR X1, X13, X13
- VADDUWM C1, D1, C1
- VADDUWM C2, D2, C2
- XOR X2, X14, X14
- XOR X3, X15, X15
- VXOR B0, C0, T0
- VXOR B1, C1, T1
- ROTLW $8, X12, X12
- ROTLW $8, X13, X13
- VXOR B2, C2, T2
- VRLW T0, SEVEN, B0
- ROTLW $8, X14, X14
- ROTLW $8, X15, X15
- VRLW T1, SEVEN, B1
- VRLW T2, SEVEN, B2
- ADD X12, X8, X8
- ADD X13, X9, X9
- VSLDOI $8, C0, C0, C0
- VSLDOI $8, C1, C1, C1
- ADD X14, X10, X10
- ADD X15, X11, X11
- VSLDOI $8, C2, C2, C2
- VSLDOI $12, B0, B0, B0
- XOR X8, X4, X4
- XOR X9, X5, X5
- VSLDOI $12, B1, B1, B1
- VSLDOI $12, B2, B2, B2
- XOR X10, X6, X6
- XOR X11, X7, X7
- VSLDOI $4, D0, D0, D0
- VSLDOI $4, D1, D1, D1
- ROTLW $7, X4, X4
- ROTLW $7, X5, X5
- VSLDOI $4, D2, D2, D2
- VADDUWM A0, B0, A0
- ROTLW $7, X6, X6
- ROTLW $7, X7, X7
- VADDUWM A1, B1, A1
- VADDUWM A2, B2, A2
- ADD X5, X0, X0
- ADD X6, X1, X1
- VXOR D0, A0, D0
- VXOR D1, A1, D1
- ADD X7, X2, X2
- ADD X4, X3, X3
- VXOR D2, A2, D2
- VPERM D0, D0, SIXTEEN, D0
- XOR X0, X15, X15
- XOR X1, X12, X12
- VPERM D1, D1, SIXTEEN, D1
- VPERM D2, D2, SIXTEEN, D2
- XOR X2, X13, X13
- XOR X3, X14, X14
- VADDUWM C0, D0, C0
- VADDUWM C1, D1, C1
- ROTLW $16, X15, X15
- ROTLW $16, X12, X12
- VADDUWM C2, D2, C2
- VXOR B0, C0, T0
- ROTLW $16, X13, X13
- ROTLW $16, X14, X14
- VXOR B1, C1, T1
- VXOR B2, C2, T2
- ADD X15, X10, X10
- ADD X12, X11, X11
- VRLW T0, TWELVE, B0
- VRLW T1, TWELVE, B1
- ADD X13, X8, X8
- ADD X14, X9, X9
- VRLW T2, TWELVE, B2
- VADDUWM A0, B0, A0
- XOR X10, X5, X5
- XOR X11, X6, X6
- VADDUWM A1, B1, A1
- VADDUWM A2, B2, A2
- XOR X8, X7, X7
- XOR X9, X4, X4
- VXOR D0, A0, D0
- VXOR D1, A1, D1
- ROTLW $12, X5, X5
- ROTLW $12, X6, X6
- VXOR D2, A2, D2
- VPERM D0, D0, TWENTY4, D0
- ROTLW $12, X7, X7
- ROTLW $12, X4, X4
- VPERM D1, D1, TWENTY4, D1
- VPERM D2, D2, TWENTY4, D2
- ADD X5, X0, X0
- ADD X6, X1, X1
- VADDUWM C0, D0, C0
- VADDUWM C1, D1, C1
- ADD X7, X2, X2
- ADD X4, X3, X3
- VADDUWM C2, D2, C2
- VXOR B0, C0, T0
- XOR X0, X15, X15
- XOR X1, X12, X12
- VXOR B1, C1, T1
- VXOR B2, C2, T2
- XOR X2, X13, X13
- XOR X3, X14, X14
- VRLW T0, SEVEN, B0
- VRLW T1, SEVEN, B1
- ROTLW $8, X15, X15
- ROTLW $8, X12, X12
- VRLW T2, SEVEN, B2
- VSLDOI $8, C0, C0, C0
- ROTLW $8, X13, X13
- ROTLW $8, X14, X14
- VSLDOI $8, C1, C1, C1
- VSLDOI $8, C2, C2, C2
- ADD X15, X10, X10
- ADD X12, X11, X11
- VSLDOI $4, B0, B0, B0
- VSLDOI $4, B1, B1, B1
- ADD X13, X8, X8
- ADD X14, X9, X9
- VSLDOI $4, B2, B2, B2
- VSLDOI $12, D0, D0, D0
- XOR X10, X5, X5
- XOR X11, X6, X6
- VSLDOI $12, D1, D1, D1
- VSLDOI $12, D2, D2, D2
- XOR X8, X7, X7
- XOR X9, X4, X4
- ROTLW $7, X5, X5
- ROTLW $7, X6, X6
- ROTLW $7, X7, X7
- ROTLW $7, X4, X4
- BC 0x10, 0, loop_vmx
+ VRLW V12, V27, V12
+ VRLW V13, V27, V13
+ VRLW V14, V27, V14
+ VRLW V15, V27, V15
- SUB $256, LEN, LEN
+ VADDUWM V8, V12, V8
+ VADDUWM V9, V13, V9
+ VADDUWM V10, V14, V10
+ VADDUWM V11, V15, V11
- // Accumulate key block
- ADD $0x61707865, X0, X0
- ADD $0x3320646e, X1, X1
- ADD $0x79622d32, X2, X2
- ADD $0x6b206574, X3, X3
- ADD TMP0, X4, X4
- ADD TMP1, X5, X5
- ADD TMP2, X6, X6
- ADD TMP3, X7, X7
- MOVWZ 16(KEY), TMP0
- MOVWZ 20(KEY), TMP1
- MOVWZ 24(KEY), TMP2
- MOVWZ 28(KEY), TMP3
- ADD TMP0, X8, X8
- ADD TMP1, X9, X9
- ADD TMP2, X10, X10
- ADD TMP3, X11, X11
+ VXOR V4, V8, V4
+ VXOR V5, V9, V5
+ VXOR V6, V10, V6
+ VXOR V7, V11, V7
- MOVWZ 12(CNT), TMP0
- MOVWZ 8(CNT), TMP1
- MOVWZ 4(CNT), TMP2
- MOVWZ 0(CNT), TEMP
- ADD TMP0, X15, X15
- ADD TMP1, X14, X14
- ADD TMP2, X13, X13
- ADD TEMP, X12, X12
+ VRLW V4, V28, V4
+ VRLW V5, V28, V5
+ VRLW V6, V28, V6
+ VRLW V7, V28, V7
- // Accumulate key block
- VADDUWM A0, K0, A0
- VADDUWM A1, K0, A1
- VADDUWM A2, K0, A2
- VADDUWM B0, K1, B0
- VADDUWM B1, K1, B1
- VADDUWM B2, K1, B2
- VADDUWM C0, K2, C0
- VADDUWM C1, K2, C1
- VADDUWM C2, K2, C2
- VADDUWM D0, K3, D0
- VADDUWM D1, K4, D1
- VADDUWM D2, K5, D2
+ VADDUWM V0, V4, V0
+ VADDUWM V1, V5, V1
+ VADDUWM V2, V6, V2
+ VADDUWM V3, V7, V3
- // Increment counter
- ADD $4, TEMP, TEMP
- MOVW TEMP, 0(CNT)
+ VXOR V12, V0, V12
+ VXOR V13, V1, V13
+ VXOR V14, V2, V14
+ VXOR V15, V3, V15
- VADDUWM K3, FOUR, K3
- VADDUWM K4, FOUR, K4
- VADDUWM K5, FOUR, K5
+ VRLW V12, V29, V12
+ VRLW V13, V29, V13
+ VRLW V14, V29, V14
+ VRLW V15, V29, V15
- // XOR the input slice (INP) with the keystream, which is stored in GPRs (X0-X3).
+ VADDUWM V8, V12, V8
+ VADDUWM V9, V13, V9
+ VADDUWM V10, V14, V10
+ VADDUWM V11, V15, V11
- // Load input (aligned or not)
- MOVWZ 0(INP), TMP0
- MOVWZ 4(INP), TMP1
- MOVWZ 8(INP), TMP2
- MOVWZ 12(INP), TMP3
+ VXOR V4, V8, V4
+ VXOR V5, V9, V5
+ VXOR V6, V10, V6
+ VXOR V7, V11, V7
- // XOR with input
- XOR TMP0, X0, X0
- XOR TMP1, X1, X1
- XOR TMP2, X2, X2
- XOR TMP3, X3, X3
- MOVWZ 16(INP), TMP0
- MOVWZ 20(INP), TMP1
- MOVWZ 24(INP), TMP2
- MOVWZ 28(INP), TMP3
- XOR TMP0, X4, X4
- XOR TMP1, X5, X5
- XOR TMP2, X6, X6
- XOR TMP3, X7, X7
- MOVWZ 32(INP), TMP0
- MOVWZ 36(INP), TMP1
- MOVWZ 40(INP), TMP2
- MOVWZ 44(INP), TMP3
- XOR TMP0, X8, X8
- XOR TMP1, X9, X9
- XOR TMP2, X10, X10
- XOR TMP3, X11, X11
- MOVWZ 48(INP), TMP0
- MOVWZ 52(INP), TMP1
- MOVWZ 56(INP), TMP2
- MOVWZ 60(INP), TMP3
- XOR TMP0, X12, X12
- XOR TMP1, X13, X13
- XOR TMP2, X14, X14
- XOR TMP3, X15, X15
+ VRLW V4, V30, V4
+ VRLW V5, V30, V5
+ VRLW V6, V30, V6
+ VRLW V7, V30, V7
- // Store output (aligned or not)
- MOVW X0, 0(OUT)
- MOVW X1, 4(OUT)
- MOVW X2, 8(OUT)
- MOVW X3, 12(OUT)
+ VADDUWM V0, V5, V0
+ VADDUWM V1, V6, V1
+ VADDUWM V2, V7, V2
+ VADDUWM V3, V4, V3
- ADD $64, INP, INP // INP points to the end of the slice for the alignment code below
+ VXOR V15, V0, V15
+ VXOR V12, V1, V12
+ VXOR V13, V2, V13
+ VXOR V14, V3, V14
- MOVW X4, 16(OUT)
- MOVD $16, TMP0
- MOVW X5, 20(OUT)
- MOVD $32, TMP1
- MOVW X6, 24(OUT)
- MOVD $48, TMP2
- MOVW X7, 28(OUT)
- MOVD $64, TMP3
- MOVW X8, 32(OUT)
- MOVW X9, 36(OUT)
- MOVW X10, 40(OUT)
- MOVW X11, 44(OUT)
- MOVW X12, 48(OUT)
- MOVW X13, 52(OUT)
- MOVW X14, 56(OUT)
- MOVW X15, 60(OUT)
- ADD $64, OUT, OUT
+ VRLW V15, V27, V15
+ VRLW V12, V27, V12
+ VRLW V13, V27, V13
+ VRLW V14, V27, V14
- // Load input
- LVX (INP)(R0), DD0
- LVX (INP)(TMP0), DD1
- LVX (INP)(TMP1), DD2
- LVX (INP)(TMP2), DD3
- LVX (INP)(TMP3), DD4
- ADD $64, INP, INP
+ VADDUWM V10, V15, V10
+ VADDUWM V11, V12, V11
+ VADDUWM V8, V13, V8
+ VADDUWM V9, V14, V9
- VPERM DD1, DD0, INPPERM, DD0 // Align input
- VPERM DD2, DD1, INPPERM, DD1
- VPERM DD3, DD2, INPPERM, DD2
- VPERM DD4, DD3, INPPERM, DD3
- VXOR A0, DD0, A0 // XOR with input
- VXOR B0, DD1, B0
- LVX (INP)(TMP0), DD1 // Keep loading input
- VXOR C0, DD2, C0
- LVX (INP)(TMP1), DD2
- VXOR D0, DD3, D0
- LVX (INP)(TMP2), DD3
- LVX (INP)(TMP3), DD0
- ADD $64, INP, INP
- MOVD $63, TMP3 // 63 is not a typo
- VPERM A0, A0, OUTPERM, A0
- VPERM B0, B0, OUTPERM, B0
- VPERM C0, C0, OUTPERM, C0
- VPERM D0, D0, OUTPERM, D0
+ VXOR V5, V10, V5
+ VXOR V6, V11, V6
+ VXOR V7, V8, V7
+ VXOR V4, V9, V4
- VPERM DD1, DD4, INPPERM, DD4 // Align input
- VPERM DD2, DD1, INPPERM, DD1
- VPERM DD3, DD2, INPPERM, DD2
- VPERM DD0, DD3, INPPERM, DD3
- VXOR A1, DD4, A1
- VXOR B1, DD1, B1
- LVX (INP)(TMP0), DD1 // Keep loading
- VXOR C1, DD2, C1
- LVX (INP)(TMP1), DD2
- VXOR D1, DD3, D1
- LVX (INP)(TMP2), DD3
+ VRLW V5, V28, V5
+ VRLW V6, V28, V6
+ VRLW V7, V28, V7
+ VRLW V4, V28, V4
- // Note that the LVX address is always rounded down to the nearest 16-byte
- // boundary, and that it always points to at most 15 bytes beyond the end of
- // the slice, so we cannot cross a page boundary.
- LVX (INP)(TMP3), DD4 // Redundant in aligned case.
- ADD $64, INP, INP
- VPERM A1, A1, OUTPERM, A1 // Pre-misalign output
- VPERM B1, B1, OUTPERM, B1
- VPERM C1, C1, OUTPERM, C1
- VPERM D1, D1, OUTPERM, D1
+ VADDUWM V0, V5, V0
+ VADDUWM V1, V6, V1
+ VADDUWM V2, V7, V2
+ VADDUWM V3, V4, V3
- VPERM DD1, DD0, INPPERM, DD0 // Align Input
- VPERM DD2, DD1, INPPERM, DD1
- VPERM DD3, DD2, INPPERM, DD2
- VPERM DD4, DD3, INPPERM, DD3
- VXOR A2, DD0, A2
- VXOR B2, DD1, B2
- VXOR C2, DD2, C2
- VXOR D2, DD3, D2
- VPERM A2, A2, OUTPERM, A2
- VPERM B2, B2, OUTPERM, B2
- VPERM C2, C2, OUTPERM, C2
- VPERM D2, D2, OUTPERM, D2
+ VXOR V15, V0, V15
+ VXOR V12, V1, V12
+ VXOR V13, V2, V13
+ VXOR V14, V3, V14
- ANDCC $15, OUT, X1 // Is out aligned?
- MOVD OUT, X0
+ VRLW V15, V29, V15
+ VRLW V12, V29, V12
+ VRLW V13, V29, V13
+ VRLW V14, V29, V14
- VSEL A0, B0, OUTMASK, DD0 // Collect pre-misaligned output
- VSEL B0, C0, OUTMASK, DD1
- VSEL C0, D0, OUTMASK, DD2
- VSEL D0, A1, OUTMASK, DD3
- VSEL A1, B1, OUTMASK, B0
- VSEL B1, C1, OUTMASK, C0
- VSEL C1, D1, OUTMASK, D0
- VSEL D1, A2, OUTMASK, A1
- VSEL A2, B2, OUTMASK, B1
- VSEL B2, C2, OUTMASK, C1
- VSEL C2, D2, OUTMASK, D1
+ VADDUWM V10, V15, V10
+ VADDUWM V11, V12, V11
+ VADDUWM V8, V13, V8
+ VADDUWM V9, V14, V9
- STVX DD0, (OUT+TMP0)
- STVX DD1, (OUT+TMP1)
- STVX DD2, (OUT+TMP2)
- ADD $64, OUT, OUT
- STVX DD3, (OUT+R0)
- STVX B0, (OUT+TMP0)
- STVX C0, (OUT+TMP1)
- STVX D0, (OUT+TMP2)
- ADD $64, OUT, OUT
- STVX A1, (OUT+R0)
- STVX B1, (OUT+TMP0)
- STVX C1, (OUT+TMP1)
- STVX D1, (OUT+TMP2)
- ADD $64, OUT, OUT
+ VXOR V5, V10, V5
+ VXOR V6, V11, V6
+ VXOR V7, V8, V7
+ VXOR V4, V9, V4
- BEQ aligned_vmx
+ VRLW V5, V30, V5
+ VRLW V6, V30, V6
+ VRLW V7, V30, V7
+ VRLW V4, V30, V4
+ BC 16, LT, loop_vsx
- SUB X1, OUT, X2 // in misaligned case edges
- MOVD $0, X3 // are written byte-by-byte
+ VADDUWM V12, V26, V12
-unaligned_tail_vmx:
- STVEBX D2, (X2+X3)
- ADD $1, X3, X3
- CMPW X3, X1
- BNE unaligned_tail_vmx
- SUB X1, X0, X2
+ WORD $0x13600F8C // VMRGEW V0, V1, V27
+ WORD $0x13821F8C // VMRGEW V2, V3, V28
-unaligned_head_vmx:
- STVEBX A0, (X2+X1)
- CMPW X1, $15
- ADD $1, X1, X1
- BNE unaligned_head_vmx
+ WORD $0x10000E8C // VMRGOW V0, V1, V0
+ WORD $0x10421E8C // VMRGOW V2, V3, V2
- CMPU LEN, $255 // done with 256-byte block yet?
- BGT loop_outer_vmx
+ WORD $0x13A42F8C // VMRGEW V4, V5, V29
+ WORD $0x13C63F8C // VMRGEW V6, V7, V30
- JMP done_vmx
+ XXPERMDI VS32, VS34, $0, VS33
+ XXPERMDI VS32, VS34, $3, VS35
+ XXPERMDI VS59, VS60, $0, VS32
+ XXPERMDI VS59, VS60, $3, VS34
-aligned_vmx:
- STVX A0, (X0+R0)
- CMPU LEN, $255 // done with 256-byte block yet?
- BGT loop_outer_vmx
+ WORD $0x10842E8C // VMRGOW V4, V5, V4
+ WORD $0x10C63E8C // VMRGOW V6, V7, V6
-done_vmx:
+ WORD $0x13684F8C // VMRGEW V8, V9, V27
+ WORD $0x138A5F8C // VMRGEW V10, V11, V28
+
+ XXPERMDI VS36, VS38, $0, VS37
+ XXPERMDI VS36, VS38, $3, VS39
+ XXPERMDI VS61, VS62, $0, VS36
+ XXPERMDI VS61, VS62, $3, VS38
+
+ WORD $0x11084E8C // VMRGOW V8, V9, V8
+ WORD $0x114A5E8C // VMRGOW V10, V11, V10
+
+ WORD $0x13AC6F8C // VMRGEW V12, V13, V29
+ WORD $0x13CE7F8C // VMRGEW V14, V15, V30
+
+ XXPERMDI VS40, VS42, $0, VS41
+ XXPERMDI VS40, VS42, $3, VS43
+ XXPERMDI VS59, VS60, $0, VS40
+ XXPERMDI VS59, VS60, $3, VS42
+
+ WORD $0x118C6E8C // VMRGOW V12, V13, V12
+ WORD $0x11CE7E8C // VMRGOW V14, V15, V14
+
+ VSPLTISW $4, V27
+ VADDUWM V26, V27, V26
+
+ XXPERMDI VS44, VS46, $0, VS45
+ XXPERMDI VS44, VS46, $3, VS47
+ XXPERMDI VS61, VS62, $0, VS44
+ XXPERMDI VS61, VS62, $3, VS46
+
+ VADDUWM V0, V16, V0
+ VADDUWM V4, V17, V4
+ VADDUWM V8, V18, V8
+ VADDUWM V12, V19, V12
+
+ CMPU LEN, $64
+ BLT tail_vsx
+
+ // Bottom of loop
+ LXVW4X (INP)(R0), VS59
+ LXVW4X (INP)(R8), VS60
+ LXVW4X (INP)(R9), VS61
+ LXVW4X (INP)(R10), VS62
+
+ VXOR V27, V0, V27
+ VXOR V28, V4, V28
+ VXOR V29, V8, V29
+ VXOR V30, V12, V30
+
+ STXVW4X VS59, (OUT)(R0)
+ STXVW4X VS60, (OUT)(R8)
+ ADD $64, INP
+ STXVW4X VS61, (OUT)(R9)
+ ADD $-64, LEN
+ STXVW4X VS62, (OUT)(R10)
+ ADD $64, OUT
+ BEQ done_vsx
+
+ VADDUWM V1, V16, V0
+ VADDUWM V5, V17, V4
+ VADDUWM V9, V18, V8
+ VADDUWM V13, V19, V12
+
+ CMPU LEN, $64
+ BLT tail_vsx
+
+ LXVW4X (INP)(R0), VS59
+ LXVW4X (INP)(R8), VS60
+ LXVW4X (INP)(R9), VS61
+ LXVW4X (INP)(R10), VS62
+ VXOR V27, V0, V27
+
+ VXOR V28, V4, V28
+ VXOR V29, V8, V29
+ VXOR V30, V12, V30
+
+ STXVW4X VS59, (OUT)(R0)
+ STXVW4X VS60, (OUT)(R8)
+ ADD $64, INP
+ STXVW4X VS61, (OUT)(R9)
+ ADD $-64, LEN
+ STXVW4X VS62, (OUT)(V10)
+ ADD $64, OUT
+ BEQ done_vsx
+
+ VADDUWM V2, V16, V0
+ VADDUWM V6, V17, V4
+ VADDUWM V10, V18, V8
+ VADDUWM V14, V19, V12
+
+ CMPU LEN, $64
+ BLT tail_vsx
+
+ LXVW4X (INP)(R0), VS59
+ LXVW4X (INP)(R8), VS60
+ LXVW4X (INP)(R9), VS61
+ LXVW4X (INP)(R10), VS62
+
+ VXOR V27, V0, V27
+ VXOR V28, V4, V28
+ VXOR V29, V8, V29
+ VXOR V30, V12, V30
+
+ STXVW4X VS59, (OUT)(R0)
+ STXVW4X VS60, (OUT)(R8)
+ ADD $64, INP
+ STXVW4X VS61, (OUT)(R9)
+ ADD $-64, LEN
+ STXVW4X VS62, (OUT)(R10)
+ ADD $64, OUT
+ BEQ done_vsx
+
+ VADDUWM V3, V16, V0
+ VADDUWM V7, V17, V4
+ VADDUWM V11, V18, V8
+ VADDUWM V15, V19, V12
+
+ CMPU LEN, $64
+ BLT tail_vsx
+
+ LXVW4X (INP)(R0), VS59
+ LXVW4X (INP)(R8), VS60
+ LXVW4X (INP)(R9), VS61
+ LXVW4X (INP)(R10), VS62
+
+ VXOR V27, V0, V27
+ VXOR V28, V4, V28
+ VXOR V29, V8, V29
+ VXOR V30, V12, V30
+
+ STXVW4X VS59, (OUT)(R0)
+ STXVW4X VS60, (OUT)(R8)
+ ADD $64, INP
+ STXVW4X VS61, (OUT)(R9)
+ ADD $-64, LEN
+ STXVW4X VS62, (OUT)(R10)
+ ADD $64, OUT
+
+ MOVD $10, R14
+ MOVD R14, CTR
+ BNE loop_outer_vsx
+
+done_vsx:
+ // Increment counter by 4
+ MOVD (CNT), R14
+ ADD $4, R14
+ MOVD R14, (CNT)
RET
+
+tail_vsx:
+ ADD $32, R1, R11
+ MOVD LEN, CTR
+
+ // Save values on stack to copy from
+ STXVW4X VS32, (R11)(R0)
+ STXVW4X VS36, (R11)(R8)
+ STXVW4X VS40, (R11)(R9)
+ STXVW4X VS44, (R11)(R10)
+ ADD $-1, R11, R12
+ ADD $-1, INP
+ ADD $-1, OUT
+
+looptail_vsx:
+ // Copying the result to OUT
+ // in bytes.
+ MOVBZU 1(R12), KEY
+ MOVBZU 1(INP), TMP
+ XOR KEY, TMP, KEY
+ MOVBU KEY, 1(OUT)
+ BC 16, LT, looptail_vsx
+
+ // Clear the stack values
+ STXVW4X VS48, (R11)(R0)
+ STXVW4X VS48, (R11)(R8)
+ STXVW4X VS48, (R11)(R9)
+ STXVW4X VS48, (R11)(R10)
+ BR done_vsx
diff --git a/vendor/golang.org/x/crypto/internal/chacha20/chacha_noasm.go b/vendor/golang.org/x/crypto/internal/chacha20/chacha_noasm.go
index bf8beba670..fc2682528b 100644
--- a/vendor/golang.org/x/crypto/internal/chacha20/chacha_noasm.go
+++ b/vendor/golang.org/x/crypto/internal/chacha20/chacha_noasm.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 !ppc64le,!arm64,!s390x arm64,!go1.11 gccgo appengine
+// +build !arm64,!s390x,!ppc64le arm64,!go1.11 gccgo appengine
package chacha20
diff --git a/vendor/golang.org/x/crypto/internal/chacha20/chacha_ppc64le.go b/vendor/golang.org/x/crypto/internal/chacha20/chacha_ppc64le.go
index 638cb5e5de..8d832b3e13 100644
--- a/vendor/golang.org/x/crypto/internal/chacha20/chacha_ppc64le.go
+++ b/vendor/golang.org/x/crypto/internal/chacha20/chacha_ppc64le.go
@@ -6,7 +6,9 @@
package chacha20
-import "encoding/binary"
+import (
+ "encoding/binary"
+)
const (
bufSize = 256
@@ -14,14 +16,15 @@ const (
)
//go:noescape
-func chaCha20_ctr32_vmx(out, inp *byte, len int, key *[8]uint32, counter *uint32)
+func chaCha20_ctr32_vsx(out, inp *byte, len int, key *[8]uint32, counter *uint32)
func (c *Cipher) xorKeyStreamAsm(dst, src []byte) {
+ // This implementation can handle buffers that aren't multiples of
+ // 256.
if len(src) >= bufSize {
- chaCha20_ctr32_vmx(&dst[0], &src[0], len(src)-len(src)%bufSize, &c.key, &c.counter)
- }
- if len(src)%bufSize != 0 {
- chaCha20_ctr32_vmx(&c.buf[0], &c.buf[0], bufSize, &c.key, &c.counter)
+ chaCha20_ctr32_vsx(&dst[0], &src[0], len(src), &c.key, &c.counter)
+ } else if len(src)%bufSize != 0 {
+ chaCha20_ctr32_vsx(&c.buf[0], &c.buf[0], bufSize, &c.key, &c.counter)
start := len(src) - len(src)%bufSize
ts, td, tb := src[start:], dst[start:], c.buf[:]
// Unroll loop to XOR 32 bytes per iteration.
@@ -46,7 +49,6 @@ func (c *Cipher) xorKeyStreamAsm(dst, src []byte) {
td[i] = tb[i] ^ v
}
c.len = bufSize - (len(src) % bufSize)
-
}
}
diff --git a/vendor/golang.org/x/crypto/ssh/common.go b/vendor/golang.org/x/crypto/ssh/common.go
index e55fe0ad62..290382d059 100644
--- a/vendor/golang.org/x/crypto/ssh/common.go
+++ b/vendor/golang.org/x/crypto/ssh/common.go
@@ -58,6 +58,14 @@ var serverForbiddenKexAlgos = map[string]struct{}{
kexAlgoDHGEXSHA256: {}, // server half implementation is only minimal to satisfy the automated tests
}
+// preferredKexAlgos specifies the default preference for key-exchange algorithms
+// in preference order.
+var preferredKexAlgos = []string{
+ kexAlgoCurve25519SHA256,
+ kexAlgoECDH256, kexAlgoECDH384, kexAlgoECDH521,
+ kexAlgoDH14SHA1,
+}
+
// supportedHostKeyAlgos specifies the supported host-key algorithms (i.e. methods
// of authenticating servers) in preference order.
var supportedHostKeyAlgos = []string{
@@ -246,7 +254,7 @@ func (c *Config) SetDefaults() {
c.Ciphers = ciphers
if c.KeyExchanges == nil {
- c.KeyExchanges = supportedKexAlgos
+ c.KeyExchanges = preferredKexAlgos
}
if c.MACs == nil {
diff --git a/vendor/golang.org/x/net/http2/hpack/encode.go b/vendor/golang.org/x/net/http2/hpack/encode.go
index 1565cf2702..97f17831fc 100644
--- a/vendor/golang.org/x/net/http2/hpack/encode.go
+++ b/vendor/golang.org/x/net/http2/hpack/encode.go
@@ -150,7 +150,7 @@ func appendIndexed(dst []byte, i uint64) []byte {
// extended buffer.
//
// If f.Sensitive is true, "Never Indexed" representation is used. If
-// f.Sensitive is false and indexing is true, "Inremental Indexing"
+// f.Sensitive is false and indexing is true, "Incremental Indexing"
// representation is used.
func appendNewName(dst []byte, f HeaderField, indexing bool) []byte {
dst = append(dst, encodeTypeByte(indexing, f.Sensitive))
diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go
index 57334dc79b..b7524ba268 100644
--- a/vendor/golang.org/x/net/http2/server.go
+++ b/vendor/golang.org/x/net/http2/server.go
@@ -52,10 +52,11 @@ import (
)
const (
- prefaceTimeout = 10 * time.Second
- firstSettingsTimeout = 2 * time.Second // should be in-flight with preface anyway
- handlerChunkWriteSize = 4 << 10
- defaultMaxStreams = 250 // TODO: make this 100 as the GFE seems to?
+ prefaceTimeout = 10 * time.Second
+ firstSettingsTimeout = 2 * time.Second // should be in-flight with preface anyway
+ handlerChunkWriteSize = 4 << 10
+ defaultMaxStreams = 250 // TODO: make this 100 as the GFE seems to?
+ maxQueuedControlFrames = 10000
)
var (
@@ -163,6 +164,15 @@ func (s *Server) maxConcurrentStreams() uint32 {
return defaultMaxStreams
}
+// maxQueuedControlFrames is the maximum number of control frames like
+// SETTINGS, PING and RST_STREAM that will be queued for writing before
+// the connection is closed to prevent memory exhaustion attacks.
+func (s *Server) maxQueuedControlFrames() int {
+ // TODO: if anybody asks, add a Server field, and remember to define the
+ // behavior of negative values.
+ return maxQueuedControlFrames
+}
+
type serverInternalState struct {
mu sync.Mutex
activeConns map[*serverConn]struct{}
@@ -312,7 +322,7 @@ type ServeConnOpts struct {
}
func (o *ServeConnOpts) context() context.Context {
- if o.Context != nil {
+ if o != nil && o.Context != nil {
return o.Context
}
return context.Background()
@@ -506,6 +516,7 @@ type serverConn struct {
sawFirstSettings bool // got the initial SETTINGS frame after the preface
needToSendSettingsAck bool
unackedSettings int // how many SETTINGS have we sent without ACKs?
+ queuedControlFrames int // control frames in the writeSched queue
clientMaxStreams uint32 // SETTINGS_MAX_CONCURRENT_STREAMS from client (our PUSH_PROMISE limit)
advMaxStreams uint32 // our SETTINGS_MAX_CONCURRENT_STREAMS advertised the client
curClientStreams uint32 // number of open streams initiated by the client
@@ -894,6 +905,14 @@ func (sc *serverConn) serve() {
}
}
+ // If the peer is causing us to generate a lot of control frames,
+ // but not reading them from us, assume they are trying to make us
+ // run out of memory.
+ if sc.queuedControlFrames > sc.srv.maxQueuedControlFrames() {
+ sc.vlogf("http2: too many control frames in send queue, closing connection")
+ return
+ }
+
// Start the shutdown timer after sending a GOAWAY. When sending GOAWAY
// with no error code (graceful shutdown), don't start the timer until
// all open streams have been completed.
@@ -1093,6 +1112,14 @@ func (sc *serverConn) writeFrame(wr FrameWriteRequest) {
}
if !ignoreWrite {
+ if wr.isControl() {
+ sc.queuedControlFrames++
+ // For extra safety, detect wraparounds, which should not happen,
+ // and pull the plug.
+ if sc.queuedControlFrames < 0 {
+ sc.conn.Close()
+ }
+ }
sc.writeSched.Push(wr)
}
sc.scheduleFrameWrite()
@@ -1210,10 +1237,8 @@ func (sc *serverConn) wroteFrame(res frameWriteResult) {
// If a frame is already being written, nothing happens. This will be called again
// when the frame is done being written.
//
-// If a frame isn't being written we need to send one, the best frame
-// to send is selected, preferring first things that aren't
-// stream-specific (e.g. ACKing settings), and then finding the
-// highest priority stream.
+// If a frame isn't being written and we need to send one, the best frame
+// to send is selected by writeSched.
//
// If a frame isn't being written and there's nothing else to send, we
// flush the write buffer.
@@ -1241,6 +1266,9 @@ func (sc *serverConn) scheduleFrameWrite() {
}
if !sc.inGoAway || sc.goAwayCode == ErrCodeNo {
if wr, ok := sc.writeSched.Pop(); ok {
+ if wr.isControl() {
+ sc.queuedControlFrames--
+ }
sc.startFrameWrite(wr)
continue
}
@@ -1533,6 +1561,8 @@ func (sc *serverConn) processSettings(f *SettingsFrame) error {
if err := f.ForeachSetting(sc.processSetting); err != nil {
return err
}
+ // TODO: judging by RFC 7540, Section 6.5.3 each SETTINGS frame should be
+ // acknowledged individually, even if multiple are received before the ACK.
sc.needToSendSettingsAck = true
sc.scheduleFrameWrite()
return nil
@@ -2494,7 +2524,7 @@ const TrailerPrefix = "Trailer:"
// trailers. That worked for a while, until we found the first major
// user of Trailers in the wild: gRPC (using them only over http2),
// and gRPC libraries permit setting trailers mid-stream without
-// predeclarnig them. So: change of plans. We still permit the old
+// predeclaring them. So: change of plans. We still permit the old
// way, but we also permit this hack: if a Header() key begins with
// "Trailer:", the suffix of that key is a Trailer. Because ':' is an
// invalid token byte anyway, there is no ambiguity. (And it's already
@@ -2794,7 +2824,7 @@ func (sc *serverConn) startPush(msg *startPushRequest) {
// PUSH_PROMISE frames MUST only be sent on a peer-initiated stream that
// is in either the "open" or "half-closed (remote)" state.
if msg.parent.state != stateOpen && msg.parent.state != stateHalfClosedRemote {
- // responseWriter.Push checks that the stream is peer-initiaed.
+ // responseWriter.Push checks that the stream is peer-initiated.
msg.done <- errStreamClosed
return
}
diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go
index c0c80d8930..c51a73c069 100644
--- a/vendor/golang.org/x/net/http2/transport.go
+++ b/vendor/golang.org/x/net/http2/transport.go
@@ -992,7 +992,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf
req.Method != "HEAD" {
// Request gzip only, not deflate. Deflate is ambiguous and
// not as universally supported anyway.
- // See: http://www.gzip.org/zlib/zlib_faq.html#faq38
+ // See: https://zlib.net/zlib_faq.html#faq39
//
// Note that we don't request this for HEAD requests,
// due to a bug in nginx:
@@ -1216,6 +1216,8 @@ var (
// abort request body write, but send stream reset of cancel.
errStopReqBodyWriteAndCancel = errors.New("http2: canceling request")
+
+ errReqBodyTooLong = errors.New("http2: request body larger than specified content length")
)
func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (err error) {
@@ -1238,10 +1240,32 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (
req := cs.req
hasTrailers := req.Trailer != nil
+ remainLen := actualContentLength(req)
+ hasContentLen := remainLen != -1
var sawEOF bool
for !sawEOF {
- n, err := body.Read(buf)
+ n, err := body.Read(buf[:len(buf)-1])
+ if hasContentLen {
+ remainLen -= int64(n)
+ if remainLen == 0 && err == nil {
+ // The request body's Content-Length was predeclared and
+ // we just finished reading it all, but the underlying io.Reader
+ // returned the final chunk with a nil error (which is one of
+ // the two valid things a Reader can do at EOF). Because we'd prefer
+ // to send the END_STREAM bit early, double-check that we're actually
+ // at EOF. Subsequent reads should return (0, EOF) at this point.
+ // If either value is different, we return an error in one of two ways below.
+ var n1 int
+ n1, err = body.Read(buf[n:])
+ remainLen -= int64(n1)
+ }
+ if remainLen < 0 {
+ err = errReqBodyTooLong
+ cc.writeStreamReset(cs.ID, ErrCodeCancel, err)
+ return err
+ }
+ }
if err == io.EOF {
sawEOF = true
err = nil
diff --git a/vendor/golang.org/x/net/http2/writesched.go b/vendor/golang.org/x/net/http2/writesched.go
index 4fe3073073..f24d2b1e7d 100644
--- a/vendor/golang.org/x/net/http2/writesched.go
+++ b/vendor/golang.org/x/net/http2/writesched.go
@@ -32,7 +32,7 @@ type WriteScheduler interface {
// Pop dequeues the next frame to write. Returns false if no frames can
// be written. Frames with a given wr.StreamID() are Pop'd in the same
- // order they are Push'd.
+ // order they are Push'd. No frames should be discarded except by CloseStream.
Pop() (wr FrameWriteRequest, ok bool)
}
@@ -76,6 +76,12 @@ func (wr FrameWriteRequest) StreamID() uint32 {
return wr.stream.id
}
+// isControl reports whether wr is a control frame for MaxQueuedControlFrames
+// purposes. That includes non-stream frames and RST_STREAM frames.
+func (wr FrameWriteRequest) isControl() bool {
+ return wr.stream == nil
+}
+
// DataSize returns the number of flow control bytes that must be consumed
// to write this entire frame. This is 0 for non-DATA frames.
func (wr FrameWriteRequest) DataSize() int {
diff --git a/vendor/golang.org/x/net/http2/writesched_priority.go b/vendor/golang.org/x/net/http2/writesched_priority.go
index 848fed6ec7..2618b2c11d 100644
--- a/vendor/golang.org/x/net/http2/writesched_priority.go
+++ b/vendor/golang.org/x/net/http2/writesched_priority.go
@@ -149,7 +149,7 @@ func (n *priorityNode) addBytes(b int64) {
}
// walkReadyInOrder iterates over the tree in priority order, calling f for each node
-// with a non-empty write queue. When f returns true, this funcion returns true and the
+// with a non-empty write queue. When f returns true, this function returns true and the
// walk halts. tmp is used as scratch space for sorting.
//
// f(n, openParent) takes two arguments: the node to visit, n, and a bool that is true
diff --git a/vendor/golang.org/x/net/internal/socket/defs_aix.go b/vendor/golang.org/x/net/internal/socket/defs_aix.go
index c9d05b2619..ae1b21c5e1 100644
--- a/vendor/golang.org/x/net/internal/socket/defs_aix.go
+++ b/vendor/golang.org/x/net/internal/socket/defs_aix.go
@@ -31,7 +31,6 @@ 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
diff --git a/vendor/golang.org/x/net/internal/socket/defs_linux.go b/vendor/golang.org/x/net/internal/socket/defs_linux.go
index 6c5c11dcc4..85bb7450b0 100644
--- a/vendor/golang.org/x/net/internal/socket/defs_linux.go
+++ b/vendor/golang.org/x/net/internal/socket/defs_linux.go
@@ -33,7 +33,6 @@ 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
diff --git a/vendor/golang.org/x/net/internal/socket/defs_netbsd.go b/vendor/golang.org/x/net/internal/socket/defs_netbsd.go
index 3d3b776395..5bfdd4676c 100644
--- a/vendor/golang.org/x/net/internal/socket/defs_netbsd.go
+++ b/vendor/golang.org/x/net/internal/socket/defs_netbsd.go
@@ -31,7 +31,6 @@ 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
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
index 813385a98b..e740c8f024 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go
@@ -53,7 +53,6 @@ type sockaddrInet6 struct {
const (
sizeofIovec = 0x10
sizeofMsghdr = 0x30
- sizeofMmsghdr = 0x38
sizeofCmsghdr = 0xc
sizeofSockaddrInet = 0x10
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 72d8b25421..d33025b70d 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
@@ -47,7 +47,6 @@ type sockaddrInet6 struct {
const (
sizeofIovec = 0x8
sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
sizeofCmsghdr = 0xc
sizeofSockaddrInet = 0x10
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 3545319ae9..b20d216774 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
@@ -50,7 +50,6 @@ type sockaddrInet6 struct {
const (
sizeofIovec = 0x10
sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
sizeofCmsghdr = 0x10
sizeofSockaddrInet = 0x10
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 72d8b25421..1bb10a4289 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
@@ -45,9 +45,9 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+
sizeofCmsghdr = 0xc
sizeofSockaddrInet = 0x10
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 3545319ae9..7f6e8a7fa4 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
@@ -48,9 +48,9 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+
sizeofCmsghdr = 0x10
sizeofSockaddrInet = 0x10
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 72d8b25421..1bb10a4289 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
@@ -45,9 +45,9 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+
sizeofCmsghdr = 0xc
sizeofSockaddrInet = 0x10
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 3545319ae9..7f6e8a7fa4 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
@@ -48,9 +48,9 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+
sizeofCmsghdr = 0x10
sizeofSockaddrInet = 0x10
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 3545319ae9..7f6e8a7fa4 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
@@ -48,9 +48,9 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+
sizeofCmsghdr = 0x10
sizeofSockaddrInet = 0x10
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 72d8b25421..1bb10a4289 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
@@ -45,9 +45,9 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+
sizeofCmsghdr = 0xc
sizeofSockaddrInet = 0x10
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 3545319ae9..7f6e8a7fa4 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
@@ -48,9 +48,9 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+
sizeofCmsghdr = 0x10
sizeofSockaddrInet = 0x10
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 3545319ae9..7f6e8a7fa4 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
@@ -48,9 +48,9 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+
sizeofCmsghdr = 0x10
sizeofSockaddrInet = 0x10
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
index dbff234fbd..f12a1d7682 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go
@@ -49,9 +49,9 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+
sizeofCmsghdr = 0x10
sizeofSockaddrInet = 0x10
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 3545319ae9..7f6e8a7fa4 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
@@ -48,9 +48,9 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x38
- sizeofMmsghdr = 0x40
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+
sizeofCmsghdr = 0x10
sizeofSockaddrInet = 0x10
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 bf8f47c88c..7e258cec29 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
@@ -47,9 +47,9 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+
sizeofCmsghdr = 0xc
sizeofSockaddrInet = 0x10
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 a46eff9912..b3f9c0d7e5 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
@@ -50,9 +50,9 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x10
- sizeofMsghdr = 0x30
- sizeofMmsghdr = 0x40
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+
sizeofCmsghdr = 0xc
sizeofSockaddrInet = 0x10
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 bf8f47c88c..7e258cec29 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
@@ -47,9 +47,9 @@ type sockaddrInet6 struct {
}
const (
- sizeofIovec = 0x8
- sizeofMsghdr = 0x1c
- sizeofMmsghdr = 0x20
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+
sizeofCmsghdr = 0xc
sizeofSockaddrInet = 0x10
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
index a46eff9912..da26ef019c 100644
--- a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm64.go
+++ b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm64.go
@@ -52,7 +52,6 @@ type sockaddrInet6 struct {
const (
sizeofIovec = 0x10
sizeofMsghdr = 0x30
- sizeofMmsghdr = 0x40
sizeofCmsghdr = 0xc
sizeofSockaddrInet = 0x10
diff --git a/vendor/golang.org/x/net/internal/socks/socks.go b/vendor/golang.org/x/net/internal/socks/socks.go
index 6929a9fd5c..97db2340ec 100644
--- a/vendor/golang.org/x/net/internal/socks/socks.go
+++ b/vendor/golang.org/x/net/internal/socks/socks.go
@@ -127,7 +127,7 @@ type Dialer struct {
// establishing the transport connection.
ProxyDial func(context.Context, string, string) (net.Conn, error)
- // AuthMethods specifies the list of request authention
+ // AuthMethods specifies the list of request authentication
// methods.
// If empty, SOCKS client requests only AuthMethodNotRequired.
AuthMethods []AuthMethod
diff --git a/vendor/golang.org/x/sys/cpu/byteorder.go b/vendor/golang.org/x/sys/cpu/byteorder.go
index da6b9e4363..ed8da8deac 100644
--- a/vendor/golang.org/x/sys/cpu/byteorder.go
+++ b/vendor/golang.org/x/sys/cpu/byteorder.go
@@ -5,26 +5,56 @@
package cpu
import (
- "encoding/binary"
"runtime"
)
+// byteOrder is a subset of encoding/binary.ByteOrder.
+type byteOrder interface {
+ Uint32([]byte) uint32
+ Uint64([]byte) uint64
+}
+
+type littleEndian struct{}
+type bigEndian struct{}
+
+func (littleEndian) Uint32(b []byte) uint32 {
+ _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
+ return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
+}
+
+func (littleEndian) Uint64(b []byte) uint64 {
+ _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
+ return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |
+ uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
+}
+
+func (bigEndian) Uint32(b []byte) uint32 {
+ _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
+ return uint32(b[3]) | uint32(b[2])<<8 | uint32(b[1])<<16 | uint32(b[0])<<24
+}
+
+func (bigEndian) Uint64(b []byte) uint64 {
+ _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
+ return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 |
+ uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56
+}
+
// hostByteOrder returns binary.LittleEndian on little-endian machines and
// binary.BigEndian on big-endian machines.
-func hostByteOrder() binary.ByteOrder {
+func hostByteOrder() byteOrder {
switch runtime.GOARCH {
case "386", "amd64", "amd64p32",
"arm", "arm64",
"mipsle", "mips64le", "mips64p32le",
"ppc64le",
"riscv", "riscv64":
- return binary.LittleEndian
+ return littleEndian{}
case "armbe", "arm64be",
"mips", "mips64", "mips64p32",
"ppc", "ppc64",
"s390", "s390x",
"sparc", "sparc64":
- return binary.BigEndian
+ return bigEndian{}
}
panic("unknown architecture")
}
diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go
index 679e78c2ce..b4e6ecb2dc 100644
--- a/vendor/golang.org/x/sys/cpu/cpu.go
+++ b/vendor/golang.org/x/sys/cpu/cpu.go
@@ -78,6 +78,42 @@ var ARM64 struct {
_ CacheLinePad
}
+// ARM contains the supported CPU features of the current ARM (32-bit) platform.
+// All feature flags are false if:
+// 1. the current platform is not arm, or
+// 2. the current operating system is not Linux.
+var ARM struct {
+ _ CacheLinePad
+ HasSWP bool // SWP instruction support
+ HasHALF bool // Half-word load and store support
+ HasTHUMB bool // ARM Thumb instruction set
+ Has26BIT bool // Address space limited to 26-bits
+ HasFASTMUL bool // 32-bit operand, 64-bit result multiplication support
+ HasFPA bool // Floating point arithmetic support
+ HasVFP bool // Vector floating point support
+ HasEDSP bool // DSP Extensions support
+ HasJAVA bool // Java instruction set
+ HasIWMMXT bool // Intel Wireless MMX technology support
+ HasCRUNCH bool // MaverickCrunch context switching and handling
+ HasTHUMBEE bool // Thumb EE instruction set
+ HasNEON bool // NEON instruction set
+ HasVFPv3 bool // Vector floating point version 3 support
+ HasVFPv3D16 bool // Vector floating point version 3 D8-D15
+ HasTLS bool // Thread local storage support
+ HasVFPv4 bool // Vector floating point version 4 support
+ HasIDIVA bool // Integer divide instruction support in ARM mode
+ HasIDIVT bool // Integer divide instruction support in Thumb mode
+ HasVFPD32 bool // Vector floating point version 3 D15-D31
+ HasLPAE bool // Large Physical Address Extensions
+ HasEVTSTRM bool // Event stream support
+ HasAES bool // AES hardware implementation
+ HasPMULL bool // Polynomial multiplication instruction set
+ HasSHA1 bool // SHA1 hardware implementation
+ HasSHA2 bool // SHA2 hardware implementation
+ HasCRC32 bool // CRC32 hardware implementation
+ _ CacheLinePad
+}
+
// PPC64 contains the supported CPU features of the current ppc64/ppc64le platforms.
// If the current platform is not ppc64/ppc64le then all feature flags are false.
//
diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm.go b/vendor/golang.org/x/sys/cpu/cpu_arm.go
index 7f2348b7d4..981af6818c 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_arm.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_arm.go
@@ -6,4 +6,35 @@ package cpu
const cacheLineSize = 32
-func doinit() {}
+// HWCAP/HWCAP2 bits.
+// These are specific to Linux.
+const (
+ hwcap_SWP = 1 << 0
+ hwcap_HALF = 1 << 1
+ hwcap_THUMB = 1 << 2
+ hwcap_26BIT = 1 << 3
+ hwcap_FAST_MULT = 1 << 4
+ hwcap_FPA = 1 << 5
+ hwcap_VFP = 1 << 6
+ hwcap_EDSP = 1 << 7
+ hwcap_JAVA = 1 << 8
+ hwcap_IWMMXT = 1 << 9
+ hwcap_CRUNCH = 1 << 10
+ hwcap_THUMBEE = 1 << 11
+ hwcap_NEON = 1 << 12
+ hwcap_VFPv3 = 1 << 13
+ hwcap_VFPv3D16 = 1 << 14
+ hwcap_TLS = 1 << 15
+ hwcap_VFPv4 = 1 << 16
+ hwcap_IDIVA = 1 << 17
+ hwcap_IDIVT = 1 << 18
+ hwcap_VFPD32 = 1 << 19
+ hwcap_LPAE = 1 << 20
+ hwcap_EVTSTRM = 1 << 21
+
+ hwcap2_AES = 1 << 0
+ hwcap2_PMULL = 1 << 1
+ hwcap2_SHA1 = 1 << 2
+ hwcap2_SHA2 = 1 << 3
+ hwcap2_CRC32 = 1 << 4
+)
diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux.go b/vendor/golang.org/x/sys/cpu/cpu_linux.go
index 76b5f507fa..10e712dc5d 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_linux.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_linux.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 !amd64,!amd64p32,!386
+// +build !amd64,!amd64p32,!386
package cpu
diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_arm.go b/vendor/golang.org/x/sys/cpu/cpu_linux_arm.go
new file mode 100644
index 0000000000..2057006dce
--- /dev/null
+++ b/vendor/golang.org/x/sys/cpu/cpu_linux_arm.go
@@ -0,0 +1,39 @@
+// 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.
+
+package cpu
+
+func doinit() {
+ ARM.HasSWP = isSet(hwCap, hwcap_SWP)
+ ARM.HasHALF = isSet(hwCap, hwcap_HALF)
+ ARM.HasTHUMB = isSet(hwCap, hwcap_THUMB)
+ ARM.Has26BIT = isSet(hwCap, hwcap_26BIT)
+ ARM.HasFASTMUL = isSet(hwCap, hwcap_FAST_MULT)
+ ARM.HasFPA = isSet(hwCap, hwcap_FPA)
+ ARM.HasVFP = isSet(hwCap, hwcap_VFP)
+ ARM.HasEDSP = isSet(hwCap, hwcap_EDSP)
+ ARM.HasJAVA = isSet(hwCap, hwcap_JAVA)
+ ARM.HasIWMMXT = isSet(hwCap, hwcap_IWMMXT)
+ ARM.HasCRUNCH = isSet(hwCap, hwcap_CRUNCH)
+ ARM.HasTHUMBEE = isSet(hwCap, hwcap_THUMBEE)
+ ARM.HasNEON = isSet(hwCap, hwcap_NEON)
+ ARM.HasVFPv3 = isSet(hwCap, hwcap_VFPv3)
+ ARM.HasVFPv3D16 = isSet(hwCap, hwcap_VFPv3D16)
+ ARM.HasTLS = isSet(hwCap, hwcap_TLS)
+ ARM.HasVFPv4 = isSet(hwCap, hwcap_VFPv4)
+ ARM.HasIDIVA = isSet(hwCap, hwcap_IDIVA)
+ ARM.HasIDIVT = isSet(hwCap, hwcap_IDIVT)
+ ARM.HasVFPD32 = isSet(hwCap, hwcap_VFPD32)
+ ARM.HasLPAE = isSet(hwCap, hwcap_LPAE)
+ ARM.HasEVTSTRM = isSet(hwCap, hwcap_EVTSTRM)
+ ARM.HasAES = isSet(hwCap2, hwcap2_AES)
+ ARM.HasPMULL = isSet(hwCap2, hwcap2_PMULL)
+ ARM.HasSHA1 = isSet(hwCap2, hwcap2_SHA1)
+ ARM.HasSHA2 = isSet(hwCap2, hwcap2_SHA2)
+ ARM.HasCRC32 = isSet(hwCap2, hwcap2_CRC32)
+}
+
+func isSet(hwc uint, value uint) bool {
+ return hwc&value != 0
+}
diff --git a/vendor/golang.org/x/sys/unix/affinity_linux.go b/vendor/golang.org/x/sys/unix/affinity_linux.go
index 14e4d5caa3..6e5c81acd0 100644
--- a/vendor/golang.org/x/sys/unix/affinity_linux.go
+++ b/vendor/golang.org/x/sys/unix/affinity_linux.go
@@ -7,6 +7,7 @@
package unix
import (
+ "math/bits"
"unsafe"
)
@@ -79,50 +80,7 @@ func (s *CPUSet) IsSet(cpu int) bool {
func (s *CPUSet) Count() int {
c := 0
for _, b := range s {
- c += onesCount64(uint64(b))
+ c += bits.OnesCount64(uint64(b))
}
return c
}
-
-// onesCount64 is a copy of Go 1.9's math/bits.OnesCount64.
-// Once this package can require Go 1.9, we can delete this
-// and update the caller to use bits.OnesCount64.
-func onesCount64(x uint64) int {
- const m0 = 0x5555555555555555 // 01010101 ...
- const m1 = 0x3333333333333333 // 00110011 ...
- const m2 = 0x0f0f0f0f0f0f0f0f // 00001111 ...
-
- // Unused in this function, but definitions preserved for
- // documentation purposes:
- //
- // const m3 = 0x00ff00ff00ff00ff // etc.
- // const m4 = 0x0000ffff0000ffff
- //
- // Implementation: Parallel summing of adjacent bits.
- // See "Hacker's Delight", Chap. 5: Counting Bits.
- // The following pattern shows the general approach:
- //
- // x = x>>1&(m0&m) + x&(m0&m)
- // x = x>>2&(m1&m) + x&(m1&m)
- // x = x>>4&(m2&m) + x&(m2&m)
- // x = x>>8&(m3&m) + x&(m3&m)
- // x = x>>16&(m4&m) + x&(m4&m)
- // x = x>>32&(m5&m) + x&(m5&m)
- // return int(x)
- //
- // Masking (& operations) can be left away when there's no
- // danger that a field's sum will carry over into the next
- // field: Since the result cannot be > 64, 8 bits is enough
- // and we can ignore the masks for the shifts by 8 and up.
- // Per "Hacker's Delight", the first line can be simplified
- // more, but it saves at best one instruction, so we leave
- // it alone for clarity.
- const m = 1<<64 - 1
- x = x>>1&(m0&m) + x&(m0&m)
- x = x>>2&(m1&m) + x&(m1&m)
- x = (x>>4 + x) & (m2 & m)
- x += x >> 8
- x += x >> 16
- x += x >> 32
- return int(x) & (1<<7 - 1)
-}
diff --git a/vendor/golang.org/x/sys/unix/bluetooth_linux.go b/vendor/golang.org/x/sys/unix/bluetooth_linux.go
index 6e32296970..a178a6149b 100644
--- a/vendor/golang.org/x/sys/unix/bluetooth_linux.go
+++ b/vendor/golang.org/x/sys/unix/bluetooth_linux.go
@@ -23,6 +23,7 @@ const (
HCI_CHANNEL_USER = 1
HCI_CHANNEL_MONITOR = 2
HCI_CHANNEL_CONTROL = 3
+ HCI_CHANNEL_LOGGING = 4
)
// Socketoption Level
diff --git a/vendor/golang.org/x/sys/unix/fdset.go b/vendor/golang.org/x/sys/unix/fdset.go
new file mode 100644
index 0000000000..b27be0a014
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/fdset.go
@@ -0,0 +1,29 @@
+// 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 unix
+
+// Set adds fd to the set fds.
+func (fds *FdSet) Set(fd int) {
+ fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS))
+}
+
+// Clear removes fd from the set fds.
+func (fds *FdSet) Clear(fd int) {
+ fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS))
+}
+
+// IsSet returns whether fd is in the set fds.
+func (fds *FdSet) IsSet(fd int) bool {
+ return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0
+}
+
+// Zero clears the set fds.
+func (fds *FdSet) Zero() {
+ for i := range fds.Bits {
+ fds.Bits[i] = 0
+ }
+}
diff --git a/vendor/golang.org/x/sys/unix/ioctl.go b/vendor/golang.org/x/sys/unix/ioctl.go
index f121a8d64b..3559e5dcb2 100644
--- a/vendor/golang.org/x/sys/unix/ioctl.go
+++ b/vendor/golang.org/x/sys/unix/ioctl.go
@@ -6,7 +6,19 @@
package unix
-import "runtime"
+import (
+ "runtime"
+ "unsafe"
+)
+
+// ioctl itself should not be exposed directly, but additional get/set
+// functions for specific types are permissible.
+
+// IoctlSetInt performs an ioctl operation which sets an integer value
+// on fd, using the specified request number.
+func IoctlSetInt(fd int, req uint, value int) error {
+ return ioctl(fd, req, uintptr(value))
+}
// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
//
@@ -14,7 +26,7 @@ import "runtime"
func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
// TODO: if we get the chance, remove the req parameter and
// hardcode TIOCSWINSZ.
- err := ioctlSetWinsize(fd, req, value)
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
runtime.KeepAlive(value)
return err
}
@@ -24,7 +36,30 @@ func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
// The req value will usually be TCSETA or TIOCSETA.
func IoctlSetTermios(fd int, req uint, value *Termios) error {
// TODO: if we get the chance, remove the req parameter.
- err := ioctlSetTermios(fd, req, value)
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
runtime.KeepAlive(value)
return err
}
+
+// IoctlGetInt performs an ioctl operation which gets an integer value
+// from fd, using the specified request number.
+//
+// A few ioctl requests use the return value as an output parameter;
+// for those, IoctlRetInt should be used instead of this function.
+func IoctlGetInt(fd int, req uint) (int, error) {
+ var value int
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return value, err
+}
+
+func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
+ var value Winsize
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
+func IoctlGetTermios(fd int, req uint) (*Termios, error) {
+ var value Termios
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh
index 5a22eca967..890ec464c7 100644
--- a/vendor/golang.org/x/sys/unix/mkall.sh
+++ b/vendor/golang.org/x/sys/unix/mkall.sh
@@ -212,9 +212,11 @@ esac
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ;
elif [ "$GOOS" == "darwin" ]; then
# pre-1.12, direct syscalls
- echo "$mksyscall -tags $GOOS,$GOARCH,!go1.12 $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.1_11.go";
+ echo "$mksyscall -tags $GOOS,$GOARCH,!go1.12 $syscall_goos syscall_darwin_${GOARCH}.1_11.go $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.1_11.go";
# 1.12 and later, syscalls via libSystem
echo "$mksyscall -tags $GOOS,$GOARCH,go1.12 $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
+ # 1.13 and later, syscalls via libSystem (including syscallPtr)
+ echo "$mksyscall -tags $GOOS,$GOARCH,go1.13 syscall_darwin.1_13.go |gofmt >zsyscall_$GOOSARCH.1_13.go";
else
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
fi
diff --git a/vendor/golang.org/x/sys/unix/mkasm_darwin.go b/vendor/golang.org/x/sys/unix/mkasm_darwin.go
index 4548b993db..6f7bb6edfb 100644
--- a/vendor/golang.org/x/sys/unix/mkasm_darwin.go
+++ b/vendor/golang.org/x/sys/unix/mkasm_darwin.go
@@ -17,6 +17,34 @@ import (
"strings"
)
+func writeASMFile(in string, fileName string, buildTags string) {
+ trampolines := map[string]bool{}
+
+ var out bytes.Buffer
+
+ fmt.Fprintf(&out, "// go run mkasm_darwin.go %s\n", strings.Join(os.Args[1:], " "))
+ fmt.Fprintf(&out, "// Code generated by the command above; DO NOT EDIT.\n")
+ fmt.Fprintf(&out, "\n")
+ fmt.Fprintf(&out, "// +build %s\n", buildTags)
+ fmt.Fprintf(&out, "\n")
+ fmt.Fprintf(&out, "#include \"textflag.h\"\n")
+ for _, line := range strings.Split(in, "\n") {
+ if !strings.HasPrefix(line, "func ") || !strings.HasSuffix(line, "_trampoline()") {
+ continue
+ }
+ fn := line[5 : len(line)-13]
+ if !trampolines[fn] {
+ trampolines[fn] = true
+ fmt.Fprintf(&out, "TEXT ·%s_trampoline(SB),NOSPLIT,$0-0\n", fn)
+ fmt.Fprintf(&out, "\tJMP\t%s(SB)\n", fn)
+ }
+ }
+ err := ioutil.WriteFile(fileName, out.Bytes(), 0644)
+ if err != nil {
+ log.Fatalf("can't write %s: %s", fileName, err)
+ }
+}
+
func main() {
in1, err := ioutil.ReadFile("syscall_darwin.go")
if err != nil {
@@ -33,29 +61,18 @@ func main() {
}
in := string(in1) + string(in2) + string(in3)
- trampolines := map[string]bool{}
+ writeASMFile(in, fmt.Sprintf("zsyscall_darwin_%s.s", arch), "go1.12")
- var out bytes.Buffer
-
- fmt.Fprintf(&out, "// go run mkasm_darwin.go %s\n", strings.Join(os.Args[1:], " "))
- fmt.Fprintf(&out, "// Code generated by the command above; DO NOT EDIT.\n")
- fmt.Fprintf(&out, "\n")
- fmt.Fprintf(&out, "// +build go1.12\n")
- fmt.Fprintf(&out, "\n")
- fmt.Fprintf(&out, "#include \"textflag.h\"\n")
- for _, line := range strings.Split(in, "\n") {
- if !strings.HasPrefix(line, "func ") || !strings.HasSuffix(line, "_trampoline()") {
- continue
- }
- fn := line[5 : len(line)-13]
- if !trampolines[fn] {
- trampolines[fn] = true
- fmt.Fprintf(&out, "TEXT ·%s_trampoline(SB),NOSPLIT,$0-0\n", fn)
- fmt.Fprintf(&out, "\tJMP\t%s(SB)\n", fn)
- }
- }
- err = ioutil.WriteFile(fmt.Sprintf("zsyscall_darwin_%s.s", arch), out.Bytes(), 0644)
+ in1, err = ioutil.ReadFile("syscall_darwin.1_13.go")
if err != nil {
- log.Fatalf("can't write zsyscall_darwin_%s.s: %s", arch, err)
+ log.Fatalf("can't open syscall_darwin.1_13.go: %s", err)
}
+ in2, err = ioutil.ReadFile(fmt.Sprintf("zsyscall_darwin_%s.1_13.go", arch))
+ if err != nil {
+ log.Fatalf("can't open zsyscall_darwin_%s.1_13.go: %s", arch, err)
+ }
+
+ in = string(in1) + string(in2)
+
+ writeASMFile(in, fmt.Sprintf("zsyscall_darwin_%s.1_13.s", arch), "go1.13")
}
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index 14624b9531..4da0a63d2f 100644
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -60,6 +60,7 @@ includes_Darwin='
#include
#include
#include
+#include
#include
#include
#include
@@ -80,6 +81,7 @@ includes_Darwin='
includes_DragonFly='
#include
#include
+#include
#include
#include
#include
@@ -103,6 +105,7 @@ includes_FreeBSD='
#include
#include
#include
+#include
#include
#include
#include
@@ -179,24 +182,32 @@ struct ltchars {
#include
#include
#include
+#include
#include
#include
#include
#include
+#include
#include
+#include
+#include
#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#include
+#include
#include
#include
#include
#include
#include
#include
-#include
-#include
-#include
-#include
-#include
+#include
#include
#include
#include
@@ -206,26 +217,23 @@ struct ltchars {
#include
#include
#include
+#include
#include
+#include
#include
#include
+#include
#include
-#include
#include
#include
-#include
-#include
-#include
#include
-#include
-#include
+#include
#include
-#include
+#include
+#include
+#include
#include
-#include
-#include
-#include
-#include
+
#include
#include
@@ -264,6 +272,11 @@ struct ltchars {
#define FS_KEY_DESC_PREFIX "fscrypt:"
#define FS_KEY_DESC_PREFIX_SIZE 8
#define FS_MAX_KEY_SIZE 64
+
+// The code generator produces -0x1 for (~0), but an unsigned value is necessary
+// for the tipc_subscr timeout __u32 field.
+#undef TIPC_WAIT_FOREVER
+#define TIPC_WAIT_FOREVER 0xffffffff
'
includes_NetBSD='
@@ -273,6 +286,7 @@ includes_NetBSD='
#include
#include
#include
+#include
#include
#include
#include
@@ -299,6 +313,7 @@ includes_OpenBSD='
#include
#include
#include
+#include
#include
#include
#include
@@ -335,6 +350,7 @@ includes_OpenBSD='
includes_SunOS='
#include
#include
+#include
#include
#include
#include
@@ -427,6 +443,7 @@ ccflags="$@"
$2 == "XCASE" ||
$2 == "ALTWERASE" ||
$2 == "NOKERNINFO" ||
+ $2 == "NFDBITS" ||
$2 ~ /^PAR/ ||
$2 ~ /^SIG[^_]/ ||
$2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ ||
@@ -451,6 +468,7 @@ ccflags="$@"
$2 ~ /^SYSCTL_VERS/ ||
$2 !~ "MNT_BITS" &&
$2 ~ /^(MS|MNT|UMOUNT)_/ ||
+ $2 ~ /^NS_GET_/ ||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT)_/ ||
$2 ~ /^KEXEC_/ ||
@@ -506,6 +524,8 @@ ccflags="$@"
$2 ~ /^XDP_/ ||
$2 ~ /^(HDIO|WIN|SMART)_/ ||
$2 ~ /^CRYPTO_/ ||
+ $2 ~ /^TIPC_/ ||
+ $2 ~ /^DEVLINK_/ ||
$2 !~ "WMESGLEN" &&
$2 ~ /^W[A-Z0-9]+$/ ||
$2 ~/^PPPIOC/ ||
diff --git a/vendor/golang.org/x/sys/unix/mksyscall.go b/vendor/golang.org/x/sys/unix/mksyscall.go
index e4af9424e9..9e540cc892 100644
--- a/vendor/golang.org/x/sys/unix/mksyscall.go
+++ b/vendor/golang.org/x/sys/unix/mksyscall.go
@@ -121,7 +121,7 @@ func main() {
}
libc := false
- if goos == "darwin" && strings.Contains(buildTags(), ",go1.12") {
+ if goos == "darwin" && (strings.Contains(buildTags(), ",go1.12") || strings.Contains(buildTags(), ",go1.13")) {
libc = true
}
trampolines := map[string]bool{}
@@ -292,11 +292,6 @@ func main() {
asm = "syscall_" + strings.ToLower(asm[:1]) + asm[1:] // internal syscall call
sysname = strings.TrimPrefix(sysname, "SYS_") // remove SYS_
sysname = strings.ToLower(sysname) // lowercase
- if sysname == "getdirentries64" {
- // Special case - libSystem name and
- // raw syscall name don't match.
- sysname = "__getdirentries64"
- }
libcFn = sysname
sysname = "funcPC(libc_" + sysname + "_trampoline)"
}
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go b/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go
new file mode 100644
index 0000000000..5144deeccd
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go
@@ -0,0 +1,16 @@
+// 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.
+
+package unix
+
+// Round the length of a raw sockaddr up to align it properly.
+func cmsgAlignOf(salen int) int {
+ salign := SizeofPtr
+ if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) {
+ // 64-bit Dragonfly before the September 2019 ABI changes still requires
+ // 32-bit aligned access to network subsystem.
+ salign = 4
+ }
+ return (salen + salign - 1) & ^(salign - 1)
+}
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_linux.go b/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
index 6079eb4ac1..8bf4570594 100644
--- a/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
@@ -17,7 +17,7 @@ func UnixCredentials(ucred *Ucred) []byte {
h.Level = SOL_SOCKET
h.Type = SCM_CREDENTIALS
h.SetLen(CmsgLen(SizeofUcred))
- *((*Ucred)(cmsgData(h))) = *ucred
+ *(*Ucred)(h.data(0)) = *ucred
return b
}
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
index 062bcabab1..003916ed7a 100644
--- a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
@@ -9,35 +9,9 @@
package unix
import (
- "runtime"
"unsafe"
)
-// Round the length of a raw sockaddr up to align it properly.
-func cmsgAlignOf(salen int) int {
- salign := SizeofPtr
-
- switch runtime.GOOS {
- case "aix":
- // There is no alignment on AIX.
- salign = 1
- case "darwin", "dragonfly", "solaris", "illumos":
- // NOTE: It seems like 64-bit Darwin, DragonFly BSD,
- // illumos, and Solaris kernels still require 32-bit
- // aligned access to network subsystem.
- if SizeofPtr == 8 {
- salign = 4
- }
- case "netbsd", "openbsd":
- // NetBSD and OpenBSD armv7 require 64-bit alignment.
- if runtime.GOARCH == "arm" {
- salign = 8
- }
- }
-
- return (salen + salign - 1) & ^(salign - 1)
-}
-
// CmsgLen returns the value to store in the Len field of the Cmsghdr
// structure, taking into account any necessary alignment.
func CmsgLen(datalen int) int {
@@ -50,8 +24,8 @@ func CmsgSpace(datalen int) int {
return cmsgAlignOf(SizeofCmsghdr) + cmsgAlignOf(datalen)
}
-func cmsgData(h *Cmsghdr) unsafe.Pointer {
- return unsafe.Pointer(uintptr(unsafe.Pointer(h)) + uintptr(cmsgAlignOf(SizeofCmsghdr)))
+func (h *Cmsghdr) data(offset uintptr) unsafe.Pointer {
+ return unsafe.Pointer(uintptr(unsafe.Pointer(h)) + uintptr(cmsgAlignOf(SizeofCmsghdr)) + offset)
}
// SocketControlMessage represents a socket control message.
@@ -94,10 +68,8 @@ func UnixRights(fds ...int) []byte {
h.Level = SOL_SOCKET
h.Type = SCM_RIGHTS
h.SetLen(CmsgLen(datalen))
- data := cmsgData(h)
- for _, fd := range fds {
- *(*int32)(data) = int32(fd)
- data = unsafe.Pointer(uintptr(data) + 4)
+ for i, fd := range fds {
+ *(*int32)(h.data(4 * uintptr(i))) = int32(fd)
}
return b
}
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
new file mode 100644
index 0000000000..7d08dae5ba
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
@@ -0,0 +1,38 @@
+// 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 freebsd linux netbsd openbsd solaris
+
+package unix
+
+import (
+ "runtime"
+)
+
+// Round the length of a raw sockaddr up to align it properly.
+func cmsgAlignOf(salen int) int {
+ salign := SizeofPtr
+
+ // dragonfly needs to check ABI version at runtime, see cmsgAlignOf in
+ // sockcmsg_dragonfly.go
+ switch runtime.GOOS {
+ case "aix":
+ // There is no alignment on AIX.
+ salign = 1
+ case "darwin", "illumos", "solaris":
+ // NOTE: It seems like 64-bit Darwin, Illumos and Solaris
+ // kernels still require 32-bit aligned access to network
+ // subsystem.
+ if SizeofPtr == 8 {
+ salign = 4
+ }
+ case "netbsd", "openbsd":
+ // NetBSD and OpenBSD armv7 require 64-bit alignment.
+ if runtime.GOARCH == "arm" {
+ salign = 8
+ }
+ }
+
+ return (salen + salign - 1) & ^(salign - 1)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go
index 1aa065f9c9..9ad8a0d4a5 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix.go
@@ -350,49 +350,12 @@ func (w WaitStatus) Signal() Signal {
func (w WaitStatus) Continued() bool { return w&0x01000000 != 0 }
-func (w WaitStatus) CoreDump() bool { return w&0x200 != 0 }
+func (w WaitStatus) CoreDump() bool { return w&0x80 == 0x80 }
func (w WaitStatus) TrapCause() int { return -1 }
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-// ioctl itself should not be exposed directly, but additional get/set
-// functions for specific types are permissible.
-
-// IoctlSetInt performs an ioctl operation which sets an integer value
-// on fd, using the specified request number.
-func IoctlSetInt(fd int, req uint, value int) error {
- return ioctl(fd, req, uintptr(value))
-}
-
-func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func ioctlSetTermios(fd int, req uint, value *Termios) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-// IoctlGetInt performs an ioctl operation which gets an integer value
-// from fd, using the specified request number.
-func IoctlGetInt(fd int, req uint) (int, error) {
- var value int
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return value, err
-}
-
-func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
- var value Winsize
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-func IoctlGetTermios(fd int, req uint) (*Termios, error) {
- var value Termios
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
// fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX
// There is no way to create a custom fcntl and to keep //sys fcntl easily,
// Therefore, the programmer must call dup2 instead of fcntl in this case.
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
index bf05603f15..b3c8e3301c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
@@ -29,6 +29,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
index 13d4321f4c..9a6e024179 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
@@ -29,6 +29,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go
index 97a8eef6fa..d52bcc41c3 100644
--- a/vendor/golang.org/x/sys/unix/syscall_bsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go
@@ -237,7 +237,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
break
}
}
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
+ bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
sa.Name = string(bytes)
return sa, nil
@@ -413,8 +413,6 @@ func Kevent(kq int, changes, events []Kevent_t, timeout *Timespec) (n int, err e
return kevent(kq, change, len(changes), event, len(events), timeout)
}
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
-
// sysctlmib translates name to mib number and appends any additional args.
func sysctlmib(name string, args ...int) ([]_C_int, error) {
// Translate name to mib number.
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go b/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
new file mode 100644
index 0000000000..6a15cba611
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
@@ -0,0 +1,29 @@
+// 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 darwin,go1.12,!go1.13
+
+package unix
+
+import (
+ "unsafe"
+)
+
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+ // To implement this using libSystem we'd need syscall_syscallPtr for
+ // fdopendir. However, syscallPtr was only added in Go 1.13, so we fall
+ // back to raw syscalls for this func on Go 1.12.
+ var p unsafe.Pointer
+ if len(buf) > 0 {
+ p = unsafe.Pointer(&buf[0])
+ } else {
+ p = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ return n, errnoErr(e1)
+ }
+ return n, nil
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go b/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
new file mode 100644
index 0000000000..f911617be9
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
@@ -0,0 +1,101 @@
+// 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 darwin,go1.13
+
+package unix
+
+import "unsafe"
+
+//sys closedir(dir uintptr) (err error)
+//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
+
+func fdopendir(fd int) (dir uintptr, err error) {
+ r0, _, e1 := syscall_syscallPtr(funcPC(libc_fdopendir_trampoline), uintptr(fd), 0, 0)
+ dir = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_fdopendir_trampoline()
+
+//go:linkname libc_fdopendir libc_fdopendir
+//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
+
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+ // Simulate Getdirentries using fdopendir/readdir_r/closedir.
+ // We store the number of entries to skip in the seek
+ // offset of fd. See issue #31368.
+ // It's not the full required semantics, but should handle the case
+ // of calling Getdirentries or ReadDirent repeatedly.
+ // It won't handle assigning the results of lseek to *basep, or handle
+ // the directory being edited underfoot.
+ skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
+ if err != nil {
+ return 0, err
+ }
+
+ // We need to duplicate the incoming file descriptor
+ // because the caller expects to retain control of it, but
+ // fdopendir expects to take control of its argument.
+ // Just Dup'ing the file descriptor is not enough, as the
+ // result shares underlying state. Use Openat to make a really
+ // new file descriptor referring to the same directory.
+ fd2, err := Openat(fd, ".", O_RDONLY, 0)
+ if err != nil {
+ return 0, err
+ }
+ d, err := fdopendir(fd2)
+ if err != nil {
+ Close(fd2)
+ return 0, err
+ }
+ defer closedir(d)
+
+ var cnt int64
+ for {
+ var entry Dirent
+ var entryp *Dirent
+ e := readdir_r(d, &entry, &entryp)
+ if e != 0 {
+ return n, errnoErr(e)
+ }
+ if entryp == nil {
+ break
+ }
+ if skip > 0 {
+ skip--
+ cnt++
+ continue
+ }
+ reclen := int(entry.Reclen)
+ if reclen > len(buf) {
+ // Not enough room. Return for now.
+ // The counter will let us know where we should start up again.
+ // Note: this strategy for suspending in the middle and
+ // restarting is O(n^2) in the length of the directory. Oh well.
+ break
+ }
+ // Copy entry into return buffer.
+ s := struct {
+ ptr unsafe.Pointer
+ siz int
+ cap int
+ }{ptr: unsafe.Pointer(&entry), siz: reclen, cap: reclen}
+ copy(buf, *(*[]byte)(unsafe.Pointer(&s)))
+ buf = buf[reclen:]
+ n += reclen
+ cnt++
+ }
+ // Set the seek offset of the input fd to record
+ // how many files we've already returned.
+ _, err = Seek(fd, cnt, 0 /* SEEK_SET */)
+ if err != nil {
+ return n, err
+ }
+
+ return n, nil
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 3e1cdfb505..0a1cc74b3e 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -339,42 +339,7 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-// ioctl itself should not be exposed directly, but additional get/set
-// functions for specific types are permissible.
-
-// IoctlSetInt performs an ioctl operation which sets an integer value
-// on fd, using the specified request number.
-func IoctlSetInt(fd int, req uint, value int) error {
- return ioctl(fd, req, uintptr(value))
-}
-
-func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func ioctlSetTermios(fd int, req uint, value *Termios) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-// IoctlGetInt performs an ioctl operation which gets an integer value
-// from fd, using the specified request number.
-func IoctlGetInt(fd int, req uint) (int, error) {
- var value int
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return value, err
-}
-
-func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
- var value Winsize
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-func IoctlGetTermios(fd int, req uint) (*Termios, error) {
- var value Termios
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
func Uname(uname *Utsname) error {
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
@@ -497,7 +462,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Revoke(path string) (err error)
//sys Rmdir(path string) (err error)
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
+//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
//sys Setegid(egid int) (err error)
//sysnb Seteuid(euid int) (err error)
//sysnb Setgid(gid int) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go
new file mode 100644
index 0000000000..6b223f91a5
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go
@@ -0,0 +1,9 @@
+// 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 darwin,386,!go1.12
+
+package unix
+
+//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
index cd8be182a5..707ba4f59a 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
@@ -45,6 +45,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
@@ -58,7 +62,6 @@ const SYS___SYSCTL = SYS_SYSCTL
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go
new file mode 100644
index 0000000000..68ebd6fab2
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go
@@ -0,0 +1,9 @@
+// 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 darwin,amd64,!go1.12
+
+package unix
+
+//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
index d0d07243ce..fdbfb5911a 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
@@ -45,6 +45,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
@@ -58,7 +62,6 @@ const SYS___SYSCTL = SYS_SYSCTL
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go
new file mode 100644
index 0000000000..c81510da27
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go
@@ -0,0 +1,11 @@
+// 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 darwin,386,!go1.12
+
+package unix
+
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+ return 0, ENOSYS
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
index 01e8a38a94..f8bc4cfb1f 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
@@ -45,6 +45,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
@@ -62,7 +66,3 @@ const SYS___SYSCTL = SYS_SYSCTL
//sys Lstat(path string, stat *Stat_t) (err error)
//sys Stat(path string, stat *Stat_t) (err error)
//sys Statfs(path string, stat *Statfs_t) (err error)
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- return 0, ENOSYS
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go
new file mode 100644
index 0000000000..01d450406b
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go
@@ -0,0 +1,11 @@
+// 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 darwin,arm64,!go1.12
+
+package unix
+
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+ return 0, ENOSYS
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
index e674f81dad..5ede3ac316 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
@@ -47,6 +47,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
@@ -64,7 +68,3 @@ const SYS___SYSCTL = SYS_SYSCTL
//sys Lstat(path string, stat *Stat_t) (err error)
//sys Stat(path string, stat *Stat_t) (err error)
//sys Statfs(path string, stat *Statfs_t) (err error)
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- return 0, ENOSYS
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
index 4b4ae460f2..f34c86c899 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
@@ -15,6 +15,7 @@ func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err
func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only
func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
//go:linkname syscall_syscall syscall.syscall
//go:linkname syscall_syscall6 syscall.syscall6
@@ -22,6 +23,7 @@ func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, er
//go:linkname syscall_syscall9 syscall.syscall9
//go:linkname syscall_rawSyscall syscall.rawSyscall
//go:linkname syscall_rawSyscall6 syscall.rawSyscall6
+//go:linkname syscall_syscallPtr syscall.syscallPtr
// Find the entry point for f. See comments in runtime/proc.go for the
// function of the same name.
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
index 260a400f91..8a195ae586 100644
--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
+++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
@@ -12,7 +12,25 @@
package unix
-import "unsafe"
+import (
+ "sync"
+ "unsafe"
+)
+
+// See version list in https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/sys/sys/param.h
+var (
+ osreldateOnce sync.Once
+ osreldate uint32
+)
+
+// First __DragonFly_version after September 2019 ABI changes
+// http://lists.dragonflybsd.org/pipermail/users/2019-September/358280.html
+const _dragonflyABIChangeVersion = 500705
+
+func supportsABI(ver uint32) bool {
+ osreldateOnce.Do(func() { osreldate, _ = SysctlUint32("kern.osreldate") })
+ return osreldate >= ver
+}
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
type SockaddrDatalink struct {
@@ -150,42 +168,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-// ioctl itself should not be exposed directly, but additional get/set
-// functions for specific types are permissible.
-
-// IoctlSetInt performs an ioctl operation which sets an integer value
-// on fd, using the specified request number.
-func IoctlSetInt(fd int, req uint, value int) error {
- return ioctl(fd, req, uintptr(value))
-}
-
-func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func ioctlSetTermios(fd int, req uint, value *Termios) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-// IoctlGetInt performs an ioctl operation which gets an integer value
-// from fd, using the specified request number.
-func IoctlGetInt(fd int, req uint) (int, error) {
- var value int
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return value, err
-}
-
-func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
- var value Winsize
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-func IoctlGetTermios(fd int, req uint) (*Termios, error) {
- var value Termios
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
func sysctlUname(mib []_C_int, old *byte, oldlen *uintptr) error {
err := sysctl(mib, old, oldlen, nil, 0)
@@ -325,7 +308,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Revoke(path string) (err error)
//sys Rmdir(path string) (err error)
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
+//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
//sysnb Setegid(egid int) (err error)
//sysnb Seteuid(euid int) (err error)
//sysnb Setgid(gid int) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
index 9babb31ea7..a6b4830ac8 100644
--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
@@ -33,6 +33,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
index 329d240b90..34918d8ed7 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
@@ -201,42 +201,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-// ioctl itself should not be exposed directly, but additional get/set
-// functions for specific types are permissible.
-
-// IoctlSetInt performs an ioctl operation which sets an integer value
-// on fd, using the specified request number.
-func IoctlSetInt(fd int, req uint, value int) error {
- return ioctl(fd, req, uintptr(value))
-}
-
-func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func ioctlSetTermios(fd int, req uint, value *Termios) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-// IoctlGetInt performs an ioctl operation which gets an integer value
-// from fd, using the specified request number.
-func IoctlGetInt(fd int, req uint) (int, error) {
- var value int
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return value, err
-}
-
-func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
- var value Winsize
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-func IoctlGetTermios(fd int, req uint) (*Termios, error) {
- var value Termios
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
func Uname(uname *Utsname) error {
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
@@ -497,8 +462,12 @@ func convertFromDirents11(buf []byte, old []byte) int {
dstPos := 0
srcPos := 0
for dstPos+fixedSize < len(buf) && srcPos+oldFixedSize < len(old) {
- dstDirent := (*Dirent)(unsafe.Pointer(&buf[dstPos]))
- srcDirent := (*dirent_freebsd11)(unsafe.Pointer(&old[srcPos]))
+ var dstDirent Dirent
+ var srcDirent dirent_freebsd11
+
+ // If multiple direntries are written, sometimes when we reach the final one,
+ // we may have cap of old less than size of dirent_freebsd11.
+ copy((*[unsafe.Sizeof(srcDirent)]byte)(unsafe.Pointer(&srcDirent))[:], old[srcPos:])
reclen := roundup(fixedSize+int(srcDirent.Namlen)+1, 8)
if dstPos+reclen > len(buf) {
@@ -514,6 +483,7 @@ func convertFromDirents11(buf []byte, old []byte) int {
dstDirent.Pad1 = 0
copy(dstDirent.Name[:], srcDirent.Name[:srcDirent.Namlen])
+ copy(buf[dstPos:], (*[unsafe.Sizeof(dstDirent)]byte)(unsafe.Pointer(&dstDirent))[:])
padding := buf[dstPos+fixedSize+int(dstDirent.Namlen) : dstPos+reclen]
for i := range padding {
padding[i] = 0
@@ -688,7 +658,7 @@ func PtraceSingleStep(pid int) (err error) {
//sys Revoke(path string) (err error)
//sys Rmdir(path string) (err error)
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
+//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
//sysnb Setegid(egid int) (err error)
//sysnb Seteuid(euid int) (err error)
//sysnb Setgid(gid int) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
index 21e03958cd..dcc56457a0 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
@@ -33,6 +33,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
index 9c945a6579..321c3baceb 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
@@ -33,6 +33,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
index 5cd6243f2a..6977008313 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
@@ -33,6 +33,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
index a318054878..dbbbfd6035 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
@@ -33,6 +33,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index 637b5017b8..26903bca8c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -71,6 +71,17 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
// ioctl itself should not be exposed directly, but additional get/set
// functions for specific types are permissible.
+// IoctlRetInt performs an ioctl operation specified by req on a device
+// associated with opened file descriptor fd, and returns a non-negative
+// integer that is returned by the ioctl syscall.
+func IoctlRetInt(fd int, req uint) (int, error) {
+ ret, _, err := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), 0)
+ if err != 0 {
+ return 0, err
+ }
+ return int(ret), nil
+}
+
// IoctlSetPointerInt performs an ioctl operation which sets an
// integer value on fd, using the specified request number. The ioctl
// argument is called with a pointer to the integer value, rather than
@@ -80,52 +91,18 @@ func IoctlSetPointerInt(fd int, req uint, value int) error {
return ioctl(fd, req, uintptr(unsafe.Pointer(&v)))
}
-// IoctlSetInt performs an ioctl operation which sets an integer value
-// on fd, using the specified request number.
-func IoctlSetInt(fd int, req uint, value int) error {
- return ioctl(fd, req, uintptr(value))
-}
-
-func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func ioctlSetTermios(fd int, req uint, value *Termios) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
func IoctlSetRTCTime(fd int, value *RTCTime) error {
err := ioctl(fd, RTC_SET_TIME, uintptr(unsafe.Pointer(value)))
runtime.KeepAlive(value)
return err
}
-// IoctlGetInt performs an ioctl operation which gets an integer value
-// from fd, using the specified request number.
-func IoctlGetInt(fd int, req uint) (int, error) {
- var value int
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return value, err
-}
-
func IoctlGetUint32(fd int, req uint) (uint32, error) {
var value uint32
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return value, err
}
-func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
- var value Winsize
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-func IoctlGetTermios(fd int, req uint) (*Termios, error) {
- var value Termios
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
func IoctlGetRTCTime(fd int) (*RTCTime, error) {
var value RTCTime
err := ioctl(fd, RTC_RD_TIME, uintptr(unsafe.Pointer(&value)))
@@ -798,6 +775,70 @@ func (sa *SockaddrPPPoE) sockaddr() (unsafe.Pointer, _Socklen, error) {
return unsafe.Pointer(&sa.raw), SizeofSockaddrPPPoX, nil
}
+// SockaddrTIPC implements the Sockaddr interface for AF_TIPC type sockets.
+// For more information on TIPC, see: http://tipc.sourceforge.net/.
+type SockaddrTIPC struct {
+ // Scope is the publication scopes when binding service/service range.
+ // Should be set to TIPC_CLUSTER_SCOPE or TIPC_NODE_SCOPE.
+ Scope int
+
+ // Addr is the type of address used to manipulate a socket. Addr must be
+ // one of:
+ // - *TIPCSocketAddr: "id" variant in the C addr union
+ // - *TIPCServiceRange: "nameseq" variant in the C addr union
+ // - *TIPCServiceName: "name" variant in the C addr union
+ //
+ // If nil, EINVAL will be returned when the structure is used.
+ Addr TIPCAddr
+
+ raw RawSockaddrTIPC
+}
+
+// TIPCAddr is implemented by types that can be used as an address for
+// SockaddrTIPC. It is only implemented by *TIPCSocketAddr, *TIPCServiceRange,
+// and *TIPCServiceName.
+type TIPCAddr interface {
+ tipcAddrtype() uint8
+ tipcAddr() [12]byte
+}
+
+func (sa *TIPCSocketAddr) tipcAddr() [12]byte {
+ var out [12]byte
+ copy(out[:], (*(*[unsafe.Sizeof(TIPCSocketAddr{})]byte)(unsafe.Pointer(sa)))[:])
+ return out
+}
+
+func (sa *TIPCSocketAddr) tipcAddrtype() uint8 { return TIPC_SOCKET_ADDR }
+
+func (sa *TIPCServiceRange) tipcAddr() [12]byte {
+ var out [12]byte
+ copy(out[:], (*(*[unsafe.Sizeof(TIPCServiceRange{})]byte)(unsafe.Pointer(sa)))[:])
+ return out
+}
+
+func (sa *TIPCServiceRange) tipcAddrtype() uint8 { return TIPC_SERVICE_RANGE }
+
+func (sa *TIPCServiceName) tipcAddr() [12]byte {
+ var out [12]byte
+ copy(out[:], (*(*[unsafe.Sizeof(TIPCServiceName{})]byte)(unsafe.Pointer(sa)))[:])
+ return out
+}
+
+func (sa *TIPCServiceName) tipcAddrtype() uint8 { return TIPC_SERVICE_ADDR }
+
+func (sa *SockaddrTIPC) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ if sa.Addr == nil {
+ return nil, 0, EINVAL
+ }
+
+ sa.raw.Family = AF_TIPC
+ sa.raw.Scope = int8(sa.Scope)
+ sa.raw.Addrtype = sa.Addr.tipcAddrtype()
+ sa.raw.Addr = sa.Addr.tipcAddr()
+
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil
+}
+
func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
switch rsa.Addr.Family {
case AF_NETLINK:
@@ -843,7 +884,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
for n < len(pp.Path) && pp.Path[n] != 0 {
n++
}
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
+ bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
sa.Name = string(bytes)
return sa, nil
@@ -923,6 +964,27 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
break
}
}
+ return sa, nil
+ case AF_TIPC:
+ pp := (*RawSockaddrTIPC)(unsafe.Pointer(rsa))
+
+ sa := &SockaddrTIPC{
+ Scope: int(pp.Scope),
+ }
+
+ // Determine which union variant is present in pp.Addr by checking
+ // pp.Addrtype.
+ switch pp.Addrtype {
+ case TIPC_SERVICE_RANGE:
+ sa.Addr = (*TIPCServiceRange)(unsafe.Pointer(&pp.Addr))
+ case TIPC_SERVICE_ADDR:
+ sa.Addr = (*TIPCServiceName)(unsafe.Pointer(&pp.Addr))
+ case TIPC_SOCKET_ADDR:
+ sa.Addr = (*TIPCSocketAddr)(unsafe.Pointer(&pp.Addr))
+ default:
+ return nil, EINVAL
+ }
+
return sa, nil
}
return nil, EAFNOSUPPORT
@@ -1160,6 +1222,34 @@ func KeyctlDHCompute(params *KeyctlDHParams, buffer []byte) (size int, err error
return keyctlDH(KEYCTL_DH_COMPUTE, params, buffer)
}
+// KeyctlRestrictKeyring implements the KEYCTL_RESTRICT_KEYRING command. This
+// command limits the set of keys that can be linked to the keyring, regardless
+// of keyring permissions. The command requires the "setattr" permission.
+//
+// When called with an empty keyType the command locks the keyring, preventing
+// any further keys from being linked to the keyring.
+//
+// The "asymmetric" keyType defines restrictions requiring key payloads to be
+// DER encoded X.509 certificates signed by keys in another keyring. Restrictions
+// for "asymmetric" include "builtin_trusted", "builtin_and_secondary_trusted",
+// "key_or_keyring:", and "key_or_keyring::chain".
+//
+// As of Linux 4.12, only the "asymmetric" keyType defines type-specific
+// restrictions.
+//
+// See the full documentation at:
+// http://man7.org/linux/man-pages/man3/keyctl_restrict_keyring.3.html
+// http://man7.org/linux/man-pages/man2/keyctl.2.html
+func KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error {
+ if keyType == "" {
+ return keyctlRestrictKeyring(KEYCTL_RESTRICT_KEYRING, ringid)
+ }
+ return keyctlRestrictKeyringByType(KEYCTL_RESTRICT_KEYRING, ringid, keyType, restriction)
+}
+
+//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL
+//sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL
+
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
var msg Msghdr
var rsa RawSockaddrAny
@@ -1403,8 +1493,12 @@ func PtraceSyscall(pid int, signal int) (err error) {
func PtraceSingleStep(pid int) (err error) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) }
+func PtraceInterrupt(pid int) (err error) { return ptrace(PTRACE_INTERRUPT, pid, 0, 0) }
+
func PtraceAttach(pid int) (err error) { return ptrace(PTRACE_ATTACH, pid, 0, 0) }
+func PtraceSeize(pid int) (err error) { return ptrace(PTRACE_SEIZE, pid, 0, 0) }
+
func PtraceDetach(pid int) (err error) { return ptrace(PTRACE_DETACH, pid, 0, 0) }
//sys reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error)
@@ -1761,6 +1855,17 @@ func OpenByHandleAt(mountFD int, handle FileHandle, flags int) (fd int, err erro
return openByHandleAt(mountFD, handle.fileHandle, flags)
}
+// Klogset wraps the sys_syslog system call; it sets console_loglevel to
+// the value specified by arg and passes a dummy pointer to bufp.
+func Klogset(typ int, arg int) (err error) {
+ var p unsafe.Pointer
+ _, _, errno := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(p), uintptr(arg))
+ if errno != 0 {
+ return errnoErr(errno)
+ }
+ return nil
+}
+
/*
* Unimplemented
*/
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
index e2f8cf6e5a..e7fa665e68 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
@@ -372,6 +372,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
index 87a30744d6..088ce0f935 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
@@ -163,6 +163,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint64(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint64(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
index f626794439..11930fc8fa 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
@@ -252,6 +252,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
index cb20b15d5d..251e2d9715 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
@@ -180,6 +180,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint64(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint64(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
index b3b21ec1e2..7562fe97b8 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
@@ -208,6 +208,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint64(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint64(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
index 5144d4e133..a939ff8f21 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
@@ -220,6 +220,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
index 0a100b66a3..28d6d0f229 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
@@ -91,6 +91,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint64(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint64(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
index 6230f64052..6798c26258 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
@@ -179,6 +179,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint64(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint64(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
index f81dbdc9c8..eb5cb1a71d 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
@@ -120,6 +120,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint64(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint64(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
index b69565616f..37321c12ef 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
@@ -107,6 +107,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint64(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint64(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
index 5ef3090401..211131d9cf 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
@@ -187,42 +187,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-// ioctl itself should not be exposed directly, but additional get/set
-// functions for specific types are permissible.
-
-// IoctlSetInt performs an ioctl operation which sets an integer value
-// on fd, using the specified request number.
-func IoctlSetInt(fd int, req uint, value int) error {
- return ioctl(fd, req, uintptr(value))
-}
-
-func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func ioctlSetTermios(fd int, req uint, value *Termios) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-// IoctlGetInt performs an ioctl operation which gets an integer value
-// from fd, using the specified request number.
-func IoctlGetInt(fd int, req uint) (int, error) {
- var value int
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return value, err
-}
-
-func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
- var value Winsize
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-func IoctlGetTermios(fd int, req uint) (*Termios, error) {
- var value Termios
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
func IoctlGetPtmget(fd int, req uint) (*Ptmget, error) {
var value Ptmget
@@ -365,7 +330,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Revoke(path string) (err error)
//sys Rmdir(path string) (err error)
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
+//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
//sysnb Setegid(egid int) (err error)
//sysnb Seteuid(euid int) (err error)
//sysnb Setgid(gid int) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
index 24f74e58ce..24da8b5245 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
@@ -28,6 +28,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
index 6878bf7ff9..25a0ac8258 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
@@ -28,6 +28,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
index dbbfcf71db..21591ecd4d 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
@@ -28,6 +28,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
index f3434465a1..8047496350 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
@@ -28,6 +28,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
index 1a074b2fe1..92ed67de0b 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
@@ -178,42 +178,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-// ioctl itself should not be exposed directly, but additional get/set
-// functions for specific types are permissible.
-
-// IoctlSetInt performs an ioctl operation which sets an integer value
-// on fd, using the specified request number.
-func IoctlSetInt(fd int, req uint, value int) error {
- return ioctl(fd, req, uintptr(value))
-}
-
-func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func ioctlSetTermios(fd int, req uint, value *Termios) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-// IoctlGetInt performs an ioctl operation which gets an integer value
-// from fd, using the specified request number.
-func IoctlGetInt(fd int, req uint) (int, error) {
- var value int
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return value, err
-}
-
-func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
- var value Winsize
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-func IoctlGetTermios(fd int, req uint) (*Termios, error) {
- var value Termios
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
@@ -340,7 +305,7 @@ func Uname(uname *Utsname) error {
//sys Revoke(path string) (err error)
//sys Rmdir(path string) (err error)
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
+//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
//sysnb Setegid(egid int) (err error)
//sysnb Seteuid(euid int) (err error)
//sysnb Setgid(gid int) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
index d62da60d1f..42b5a0e51e 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
@@ -28,6 +28,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
index 9a35334cba..6ea4b48831 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
@@ -28,6 +28,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
index 5d812aaea5..1c3d26fa2c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
@@ -28,6 +28,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
index 0fb39cf5eb..a8c458cb03 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
@@ -28,6 +28,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go
index 0153a316dd..0e2a696ad3 100644
--- a/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -391,7 +391,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
for n < len(pp.Path) && pp.Path[n] != 0 {
n++
}
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
+ bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
sa.Name = string(bytes)
return sa, nil
@@ -553,40 +553,10 @@ func Minor(dev uint64) uint32 {
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-func IoctlSetInt(fd int, req uint, value int) (err error) {
- return ioctl(fd, req, uintptr(value))
-}
-
-func ioctlSetWinsize(fd int, req uint, value *Winsize) (err error) {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func ioctlSetTermios(fd int, req uint, value *Termios) (err error) {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
func IoctlSetTermio(fd int, req uint, value *Termio) (err error) {
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
}
-func IoctlGetInt(fd int, req uint) (int, error) {
- var value int
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return value, err
-}
-
-func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
- var value Winsize
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-func IoctlGetTermios(fd int, req uint) (*Termios, error) {
- var value Termios
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
func IoctlGetTermio(fd int, req uint) (*Termio, error) {
var value Termio
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
@@ -679,7 +649,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Rmdir(path string) (err error)
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
+//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
//sysnb Setegid(egid int) (err error)
//sysnb Seteuid(euid int) (err error)
//sysnb Setgid(gid int) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
index 91c32ddf02..b22a34d7ae 100644
--- a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
@@ -18,6 +18,10 @@ func (iov *Iovec) SetLen(length int) {
iov.Len = uint64(length)
}
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = int32(length)
+}
+
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
index 3b39d7408a..6217cdba57 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
@@ -3,7 +3,7 @@
// +build 386,darwin
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m32 _const.go
package unix
@@ -980,6 +980,7 @@ const (
NET_RT_MAXID = 0xa
NET_RT_STAT = 0x4
NET_RT_TRASH = 0x5
+ NFDBITS = 0x20
NL0 = 0x0
NL1 = 0x100
NL2 = 0x200
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
index 8fe5547775..e3ff2ee3d4 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
@@ -3,7 +3,7 @@
// +build amd64,darwin
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
package unix
@@ -980,6 +980,7 @@ const (
NET_RT_MAXID = 0xa
NET_RT_STAT = 0x4
NET_RT_TRASH = 0x5
+ NFDBITS = 0x20
NL0 = 0x0
NL1 = 0x100
NL2 = 0x200
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
index 7a977770d0..3e417571a9 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
@@ -3,7 +3,7 @@
// +build arm,darwin
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- _const.go
package unix
@@ -980,6 +980,7 @@ const (
NET_RT_MAXID = 0xa
NET_RT_STAT = 0x4
NET_RT_TRASH = 0x5
+ NFDBITS = 0x20
NL0 = 0x0
NL1 = 0x100
NL2 = 0x200
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
index 6d56d8a059..cbd8ed18b9 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
@@ -3,7 +3,7 @@
// +build arm64,darwin
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
package unix
@@ -980,6 +980,7 @@ const (
NET_RT_MAXID = 0xa
NET_RT_STAT = 0x4
NET_RT_TRASH = 0x5
+ NFDBITS = 0x20
NL0 = 0x0
NL1 = 0x100
NL2 = 0x200
diff --git a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
index bbe6089bb7..6130471748 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
@@ -938,6 +938,7 @@ const (
NET_RT_FLAGS = 0x2
NET_RT_IFLIST = 0x3
NET_RT_MAXID = 0x4
+ NFDBITS = 0x40
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ATTRIB = 0x8
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
index d2bbaabc87..b72544fcd2 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
@@ -3,7 +3,7 @@
// +build 386,freebsd
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m32 _const.go
package unix
@@ -1055,6 +1055,7 @@ const (
NET_RT_IFLIST = 0x3
NET_RT_IFLISTL = 0x5
NET_RT_IFMALIST = 0x4
+ NFDBITS = 0x20
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ATTRIB = 0x8
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
index 4f8db783d3..9f382678e5 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
@@ -3,7 +3,7 @@
// +build amd64,freebsd
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
package unix
@@ -1056,6 +1056,7 @@ const (
NET_RT_IFLIST = 0x3
NET_RT_IFLISTL = 0x5
NET_RT_IFMALIST = 0x4
+ NFDBITS = 0x40
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ATTRIB = 0x8
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
index 53e5de6051..16db56abc4 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
@@ -3,7 +3,7 @@
// +build arm,freebsd
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- _const.go
package unix
@@ -1063,6 +1063,7 @@ const (
NET_RT_IFLIST = 0x3
NET_RT_IFLISTL = 0x5
NET_RT_IFMALIST = 0x4
+ NFDBITS = 0x20
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ATTRIB = 0x8
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
index d4a192fefe..1a1de34543 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
@@ -3,7 +3,7 @@
// +build arm64,freebsd
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
package unix
@@ -1056,6 +1056,7 @@ const (
NET_RT_IFLIST = 0x3
NET_RT_IFLISTL = 0x5
NET_RT_IFMALIST = 0x4
+ NFDBITS = 0x40
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ATTRIB = 0x8
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index 3fb475bcc0..97332d03c3 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -253,6 +253,7 @@ const (
BPF_F_STACK_BUILD_ID = 0x20
BPF_F_STRICT_ALIGNMENT = 0x1
BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
BPF_F_TUNINFO_IPV6 = 0x1
BPF_F_USER_BUILD_ID = 0x800
BPF_F_USER_STACK = 0x100
@@ -304,9 +305,10 @@ const (
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
BPF_ST = 0x2
BPF_STX = 0x3
@@ -459,7 +461,14 @@ const (
CSUSP = 0x1a
DAXFS_MAGIC = 0x64646178
DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -560,6 +569,7 @@ const (
ETH_P_IRDA = 0x17
ETH_P_LAT = 0x6004
ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
@@ -1087,6 +1097,17 @@ const (
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
@@ -1099,6 +1120,8 @@ const (
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
KEYCTL_NEGATE = 0xd
KEYCTL_PKEY_DECRYPT = 0x1a
KEYCTL_PKEY_ENCRYPT = 0x19
@@ -1344,6 +1367,7 @@ const (
NETLINK_XFRM = 0x6
NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFDBITS = 0x20
NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8
NFNLGRP_CONNTRACK_DESTROY = 0x3
@@ -1408,6 +1432,10 @@ const (
NLM_F_ROOT = 0x100
NOFLSH = 0x80
NSFS_MAGIC = 0x6e736673
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -1673,6 +1701,8 @@ const (
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
PTRACE_EVENT_CLONE = 0x3
PTRACE_EVENT_EXEC = 0x4
PTRACE_EVENT_EXIT = 0x6
@@ -1688,6 +1718,7 @@ const (
PTRACE_GETREGSET = 0x4204
PTRACE_GETSIGINFO = 0x4202
PTRACE_GETSIGMASK = 0x420a
+ PTRACE_GET_SYSCALL_INFO = 0x420e
PTRACE_GET_THREAD_AREA = 0x19
PTRACE_INTERRUPT = 0x4207
PTRACE_KILL = 0x8
@@ -1726,6 +1757,10 @@ const (
PTRACE_SINGLEBLOCK = 0x21
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_SYSEMU = 0x1f
PTRACE_SYSEMU_SINGLESTEP = 0x20
PTRACE_TRACEME = 0x0
@@ -1786,7 +1821,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1d
+ RTA_MAX = 0x1e
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@@ -1859,6 +1894,7 @@ const (
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
@@ -1883,6 +1919,7 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
@@ -1890,7 +1927,7 @@ const (
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x67
+ RTM_MAX = 0x6b
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@@ -1902,6 +1939,7 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
@@ -1910,8 +1948,8 @@ const (
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x16
- RTM_NR_MSGTYPES = 0x58
+ RTM_NR_FAMILIES = 0x17
+ RTM_NR_MSGTYPES = 0x5c
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
@@ -1996,6 +2034,8 @@ const (
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
@@ -2134,6 +2174,7 @@ const (
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
+ SO_DETACH_REUSEPORT_BPF = 0x44
SO_DOMAIN = 0x27
SO_DONTROUTE = 0x5
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
@@ -2434,6 +2475,71 @@ const (
TIOCSTI = 0x5412
TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
TMPFS_MAGIC = 0x1021994
TOSTOP = 0x100
TPACKET_ALIGNMENT = 0x10
@@ -2447,7 +2553,7 @@ const (
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = -0x80000000
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
TP_STATUS_TS_SOFTWARE = 0x20000000
TP_STATUS_TS_SYS_HARDWARE = 0x40000000
TP_STATUS_USER = 0x1
@@ -2646,6 +2752,8 @@ const (
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
XDP_PACKET_HEADROOM = 0x100
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
@@ -2662,6 +2770,7 @@ const (
XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342
XTABS = 0x1800
+ Z3FOLD_MAGIC = 0x33
ZSMALLOC_MAGIC = 0x58295829
)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index 9c4e19f9a3..d81d30b732 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -253,6 +253,7 @@ const (
BPF_F_STACK_BUILD_ID = 0x20
BPF_F_STRICT_ALIGNMENT = 0x1
BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
BPF_F_TUNINFO_IPV6 = 0x1
BPF_F_USER_BUILD_ID = 0x800
BPF_F_USER_STACK = 0x100
@@ -304,9 +305,10 @@ const (
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
BPF_ST = 0x2
BPF_STX = 0x3
@@ -459,7 +461,14 @@ const (
CSUSP = 0x1a
DAXFS_MAGIC = 0x64646178
DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -560,6 +569,7 @@ const (
ETH_P_IRDA = 0x17
ETH_P_LAT = 0x6004
ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
@@ -1087,6 +1097,17 @@ const (
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
@@ -1099,6 +1120,8 @@ const (
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
KEYCTL_NEGATE = 0xd
KEYCTL_PKEY_DECRYPT = 0x1a
KEYCTL_PKEY_ENCRYPT = 0x19
@@ -1344,6 +1367,7 @@ const (
NETLINK_XFRM = 0x6
NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFDBITS = 0x40
NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8
NFNLGRP_CONNTRACK_DESTROY = 0x3
@@ -1408,6 +1432,10 @@ const (
NLM_F_ROOT = 0x100
NOFLSH = 0x80
NSFS_MAGIC = 0x6e736673
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -1674,6 +1702,8 @@ const (
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
PTRACE_EVENT_CLONE = 0x3
PTRACE_EVENT_EXEC = 0x4
PTRACE_EVENT_EXIT = 0x6
@@ -1689,6 +1719,7 @@ const (
PTRACE_GETREGSET = 0x4204
PTRACE_GETSIGINFO = 0x4202
PTRACE_GETSIGMASK = 0x420a
+ PTRACE_GET_SYSCALL_INFO = 0x420e
PTRACE_GET_THREAD_AREA = 0x19
PTRACE_INTERRUPT = 0x4207
PTRACE_KILL = 0x8
@@ -1727,6 +1758,10 @@ const (
PTRACE_SINGLEBLOCK = 0x21
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_SYSEMU = 0x1f
PTRACE_SYSEMU_SINGLESTEP = 0x20
PTRACE_TRACEME = 0x0
@@ -1787,7 +1822,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1d
+ RTA_MAX = 0x1e
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@@ -1860,6 +1895,7 @@ const (
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
@@ -1884,6 +1920,7 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
@@ -1891,7 +1928,7 @@ const (
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x67
+ RTM_MAX = 0x6b
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@@ -1903,6 +1940,7 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
@@ -1911,8 +1949,8 @@ const (
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x16
- RTM_NR_MSGTYPES = 0x58
+ RTM_NR_FAMILIES = 0x17
+ RTM_NR_MSGTYPES = 0x5c
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
@@ -1997,6 +2035,8 @@ const (
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
@@ -2135,6 +2175,7 @@ const (
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
+ SO_DETACH_REUSEPORT_BPF = 0x44
SO_DOMAIN = 0x27
SO_DONTROUTE = 0x5
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
@@ -2435,6 +2476,71 @@ const (
TIOCSTI = 0x5412
TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
TMPFS_MAGIC = 0x1021994
TOSTOP = 0x100
TPACKET_ALIGNMENT = 0x10
@@ -2448,7 +2554,7 @@ const (
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = -0x80000000
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
TP_STATUS_TS_SOFTWARE = 0x20000000
TP_STATUS_TS_SYS_HARDWARE = 0x40000000
TP_STATUS_USER = 0x1
@@ -2646,6 +2752,8 @@ const (
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
XDP_PACKET_HEADROOM = 0x100
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
@@ -2662,6 +2770,7 @@ const (
XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342
XTABS = 0x1800
+ Z3FOLD_MAGIC = 0x33
ZSMALLOC_MAGIC = 0x58295829
)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index a1f038c06d..0d22b52b6e 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -253,6 +253,7 @@ const (
BPF_F_STACK_BUILD_ID = 0x20
BPF_F_STRICT_ALIGNMENT = 0x1
BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
BPF_F_TUNINFO_IPV6 = 0x1
BPF_F_USER_BUILD_ID = 0x800
BPF_F_USER_STACK = 0x100
@@ -304,9 +305,10 @@ const (
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
BPF_ST = 0x2
BPF_STX = 0x3
@@ -459,7 +461,14 @@ const (
CSUSP = 0x1a
DAXFS_MAGIC = 0x64646178
DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -560,6 +569,7 @@ const (
ETH_P_IRDA = 0x17
ETH_P_LAT = 0x6004
ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
@@ -1086,6 +1096,17 @@ const (
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
@@ -1098,6 +1119,8 @@ const (
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
KEYCTL_NEGATE = 0xd
KEYCTL_PKEY_DECRYPT = 0x1a
KEYCTL_PKEY_ENCRYPT = 0x19
@@ -1342,6 +1365,7 @@ const (
NETLINK_XFRM = 0x6
NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFDBITS = 0x20
NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8
NFNLGRP_CONNTRACK_DESTROY = 0x3
@@ -1406,6 +1430,10 @@ const (
NLM_F_ROOT = 0x100
NOFLSH = 0x80
NSFS_MAGIC = 0x6e736673
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -1671,6 +1699,8 @@ const (
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
PTRACE_EVENT_CLONE = 0x3
PTRACE_EVENT_EXEC = 0x4
PTRACE_EVENT_EXIT = 0x6
@@ -1692,6 +1722,7 @@ const (
PTRACE_GETSIGMASK = 0x420a
PTRACE_GETVFPREGS = 0x1b
PTRACE_GETWMMXREGS = 0x12
+ PTRACE_GET_SYSCALL_INFO = 0x420e
PTRACE_GET_THREAD_AREA = 0x16
PTRACE_INTERRUPT = 0x4207
PTRACE_KILL = 0x8
@@ -1732,6 +1763,10 @@ const (
PTRACE_SET_SYSCALL = 0x17
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_TRACEME = 0x0
PT_DATA_ADDR = 0x10004
PT_TEXT_ADDR = 0x10000
@@ -1793,7 +1828,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1d
+ RTA_MAX = 0x1e
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@@ -1866,6 +1901,7 @@ const (
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
@@ -1890,6 +1926,7 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
@@ -1897,7 +1934,7 @@ const (
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x67
+ RTM_MAX = 0x6b
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@@ -1909,6 +1946,7 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
@@ -1917,8 +1955,8 @@ const (
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x16
- RTM_NR_MSGTYPES = 0x58
+ RTM_NR_FAMILIES = 0x17
+ RTM_NR_MSGTYPES = 0x5c
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
@@ -2003,6 +2041,8 @@ const (
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
@@ -2141,6 +2181,7 @@ const (
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
+ SO_DETACH_REUSEPORT_BPF = 0x44
SO_DOMAIN = 0x27
SO_DONTROUTE = 0x5
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
@@ -2441,6 +2482,71 @@ const (
TIOCSTI = 0x5412
TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
TMPFS_MAGIC = 0x1021994
TOSTOP = 0x100
TPACKET_ALIGNMENT = 0x10
@@ -2454,7 +2560,7 @@ const (
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = -0x80000000
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
TP_STATUS_TS_SOFTWARE = 0x20000000
TP_STATUS_TS_SYS_HARDWARE = 0x40000000
TP_STATUS_USER = 0x1
@@ -2652,6 +2758,8 @@ const (
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
XDP_PACKET_HEADROOM = 0x100
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
@@ -2668,6 +2776,7 @@ const (
XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342
XTABS = 0x1800
+ Z3FOLD_MAGIC = 0x33
ZSMALLOC_MAGIC = 0x58295829
)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index 504ce13898..0a0267d7d3 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -253,6 +253,7 @@ const (
BPF_F_STACK_BUILD_ID = 0x20
BPF_F_STRICT_ALIGNMENT = 0x1
BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
BPF_F_TUNINFO_IPV6 = 0x1
BPF_F_USER_BUILD_ID = 0x800
BPF_F_USER_STACK = 0x100
@@ -304,9 +305,10 @@ const (
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
BPF_ST = 0x2
BPF_STX = 0x3
@@ -459,7 +461,14 @@ const (
CSUSP = 0x1a
DAXFS_MAGIC = 0x64646178
DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -561,6 +570,7 @@ const (
ETH_P_IRDA = 0x17
ETH_P_LAT = 0x6004
ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
@@ -1089,6 +1099,17 @@ const (
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
@@ -1101,6 +1122,8 @@ const (
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
KEYCTL_NEGATE = 0xd
KEYCTL_PKEY_DECRYPT = 0x1a
KEYCTL_PKEY_ENCRYPT = 0x19
@@ -1345,6 +1368,7 @@ const (
NETLINK_XFRM = 0x6
NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFDBITS = 0x40
NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8
NFNLGRP_CONNTRACK_DESTROY = 0x3
@@ -1409,6 +1433,10 @@ const (
NLM_F_ROOT = 0x100
NOFLSH = 0x80
NSFS_MAGIC = 0x6e736673
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -1674,6 +1702,8 @@ const (
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
PTRACE_EVENT_CLONE = 0x3
PTRACE_EVENT_EXEC = 0x4
PTRACE_EVENT_EXIT = 0x6
@@ -1687,6 +1717,7 @@ const (
PTRACE_GETREGSET = 0x4204
PTRACE_GETSIGINFO = 0x4202
PTRACE_GETSIGMASK = 0x420a
+ PTRACE_GET_SYSCALL_INFO = 0x420e
PTRACE_INTERRUPT = 0x4207
PTRACE_KILL = 0x8
PTRACE_LISTEN = 0x4208
@@ -1719,6 +1750,12 @@ const (
PTRACE_SETSIGMASK = 0x420b
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
+ PTRACE_SYSEMU = 0x1f
+ PTRACE_SYSEMU_SINGLESTEP = 0x20
PTRACE_TRACEME = 0x0
QNX4_SUPER_MAGIC = 0x2f
QNX6_SUPER_MAGIC = 0x68191122
@@ -1777,7 +1814,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1d
+ RTA_MAX = 0x1e
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@@ -1850,6 +1887,7 @@ const (
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
@@ -1874,6 +1912,7 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
@@ -1881,7 +1920,7 @@ const (
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x67
+ RTM_MAX = 0x6b
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@@ -1893,6 +1932,7 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
@@ -1901,8 +1941,8 @@ const (
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x16
- RTM_NR_MSGTYPES = 0x58
+ RTM_NR_FAMILIES = 0x17
+ RTM_NR_MSGTYPES = 0x5c
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
@@ -1987,6 +2027,8 @@ const (
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
@@ -2125,6 +2167,7 @@ const (
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
+ SO_DETACH_REUSEPORT_BPF = 0x44
SO_DOMAIN = 0x27
SO_DONTROUTE = 0x5
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
@@ -2426,6 +2469,71 @@ const (
TIOCSTI = 0x5412
TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
TMPFS_MAGIC = 0x1021994
TOSTOP = 0x100
TPACKET_ALIGNMENT = 0x10
@@ -2439,7 +2547,7 @@ const (
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = -0x80000000
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
TP_STATUS_TS_SOFTWARE = 0x20000000
TP_STATUS_TS_SYS_HARDWARE = 0x40000000
TP_STATUS_USER = 0x1
@@ -2637,6 +2745,8 @@ const (
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
XDP_PACKET_HEADROOM = 0x100
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
@@ -2653,6 +2763,7 @@ const (
XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342
XTABS = 0x1800
+ Z3FOLD_MAGIC = 0x33
ZSMALLOC_MAGIC = 0x58295829
)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
index 58b642904f..33dd99eeb8 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -253,6 +253,7 @@ const (
BPF_F_STACK_BUILD_ID = 0x20
BPF_F_STRICT_ALIGNMENT = 0x1
BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
BPF_F_TUNINFO_IPV6 = 0x1
BPF_F_USER_BUILD_ID = 0x800
BPF_F_USER_STACK = 0x100
@@ -304,9 +305,10 @@ const (
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
BPF_ST = 0x2
BPF_STX = 0x3
@@ -459,7 +461,14 @@ const (
CSUSP = 0x1a
DAXFS_MAGIC = 0x64646178
DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -560,6 +569,7 @@ const (
ETH_P_IRDA = 0x17
ETH_P_LAT = 0x6004
ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
@@ -1086,6 +1096,17 @@ const (
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
@@ -1098,6 +1119,8 @@ const (
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
KEYCTL_NEGATE = 0xd
KEYCTL_PKEY_DECRYPT = 0x1a
KEYCTL_PKEY_ENCRYPT = 0x19
@@ -1342,6 +1365,7 @@ const (
NETLINK_XFRM = 0x6
NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFDBITS = 0x20
NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8
NFNLGRP_CONNTRACK_DESTROY = 0x3
@@ -1406,6 +1430,10 @@ const (
NLM_F_ROOT = 0x100
NOFLSH = 0x80
NSFS_MAGIC = 0x6e736673
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -1671,6 +1699,8 @@ const (
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
PTRACE_EVENT_CLONE = 0x3
PTRACE_EVENT_EXEC = 0x4
PTRACE_EVENT_EXIT = 0x6
@@ -1685,6 +1715,7 @@ const (
PTRACE_GETREGSET = 0x4204
PTRACE_GETSIGINFO = 0x4202
PTRACE_GETSIGMASK = 0x420a
+ PTRACE_GET_SYSCALL_INFO = 0x420e
PTRACE_GET_THREAD_AREA = 0x19
PTRACE_GET_THREAD_AREA_3264 = 0xc4
PTRACE_GET_WATCH_REGS = 0xd0
@@ -1728,6 +1759,10 @@ const (
PTRACE_SET_WATCH_REGS = 0xd1
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_TRACEME = 0x0
QNX4_SUPER_MAGIC = 0x2f
QNX6_SUPER_MAGIC = 0x68191122
@@ -1786,7 +1821,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1d
+ RTA_MAX = 0x1e
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@@ -1859,6 +1894,7 @@ const (
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
@@ -1883,6 +1919,7 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
@@ -1890,7 +1927,7 @@ const (
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x67
+ RTM_MAX = 0x6b
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@@ -1902,6 +1939,7 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
@@ -1910,8 +1948,8 @@ const (
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x16
- RTM_NR_MSGTYPES = 0x58
+ RTM_NR_FAMILIES = 0x17
+ RTM_NR_MSGTYPES = 0x5c
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
@@ -1996,6 +2034,8 @@ const (
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
@@ -2134,6 +2174,7 @@ const (
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
+ SO_DETACH_REUSEPORT_BPF = 0x44
SO_DOMAIN = 0x1029
SO_DONTROUTE = 0x10
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
@@ -2436,6 +2477,71 @@ const (
TIOCSTI = 0x5472
TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
TMPFS_MAGIC = 0x1021994
TOSTOP = 0x8000
TPACKET_ALIGNMENT = 0x10
@@ -2449,7 +2555,7 @@ const (
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = -0x80000000
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
TP_STATUS_TS_SOFTWARE = 0x20000000
TP_STATUS_TS_SYS_HARDWARE = 0x40000000
TP_STATUS_USER = 0x1
@@ -2648,6 +2754,8 @@ const (
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
XDP_PACKET_HEADROOM = 0x100
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
@@ -2664,6 +2772,7 @@ const (
XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342
XTABS = 0x1800
+ Z3FOLD_MAGIC = 0x33
ZSMALLOC_MAGIC = 0x58295829
)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index 35e33de602..b7040c9bc5 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -253,6 +253,7 @@ const (
BPF_F_STACK_BUILD_ID = 0x20
BPF_F_STRICT_ALIGNMENT = 0x1
BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
BPF_F_TUNINFO_IPV6 = 0x1
BPF_F_USER_BUILD_ID = 0x800
BPF_F_USER_STACK = 0x100
@@ -304,9 +305,10 @@ const (
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
BPF_ST = 0x2
BPF_STX = 0x3
@@ -459,7 +461,14 @@ const (
CSUSP = 0x1a
DAXFS_MAGIC = 0x64646178
DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -560,6 +569,7 @@ const (
ETH_P_IRDA = 0x17
ETH_P_LAT = 0x6004
ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
@@ -1086,6 +1096,17 @@ const (
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
@@ -1098,6 +1119,8 @@ const (
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
KEYCTL_NEGATE = 0xd
KEYCTL_PKEY_DECRYPT = 0x1a
KEYCTL_PKEY_ENCRYPT = 0x19
@@ -1342,6 +1365,7 @@ const (
NETLINK_XFRM = 0x6
NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFDBITS = 0x40
NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8
NFNLGRP_CONNTRACK_DESTROY = 0x3
@@ -1406,6 +1430,10 @@ const (
NLM_F_ROOT = 0x100
NOFLSH = 0x80
NSFS_MAGIC = 0x6e736673
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -1671,6 +1699,8 @@ const (
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
PTRACE_EVENT_CLONE = 0x3
PTRACE_EVENT_EXEC = 0x4
PTRACE_EVENT_EXIT = 0x6
@@ -1685,6 +1715,7 @@ const (
PTRACE_GETREGSET = 0x4204
PTRACE_GETSIGINFO = 0x4202
PTRACE_GETSIGMASK = 0x420a
+ PTRACE_GET_SYSCALL_INFO = 0x420e
PTRACE_GET_THREAD_AREA = 0x19
PTRACE_GET_THREAD_AREA_3264 = 0xc4
PTRACE_GET_WATCH_REGS = 0xd0
@@ -1728,6 +1759,10 @@ const (
PTRACE_SET_WATCH_REGS = 0xd1
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_TRACEME = 0x0
QNX4_SUPER_MAGIC = 0x2f
QNX6_SUPER_MAGIC = 0x68191122
@@ -1786,7 +1821,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1d
+ RTA_MAX = 0x1e
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@@ -1859,6 +1894,7 @@ const (
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
@@ -1883,6 +1919,7 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
@@ -1890,7 +1927,7 @@ const (
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x67
+ RTM_MAX = 0x6b
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@@ -1902,6 +1939,7 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
@@ -1910,8 +1948,8 @@ const (
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x16
- RTM_NR_MSGTYPES = 0x58
+ RTM_NR_FAMILIES = 0x17
+ RTM_NR_MSGTYPES = 0x5c
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
@@ -1996,6 +2034,8 @@ const (
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
@@ -2134,6 +2174,7 @@ const (
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
+ SO_DETACH_REUSEPORT_BPF = 0x44
SO_DOMAIN = 0x1029
SO_DONTROUTE = 0x10
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
@@ -2436,6 +2477,71 @@ const (
TIOCSTI = 0x5472
TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
TMPFS_MAGIC = 0x1021994
TOSTOP = 0x8000
TPACKET_ALIGNMENT = 0x10
@@ -2449,7 +2555,7 @@ const (
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = -0x80000000
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
TP_STATUS_TS_SOFTWARE = 0x20000000
TP_STATUS_TS_SYS_HARDWARE = 0x40000000
TP_STATUS_USER = 0x1
@@ -2648,6 +2754,8 @@ const (
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
XDP_PACKET_HEADROOM = 0x100
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
@@ -2664,6 +2772,7 @@ const (
XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342
XTABS = 0x1800
+ Z3FOLD_MAGIC = 0x33
ZSMALLOC_MAGIC = 0x58295829
)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index 574fcd8c50..e0e89aa54e 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -253,6 +253,7 @@ const (
BPF_F_STACK_BUILD_ID = 0x20
BPF_F_STRICT_ALIGNMENT = 0x1
BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
BPF_F_TUNINFO_IPV6 = 0x1
BPF_F_USER_BUILD_ID = 0x800
BPF_F_USER_STACK = 0x100
@@ -304,9 +305,10 @@ const (
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
BPF_ST = 0x2
BPF_STX = 0x3
@@ -459,7 +461,14 @@ const (
CSUSP = 0x1a
DAXFS_MAGIC = 0x64646178
DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -560,6 +569,7 @@ const (
ETH_P_IRDA = 0x17
ETH_P_LAT = 0x6004
ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
@@ -1086,6 +1096,17 @@ const (
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
@@ -1098,6 +1119,8 @@ const (
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
KEYCTL_NEGATE = 0xd
KEYCTL_PKEY_DECRYPT = 0x1a
KEYCTL_PKEY_ENCRYPT = 0x19
@@ -1342,6 +1365,7 @@ const (
NETLINK_XFRM = 0x6
NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFDBITS = 0x40
NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8
NFNLGRP_CONNTRACK_DESTROY = 0x3
@@ -1406,6 +1430,10 @@ const (
NLM_F_ROOT = 0x100
NOFLSH = 0x80
NSFS_MAGIC = 0x6e736673
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -1671,6 +1699,8 @@ const (
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
PTRACE_EVENT_CLONE = 0x3
PTRACE_EVENT_EXEC = 0x4
PTRACE_EVENT_EXIT = 0x6
@@ -1685,6 +1715,7 @@ const (
PTRACE_GETREGSET = 0x4204
PTRACE_GETSIGINFO = 0x4202
PTRACE_GETSIGMASK = 0x420a
+ PTRACE_GET_SYSCALL_INFO = 0x420e
PTRACE_GET_THREAD_AREA = 0x19
PTRACE_GET_THREAD_AREA_3264 = 0xc4
PTRACE_GET_WATCH_REGS = 0xd0
@@ -1728,6 +1759,10 @@ const (
PTRACE_SET_WATCH_REGS = 0xd1
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_TRACEME = 0x0
QNX4_SUPER_MAGIC = 0x2f
QNX6_SUPER_MAGIC = 0x68191122
@@ -1786,7 +1821,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1d
+ RTA_MAX = 0x1e
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@@ -1859,6 +1894,7 @@ const (
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
@@ -1883,6 +1919,7 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
@@ -1890,7 +1927,7 @@ const (
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x67
+ RTM_MAX = 0x6b
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@@ -1902,6 +1939,7 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
@@ -1910,8 +1948,8 @@ const (
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x16
- RTM_NR_MSGTYPES = 0x58
+ RTM_NR_FAMILIES = 0x17
+ RTM_NR_MSGTYPES = 0x5c
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
@@ -1996,6 +2034,8 @@ const (
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
@@ -2134,6 +2174,7 @@ const (
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
+ SO_DETACH_REUSEPORT_BPF = 0x44
SO_DOMAIN = 0x1029
SO_DONTROUTE = 0x10
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
@@ -2436,6 +2477,71 @@ const (
TIOCSTI = 0x5472
TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
TMPFS_MAGIC = 0x1021994
TOSTOP = 0x8000
TPACKET_ALIGNMENT = 0x10
@@ -2449,7 +2555,7 @@ const (
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = -0x80000000
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
TP_STATUS_TS_SOFTWARE = 0x20000000
TP_STATUS_TS_SYS_HARDWARE = 0x40000000
TP_STATUS_USER = 0x1
@@ -2648,6 +2754,8 @@ const (
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
XDP_PACKET_HEADROOM = 0x100
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
@@ -2664,6 +2772,7 @@ const (
XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342
XTABS = 0x1800
+ Z3FOLD_MAGIC = 0x33
ZSMALLOC_MAGIC = 0x58295829
)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
index cdf0cf5f4c..fc68959112 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -253,6 +253,7 @@ const (
BPF_F_STACK_BUILD_ID = 0x20
BPF_F_STRICT_ALIGNMENT = 0x1
BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
BPF_F_TUNINFO_IPV6 = 0x1
BPF_F_USER_BUILD_ID = 0x800
BPF_F_USER_STACK = 0x100
@@ -304,9 +305,10 @@ const (
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
BPF_ST = 0x2
BPF_STX = 0x3
@@ -459,7 +461,14 @@ const (
CSUSP = 0x1a
DAXFS_MAGIC = 0x64646178
DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -560,6 +569,7 @@ const (
ETH_P_IRDA = 0x17
ETH_P_LAT = 0x6004
ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
@@ -1086,6 +1096,17 @@ const (
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
@@ -1098,6 +1119,8 @@ const (
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
KEYCTL_NEGATE = 0xd
KEYCTL_PKEY_DECRYPT = 0x1a
KEYCTL_PKEY_ENCRYPT = 0x19
@@ -1342,6 +1365,7 @@ const (
NETLINK_XFRM = 0x6
NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFDBITS = 0x20
NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8
NFNLGRP_CONNTRACK_DESTROY = 0x3
@@ -1406,6 +1430,10 @@ const (
NLM_F_ROOT = 0x100
NOFLSH = 0x80
NSFS_MAGIC = 0x6e736673
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -1671,6 +1699,8 @@ const (
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
PTRACE_EVENT_CLONE = 0x3
PTRACE_EVENT_EXEC = 0x4
PTRACE_EVENT_EXIT = 0x6
@@ -1685,6 +1715,7 @@ const (
PTRACE_GETREGSET = 0x4204
PTRACE_GETSIGINFO = 0x4202
PTRACE_GETSIGMASK = 0x420a
+ PTRACE_GET_SYSCALL_INFO = 0x420e
PTRACE_GET_THREAD_AREA = 0x19
PTRACE_GET_THREAD_AREA_3264 = 0xc4
PTRACE_GET_WATCH_REGS = 0xd0
@@ -1728,6 +1759,10 @@ const (
PTRACE_SET_WATCH_REGS = 0xd1
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_TRACEME = 0x0
QNX4_SUPER_MAGIC = 0x2f
QNX6_SUPER_MAGIC = 0x68191122
@@ -1786,7 +1821,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1d
+ RTA_MAX = 0x1e
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@@ -1859,6 +1894,7 @@ const (
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
@@ -1883,6 +1919,7 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
@@ -1890,7 +1927,7 @@ const (
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x67
+ RTM_MAX = 0x6b
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@@ -1902,6 +1939,7 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
@@ -1910,8 +1948,8 @@ const (
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x16
- RTM_NR_MSGTYPES = 0x58
+ RTM_NR_FAMILIES = 0x17
+ RTM_NR_MSGTYPES = 0x5c
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
@@ -1996,6 +2034,8 @@ const (
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
@@ -2134,6 +2174,7 @@ const (
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
+ SO_DETACH_REUSEPORT_BPF = 0x44
SO_DOMAIN = 0x1029
SO_DONTROUTE = 0x10
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
@@ -2436,6 +2477,71 @@ const (
TIOCSTI = 0x5472
TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
TMPFS_MAGIC = 0x1021994
TOSTOP = 0x8000
TPACKET_ALIGNMENT = 0x10
@@ -2449,7 +2555,7 @@ const (
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = -0x80000000
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
TP_STATUS_TS_SOFTWARE = 0x20000000
TP_STATUS_TS_SYS_HARDWARE = 0x40000000
TP_STATUS_USER = 0x1
@@ -2648,6 +2754,8 @@ const (
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
XDP_PACKET_HEADROOM = 0x100
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
@@ -2664,6 +2772,7 @@ const (
XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342
XTABS = 0x1800
+ Z3FOLD_MAGIC = 0x33
ZSMALLOC_MAGIC = 0x58295829
)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index eefdb32864..bd64b9a91d 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -253,6 +253,7 @@ const (
BPF_F_STACK_BUILD_ID = 0x20
BPF_F_STRICT_ALIGNMENT = 0x1
BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
BPF_F_TUNINFO_IPV6 = 0x1
BPF_F_USER_BUILD_ID = 0x800
BPF_F_USER_STACK = 0x100
@@ -304,9 +305,10 @@ const (
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
BPF_ST = 0x2
BPF_STX = 0x3
@@ -459,7 +461,14 @@ const (
CSUSP = 0x1a
DAXFS_MAGIC = 0x64646178
DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -560,6 +569,7 @@ const (
ETH_P_IRDA = 0x17
ETH_P_LAT = 0x6004
ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
@@ -1086,6 +1096,17 @@ const (
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
@@ -1098,6 +1119,8 @@ const (
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
KEYCTL_NEGATE = 0xd
KEYCTL_PKEY_DECRYPT = 0x1a
KEYCTL_PKEY_ENCRYPT = 0x19
@@ -1341,6 +1364,7 @@ const (
NETLINK_XFRM = 0x6
NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFDBITS = 0x40
NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8
NFNLGRP_CONNTRACK_DESTROY = 0x3
@@ -1407,6 +1431,10 @@ const (
NLM_F_ROOT = 0x100
NOFLSH = 0x80000000
NSFS_MAGIC = 0x6e736673
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -1673,6 +1701,8 @@ const (
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
PTRACE_EVENT_CLONE = 0x3
PTRACE_EVENT_EXEC = 0x4
PTRACE_EVENT_EXIT = 0x6
@@ -1692,6 +1722,7 @@ const (
PTRACE_GETVRREGS = 0x12
PTRACE_GETVSRREGS = 0x1b
PTRACE_GET_DEBUGREG = 0x19
+ PTRACE_GET_SYSCALL_INFO = 0x420e
PTRACE_INTERRUPT = 0x4207
PTRACE_KILL = 0x8
PTRACE_LISTEN = 0x4208
@@ -1731,6 +1762,10 @@ const (
PTRACE_SINGLEBLOCK = 0x100
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_SYSEMU = 0x1d
PTRACE_SYSEMU_SINGLESTEP = 0x1e
PTRACE_TRACEME = 0x0
@@ -1844,7 +1879,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1d
+ RTA_MAX = 0x1e
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@@ -1917,6 +1952,7 @@ const (
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
@@ -1941,6 +1977,7 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
@@ -1948,7 +1985,7 @@ const (
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x67
+ RTM_MAX = 0x6b
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@@ -1960,6 +1997,7 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
@@ -1968,8 +2006,8 @@ const (
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x16
- RTM_NR_MSGTYPES = 0x58
+ RTM_NR_FAMILIES = 0x17
+ RTM_NR_MSGTYPES = 0x5c
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
@@ -2054,6 +2092,8 @@ const (
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
@@ -2192,6 +2232,7 @@ const (
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
+ SO_DETACH_REUSEPORT_BPF = 0x44
SO_DOMAIN = 0x27
SO_DONTROUTE = 0x5
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
@@ -2496,6 +2537,71 @@ const (
TIOCSTOP = 0x2000746f
TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
TMPFS_MAGIC = 0x1021994
TOSTOP = 0x400000
TPACKET_ALIGNMENT = 0x10
@@ -2509,7 +2615,7 @@ const (
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = -0x80000000
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
TP_STATUS_TS_SOFTWARE = 0x20000000
TP_STATUS_TS_SYS_HARDWARE = 0x40000000
TP_STATUS_USER = 0x1
@@ -2707,6 +2813,8 @@ const (
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
XDP_PACKET_HEADROOM = 0x100
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
@@ -2723,6 +2831,7 @@ const (
XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342
XTABS = 0xc00
+ Z3FOLD_MAGIC = 0x33
ZSMALLOC_MAGIC = 0x58295829
)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index 78db210411..d9ec0566a9 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -253,6 +253,7 @@ const (
BPF_F_STACK_BUILD_ID = 0x20
BPF_F_STRICT_ALIGNMENT = 0x1
BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
BPF_F_TUNINFO_IPV6 = 0x1
BPF_F_USER_BUILD_ID = 0x800
BPF_F_USER_STACK = 0x100
@@ -304,9 +305,10 @@ const (
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
BPF_ST = 0x2
BPF_STX = 0x3
@@ -459,7 +461,14 @@ const (
CSUSP = 0x1a
DAXFS_MAGIC = 0x64646178
DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -560,6 +569,7 @@ const (
ETH_P_IRDA = 0x17
ETH_P_LAT = 0x6004
ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
@@ -1086,6 +1096,17 @@ const (
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
@@ -1098,6 +1119,8 @@ const (
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
KEYCTL_NEGATE = 0xd
KEYCTL_PKEY_DECRYPT = 0x1a
KEYCTL_PKEY_ENCRYPT = 0x19
@@ -1341,6 +1364,7 @@ const (
NETLINK_XFRM = 0x6
NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFDBITS = 0x40
NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8
NFNLGRP_CONNTRACK_DESTROY = 0x3
@@ -1407,6 +1431,10 @@ const (
NLM_F_ROOT = 0x100
NOFLSH = 0x80000000
NSFS_MAGIC = 0x6e736673
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -1673,6 +1701,8 @@ const (
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
PTRACE_EVENT_CLONE = 0x3
PTRACE_EVENT_EXEC = 0x4
PTRACE_EVENT_EXIT = 0x6
@@ -1692,6 +1722,7 @@ const (
PTRACE_GETVRREGS = 0x12
PTRACE_GETVSRREGS = 0x1b
PTRACE_GET_DEBUGREG = 0x19
+ PTRACE_GET_SYSCALL_INFO = 0x420e
PTRACE_INTERRUPT = 0x4207
PTRACE_KILL = 0x8
PTRACE_LISTEN = 0x4208
@@ -1731,6 +1762,10 @@ const (
PTRACE_SINGLEBLOCK = 0x100
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_SYSEMU = 0x1d
PTRACE_SYSEMU_SINGLESTEP = 0x1e
PTRACE_TRACEME = 0x0
@@ -1844,7 +1879,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1d
+ RTA_MAX = 0x1e
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@@ -1917,6 +1952,7 @@ const (
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
@@ -1941,6 +1977,7 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
@@ -1948,7 +1985,7 @@ const (
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x67
+ RTM_MAX = 0x6b
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@@ -1960,6 +1997,7 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
@@ -1968,8 +2006,8 @@ const (
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x16
- RTM_NR_MSGTYPES = 0x58
+ RTM_NR_FAMILIES = 0x17
+ RTM_NR_MSGTYPES = 0x5c
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
@@ -2054,6 +2092,8 @@ const (
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
@@ -2192,6 +2232,7 @@ const (
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
+ SO_DETACH_REUSEPORT_BPF = 0x44
SO_DOMAIN = 0x27
SO_DONTROUTE = 0x5
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
@@ -2496,6 +2537,71 @@ const (
TIOCSTOP = 0x2000746f
TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
TMPFS_MAGIC = 0x1021994
TOSTOP = 0x400000
TPACKET_ALIGNMENT = 0x10
@@ -2509,7 +2615,7 @@ const (
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = -0x80000000
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
TP_STATUS_TS_SOFTWARE = 0x20000000
TP_STATUS_TS_SYS_HARDWARE = 0x40000000
TP_STATUS_USER = 0x1
@@ -2707,6 +2813,8 @@ const (
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
XDP_PACKET_HEADROOM = 0x100
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
@@ -2723,6 +2831,7 @@ const (
XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342
XTABS = 0xc00
+ Z3FOLD_MAGIC = 0x33
ZSMALLOC_MAGIC = 0x58295829
)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
index 0cd07f9336..ac8a4983b4 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
@@ -253,6 +253,7 @@ const (
BPF_F_STACK_BUILD_ID = 0x20
BPF_F_STRICT_ALIGNMENT = 0x1
BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
BPF_F_TUNINFO_IPV6 = 0x1
BPF_F_USER_BUILD_ID = 0x800
BPF_F_USER_STACK = 0x100
@@ -304,9 +305,10 @@ const (
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
BPF_ST = 0x2
BPF_STX = 0x3
@@ -459,7 +461,14 @@ const (
CSUSP = 0x1a
DAXFS_MAGIC = 0x64646178
DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -560,6 +569,7 @@ const (
ETH_P_IRDA = 0x17
ETH_P_LAT = 0x6004
ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
@@ -1086,6 +1096,17 @@ const (
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
@@ -1098,6 +1119,8 @@ const (
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
KEYCTL_NEGATE = 0xd
KEYCTL_PKEY_DECRYPT = 0x1a
KEYCTL_PKEY_ENCRYPT = 0x19
@@ -1342,6 +1365,7 @@ const (
NETLINK_XFRM = 0x6
NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFDBITS = 0x40
NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8
NFNLGRP_CONNTRACK_DESTROY = 0x3
@@ -1406,6 +1430,10 @@ const (
NLM_F_ROOT = 0x100
NOFLSH = 0x80
NSFS_MAGIC = 0x6e736673
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -1671,6 +1699,8 @@ const (
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
PTRACE_EVENT_CLONE = 0x3
PTRACE_EVENT_EXEC = 0x4
PTRACE_EVENT_EXIT = 0x6
@@ -1684,6 +1714,7 @@ const (
PTRACE_GETREGSET = 0x4204
PTRACE_GETSIGINFO = 0x4202
PTRACE_GETSIGMASK = 0x420a
+ PTRACE_GET_SYSCALL_INFO = 0x420e
PTRACE_INTERRUPT = 0x4207
PTRACE_KILL = 0x8
PTRACE_LISTEN = 0x4208
@@ -1716,6 +1747,10 @@ const (
PTRACE_SETSIGMASK = 0x420b
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_TRACEME = 0x0
QNX4_SUPER_MAGIC = 0x2f
QNX6_SUPER_MAGIC = 0x68191122
@@ -1774,7 +1809,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1d
+ RTA_MAX = 0x1e
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@@ -1847,6 +1882,7 @@ const (
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
@@ -1871,6 +1907,7 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
@@ -1878,7 +1915,7 @@ const (
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x67
+ RTM_MAX = 0x6b
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@@ -1890,6 +1927,7 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
@@ -1898,8 +1936,8 @@ const (
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x16
- RTM_NR_MSGTYPES = 0x58
+ RTM_NR_FAMILIES = 0x17
+ RTM_NR_MSGTYPES = 0x5c
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
@@ -1984,6 +2022,8 @@ const (
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
@@ -2122,6 +2162,7 @@ const (
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
+ SO_DETACH_REUSEPORT_BPF = 0x44
SO_DOMAIN = 0x27
SO_DONTROUTE = 0x5
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
@@ -2422,6 +2463,71 @@ const (
TIOCSTI = 0x5412
TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
TMPFS_MAGIC = 0x1021994
TOSTOP = 0x100
TPACKET_ALIGNMENT = 0x10
@@ -2435,7 +2541,7 @@ const (
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = -0x80000000
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
TP_STATUS_TS_SOFTWARE = 0x20000000
TP_STATUS_TS_SYS_HARDWARE = 0x40000000
TP_STATUS_USER = 0x1
@@ -2633,6 +2739,8 @@ const (
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
XDP_PACKET_HEADROOM = 0x100
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
@@ -2649,6 +2757,7 @@ const (
XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342
XTABS = 0x1800
+ Z3FOLD_MAGIC = 0x33
ZSMALLOC_MAGIC = 0x58295829
)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index ac4f1d9f7f..452eeb048a 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -253,6 +253,7 @@ const (
BPF_F_STACK_BUILD_ID = 0x20
BPF_F_STRICT_ALIGNMENT = 0x1
BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
BPF_F_TUNINFO_IPV6 = 0x1
BPF_F_USER_BUILD_ID = 0x800
BPF_F_USER_STACK = 0x100
@@ -304,9 +305,10 @@ const (
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
BPF_ST = 0x2
BPF_STX = 0x3
@@ -459,7 +461,14 @@ const (
CSUSP = 0x1a
DAXFS_MAGIC = 0x64646178
DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -560,6 +569,7 @@ const (
ETH_P_IRDA = 0x17
ETH_P_LAT = 0x6004
ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
@@ -1086,6 +1096,17 @@ const (
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
@@ -1098,6 +1119,8 @@ const (
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
KEYCTL_NEGATE = 0xd
KEYCTL_PKEY_DECRYPT = 0x1a
KEYCTL_PKEY_ENCRYPT = 0x19
@@ -1342,6 +1365,7 @@ const (
NETLINK_XFRM = 0x6
NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFDBITS = 0x40
NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8
NFNLGRP_CONNTRACK_DESTROY = 0x3
@@ -1406,6 +1430,10 @@ const (
NLM_F_ROOT = 0x100
NOFLSH = 0x80
NSFS_MAGIC = 0x6e736673
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -1673,6 +1701,8 @@ const (
PTRACE_DETACH = 0x11
PTRACE_DISABLE_TE = 0x5010
PTRACE_ENABLE_TE = 0x5009
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
PTRACE_EVENT_CLONE = 0x3
PTRACE_EVENT_EXEC = 0x4
PTRACE_EVENT_EXIT = 0x6
@@ -1687,6 +1717,7 @@ const (
PTRACE_GETSIGINFO = 0x4202
PTRACE_GETSIGMASK = 0x420a
PTRACE_GET_LAST_BREAK = 0x5006
+ PTRACE_GET_SYSCALL_INFO = 0x420e
PTRACE_INTERRUPT = 0x4207
PTRACE_KILL = 0x8
PTRACE_LISTEN = 0x4208
@@ -1730,6 +1761,10 @@ const (
PTRACE_SINGLEBLOCK = 0xc
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_TE_ABORT_RAND = 0x5011
PTRACE_TRACEME = 0x0
PT_ACR0 = 0x90
@@ -1847,7 +1882,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1d
+ RTA_MAX = 0x1e
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@@ -1920,6 +1955,7 @@ const (
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
@@ -1944,6 +1980,7 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
@@ -1951,7 +1988,7 @@ const (
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x67
+ RTM_MAX = 0x6b
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@@ -1963,6 +2000,7 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
@@ -1971,8 +2009,8 @@ const (
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x16
- RTM_NR_MSGTYPES = 0x58
+ RTM_NR_FAMILIES = 0x17
+ RTM_NR_MSGTYPES = 0x5c
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
@@ -2057,6 +2095,8 @@ const (
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
@@ -2195,6 +2235,7 @@ const (
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
+ SO_DETACH_REUSEPORT_BPF = 0x44
SO_DOMAIN = 0x27
SO_DONTROUTE = 0x5
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
@@ -2495,6 +2536,71 @@ const (
TIOCSTI = 0x5412
TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
TMPFS_MAGIC = 0x1021994
TOSTOP = 0x100
TPACKET_ALIGNMENT = 0x10
@@ -2508,7 +2614,7 @@ const (
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = -0x80000000
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
TP_STATUS_TS_SOFTWARE = 0x20000000
TP_STATUS_TS_SYS_HARDWARE = 0x40000000
TP_STATUS_USER = 0x1
@@ -2706,6 +2812,8 @@ const (
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
XDP_PACKET_HEADROOM = 0x100
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
@@ -2722,6 +2830,7 @@ const (
XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342
XTABS = 0x1800
+ Z3FOLD_MAGIC = 0x33
ZSMALLOC_MAGIC = 0x58295829
)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
index 8a12f1412d..e93c0c8315 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
@@ -256,6 +256,7 @@ const (
BPF_F_STACK_BUILD_ID = 0x20
BPF_F_STRICT_ALIGNMENT = 0x1
BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
BPF_F_TUNINFO_IPV6 = 0x1
BPF_F_USER_BUILD_ID = 0x800
BPF_F_USER_STACK = 0x100
@@ -307,9 +308,10 @@ const (
BPF_RET = 0x6
BPF_RSH = 0x70
BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
BPF_ST = 0x2
BPF_STX = 0x3
@@ -462,7 +464,14 @@ const (
CSUSP = 0x1a
DAXFS_MAGIC = 0x64646178
DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -564,6 +573,7 @@ const (
ETH_P_IRDA = 0x17
ETH_P_LAT = 0x6004
ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
@@ -1090,6 +1100,17 @@ const (
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
@@ -1102,6 +1123,8 @@ const (
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
KEYCTL_NEGATE = 0xd
KEYCTL_PKEY_DECRYPT = 0x1a
KEYCTL_PKEY_ENCRYPT = 0x19
@@ -1346,6 +1369,7 @@ const (
NETLINK_XFRM = 0x6
NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFDBITS = 0x40
NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8
NFNLGRP_CONNTRACK_DESTROY = 0x3
@@ -1410,6 +1434,10 @@ const (
NLM_F_ROOT = 0x100
NOFLSH = 0x80
NSFS_MAGIC = 0x6e736673
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -1675,6 +1703,8 @@ const (
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
PTRACE_EVENT_CLONE = 0x3
PTRACE_EVENT_EXEC = 0x4
PTRACE_EVENT_EXIT = 0x6
@@ -1692,6 +1722,7 @@ const (
PTRACE_GETREGSET = 0x4204
PTRACE_GETSIGINFO = 0x4202
PTRACE_GETSIGMASK = 0x420a
+ PTRACE_GET_SYSCALL_INFO = 0x420e
PTRACE_INTERRUPT = 0x4207
PTRACE_KILL = 0x8
PTRACE_LISTEN = 0x4208
@@ -1731,6 +1762,10 @@ const (
PTRACE_SINGLESTEP = 0x9
PTRACE_SPARC_DETACH = 0xb
PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_TRACEME = 0x0
PTRACE_WRITEDATA = 0x11
PTRACE_WRITETEXT = 0x13
@@ -1839,7 +1874,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1d
+ RTA_MAX = 0x1e
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@@ -1912,6 +1947,7 @@ const (
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
@@ -1936,6 +1972,7 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
@@ -1943,7 +1980,7 @@ const (
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x67
+ RTM_MAX = 0x6b
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@@ -1955,6 +1992,7 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
@@ -1963,8 +2001,8 @@ const (
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x16
- RTM_NR_MSGTYPES = 0x58
+ RTM_NR_FAMILIES = 0x17
+ RTM_NR_MSGTYPES = 0x5c
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
@@ -2049,6 +2087,8 @@ const (
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
@@ -2187,6 +2227,7 @@ const (
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
+ SO_DETACH_REUSEPORT_BPF = 0x47
SO_DOMAIN = 0x1029
SO_DONTROUTE = 0x10
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
@@ -2484,6 +2525,71 @@ const (
TIOCSTOP = 0x2000746f
TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x20005437
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
TMPFS_MAGIC = 0x1021994
TOSTOP = 0x100
TPACKET_ALIGNMENT = 0x10
@@ -2497,7 +2603,7 @@ const (
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = -0x80000000
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
TP_STATUS_TS_SOFTWARE = 0x20000000
TP_STATUS_TS_SYS_HARDWARE = 0x40000000
TP_STATUS_USER = 0x1
@@ -2695,6 +2801,8 @@ const (
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
XDP_PACKET_HEADROOM = 0x100
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
@@ -2711,6 +2819,7 @@ const (
XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342
XTABS = 0x1800
+ Z3FOLD_MAGIC = 0x33
ZSMALLOC_MAGIC = 0x58295829
__TIOCFLUSH = 0x80047410
)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
index 78cc04ea6d..96b9b8ab30 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
@@ -3,7 +3,7 @@
// +build 386,netbsd
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m32 _const.go
package unix
@@ -1085,6 +1085,7 @@ const (
NET_RT_MAXID = 0x6
NET_RT_OIFLIST = 0x4
NET_RT_OOIFLIST = 0x3
+ NFDBITS = 0x20
NOFLSH = 0x80000000
NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
index 92185e693f..ed522a84e8 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
@@ -3,7 +3,7 @@
// +build amd64,netbsd
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
package unix
@@ -1075,6 +1075,7 @@ const (
NET_RT_MAXID = 0x6
NET_RT_OIFLIST = 0x4
NET_RT_OOIFLIST = 0x3
+ NFDBITS = 0x20
NOFLSH = 0x80000000
NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
index 373ad4543d..c8d36fe998 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
@@ -3,7 +3,7 @@
// +build arm,netbsd
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -marm _const.go
package unix
@@ -1065,6 +1065,7 @@ const (
NET_RT_MAXID = 0x6
NET_RT_OIFLIST = 0x4
NET_RT_OOIFLIST = 0x3
+ NFDBITS = 0x20
NOFLSH = 0x80000000
NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
index fb6c60441d..f1c146a74c 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
@@ -3,7 +3,7 @@
// +build arm64,netbsd
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
package unix
@@ -1075,6 +1075,7 @@ const (
NET_RT_MAXID = 0x6
NET_RT_OIFLIST = 0x4
NET_RT_OOIFLIST = 0x3
+ NFDBITS = 0x20
NOFLSH = 0x80000000
NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
index d8be045189..5402bd55ce 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
@@ -3,7 +3,7 @@
// +build 386,openbsd
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m32 _const.go
package unix
@@ -881,14 +881,15 @@ const (
MADV_SPACEAVAIL = 0x5
MADV_WILLNEED = 0x3
MAP_ANON = 0x1000
- MAP_COPY = 0x4
+ MAP_ANONYMOUS = 0x1000
+ MAP_CONCEAL = 0x8000
+ MAP_COPY = 0x2
MAP_FILE = 0x0
MAP_FIXED = 0x10
- MAP_FLAGMASK = 0x1ff7
- MAP_HASSEMAPHORE = 0x200
- MAP_INHERIT = 0x80
+ MAP_FLAGMASK = 0xfff7
+ MAP_HASSEMAPHORE = 0x0
+ MAP_INHERIT = 0x0
MAP_INHERIT_COPY = 0x1
- MAP_INHERIT_DONATE_COPY = 0x3
MAP_INHERIT_NONE = 0x2
MAP_INHERIT_SHARE = 0x0
MAP_NOEXTEND = 0x100
@@ -896,7 +897,8 @@ const (
MAP_PRIVATE = 0x2
MAP_RENAME = 0x20
MAP_SHARED = 0x1
- MAP_TRYFIXED = 0x400
+ MAP_STACK = 0x4000
+ MAP_TRYFIXED = 0x0
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MNT_ASYNC = 0x40
@@ -946,6 +948,7 @@ const (
NET_RT_MAXID = 0x6
NET_RT_STATS = 0x4
NET_RT_TABLE = 0x5
+ NFDBITS = 0x20
NOFLSH = 0x80000000
NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
index 1f9e8a29ea..ffaf2d2f9f 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
@@ -3,7 +3,7 @@
// +build amd64,openbsd
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
package unix
@@ -920,10 +920,11 @@ const (
MADV_WILLNEED = 0x3
MAP_ANON = 0x1000
MAP_ANONYMOUS = 0x1000
+ MAP_CONCEAL = 0x8000
MAP_COPY = 0x2
MAP_FILE = 0x0
MAP_FIXED = 0x10
- MAP_FLAGMASK = 0x7ff7
+ MAP_FLAGMASK = 0xfff7
MAP_HASSEMAPHORE = 0x0
MAP_INHERIT = 0x0
MAP_INHERIT_COPY = 0x1
@@ -990,6 +991,7 @@ const (
NET_RT_MAXID = 0x7
NET_RT_STATS = 0x4
NET_RT_TABLE = 0x5
+ NFDBITS = 0x20
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ATTRIB = 0x8
diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
index 79d5695c37..7aa796a642 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
@@ -1,11 +1,11 @@
// mkerrors.sh
// Code generated by the command above; see README.md. DO NOT EDIT.
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
// +build arm,openbsd
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs -- _const.go
+
package unix
import "syscall"
@@ -881,10 +881,11 @@ const (
MADV_WILLNEED = 0x3
MAP_ANON = 0x1000
MAP_ANONYMOUS = 0x1000
+ MAP_CONCEAL = 0x8000
MAP_COPY = 0x2
MAP_FILE = 0x0
MAP_FIXED = 0x10
- MAP_FLAGMASK = 0x3ff7
+ MAP_FLAGMASK = 0xfff7
MAP_HASSEMAPHORE = 0x0
MAP_INHERIT = 0x0
MAP_INHERIT_COPY = 0x1
@@ -896,6 +897,7 @@ const (
MAP_PRIVATE = 0x2
MAP_RENAME = 0x0
MAP_SHARED = 0x1
+ MAP_STACK = 0x4000
MAP_TRYFIXED = 0x0
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
@@ -947,6 +949,7 @@ const (
NET_RT_MAXID = 0x6
NET_RT_STATS = 0x4
NET_RT_TABLE = 0x5
+ NFDBITS = 0x20
NOFLSH = 0x80000000
NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4
diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go
index ec5f92de88..1792d3f13e 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go
@@ -996,6 +996,7 @@ const (
NET_RT_MAXID = 0x7
NET_RT_STATS = 0x4
NET_RT_TABLE = 0x5
+ NFDBITS = 0x20
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ATTRIB = 0x8
diff --git a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
index 22569db31d..46e054ccb0 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
@@ -3,7 +3,7 @@
// +build amd64,solaris
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
package unix
@@ -666,6 +666,7 @@ const (
M_FLUSH = 0x86
NAME_MAX = 0xff
NEWDEV = 0x1
+ NFDBITS = 0x40
NL0 = 0x0
NL1 = 0x100
NLDLY = 0x100
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go
index dd5ea36ee9..b5ed805899 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -l32 -tags darwin,386,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
+// go run mksyscall.go -l32 -tags darwin,386,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_386.1_11.go syscall_darwin_386.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build darwin,386,!go1.12
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -563,6 +547,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
if e1 != 0 {
@@ -1342,8 +1342,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1681,6 +1682,23 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
@@ -1738,23 +1756,6 @@ func Fstatfs(fd int, stat *Statfs_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(buf), uintptr(size), uintptr(flags))
n = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go
new file mode 100644
index 0000000000..e263fbdb8b
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go
@@ -0,0 +1,41 @@
+// go run mksyscall.go -l32 -tags darwin,386,go1.13 syscall_darwin.1_13.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build darwin,386,go1.13
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+var _ syscall.Errno
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func closedir(dir uintptr) (err error) {
+ _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_closedir_trampoline()
+
+//go:linkname libc_closedir libc_closedir
+//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
+ r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
+ res = Errno(r0)
+ return
+}
+
+func libc_readdir_r_trampoline()
+
+//go:linkname libc_readdir_r libc_readdir_r
+//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.s
new file mode 100644
index 0000000000..00da1ebfca
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.s
@@ -0,0 +1,12 @@
+// go run mkasm_darwin.go 386
+// Code generated by the command above; DO NOT EDIT.
+
+// +build go1.13
+
+#include "textflag.h"
+TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_fdopendir(SB)
+TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_closedir(SB)
+TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_readdir_r(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
index 78ca923396..cdf8a70002 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
@@ -304,27 +304,6 @@ func libc_kevent_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall6(funcPC(libc___sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc___sysctl_trampoline()
-
-//go:linkname libc___sysctl libc___sysctl
-//go:cgo_import_dynamic libc___sysctl __sysctl "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -778,6 +757,27 @@ func libc_ioctl_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_sysctl_trampoline()
+
+//go:linkname libc_sysctl libc_sysctl
+//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
_, _, e1 := syscall_syscall9(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
if e1 != 0 {
@@ -928,6 +928,21 @@ func libc_chroot_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ClockGettime(clockid int32, time *Timespec) (err error) {
+ _, _, e1 := syscall_syscall(funcPC(libc_clock_gettime_trampoline), uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_clock_gettime_trampoline()
+
+//go:linkname libc_clock_gettime libc_clock_gettime
+//go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Close(fd int) (err error) {
_, _, e1 := syscall_syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
if e1 != 0 {
@@ -1857,8 +1872,9 @@ func libc_lseek_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -2408,28 +2424,6 @@ func libc_fstatfs64_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc___getdirentries64_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc___getdirentries64_trampoline()
-
-//go:linkname libc___getdirentries64 libc___getdirentries64
-//go:cgo_import_dynamic libc___getdirentries64 __getdirentries64 "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat64_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
n = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
index f40465ca89..9cae5b1da3 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
@@ -40,8 +40,6 @@ TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
JMP libc_sendmsg(SB)
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
JMP libc_kevent(SB)
-TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
- JMP libc___sysctl(SB)
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
JMP libc_utimes(SB)
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
@@ -90,6 +88,8 @@ TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
JMP libc_kill(SB)
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
JMP libc_ioctl(SB)
+TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_sysctl(SB)
TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
JMP libc_sendfile(SB)
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
@@ -272,8 +272,6 @@ TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
JMP libc_fstatat64(SB)
TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
JMP libc_fstatfs64(SB)
-TEXT ·libc___getdirentries64_trampoline(SB),NOSPLIT,$0-0
- JMP libc___getdirentries64(SB)
TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
JMP libc_getfsstat64(SB)
TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go
index 2581e8960f..8bde8235a0 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -tags darwin,amd64,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
+// go run mksyscall.go -tags darwin,amd64,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.1_11.go syscall_darwin_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build darwin,amd64,!go1.12
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -377,16 +361,6 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
_, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
if e1 != 0 {
@@ -573,6 +547,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
_, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
if e1 != 0 {
@@ -1352,8 +1342,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1691,6 +1682,33 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
+ _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
sec = int64(r0)
@@ -1738,23 +1756,6 @@ func Fstatfs(fd int, stat *Statfs_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(buf), uintptr(size), uintptr(flags))
n = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
new file mode 100644
index 0000000000..314042a9d4
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
@@ -0,0 +1,41 @@
+// go run mksyscall.go -tags darwin,amd64,go1.13 syscall_darwin.1_13.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build darwin,amd64,go1.13
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+var _ syscall.Errno
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func closedir(dir uintptr) (err error) {
+ _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_closedir_trampoline()
+
+//go:linkname libc_closedir libc_closedir
+//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
+ r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
+ res = Errno(r0)
+ return
+}
+
+func libc_readdir_r_trampoline()
+
+//go:linkname libc_readdir_r libc_readdir_r
+//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s
new file mode 100644
index 0000000000..d671e8311f
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s
@@ -0,0 +1,12 @@
+// go run mkasm_darwin.go amd64
+// Code generated by the command above; DO NOT EDIT.
+
+// +build go1.13
+
+#include "textflag.h"
+TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_fdopendir(SB)
+TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_closedir(SB)
+TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_readdir_r(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index 64df03c452..63b51fbf00 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
@@ -304,27 +304,6 @@ func libc_kevent_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall6(funcPC(libc___sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc___sysctl_trampoline()
-
-//go:linkname libc___sysctl libc___sysctl
-//go:cgo_import_dynamic libc___sysctl __sysctl "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -778,6 +757,27 @@ func libc_ioctl_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_sysctl_trampoline()
+
+//go:linkname libc_sysctl libc_sysctl
+//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
_, _, e1 := syscall_syscall6(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
if e1 != 0 {
@@ -1872,8 +1872,9 @@ func libc_lseek_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -2423,28 +2424,6 @@ func libc_fstatfs64_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := syscall_syscall6(funcPC(libc___getdirentries64_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc___getdirentries64_trampoline()
-
-//go:linkname libc___getdirentries64 libc___getdirentries64
-//go:cgo_import_dynamic libc___getdirentries64 __getdirentries64 "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat64_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
n = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
index debcb8ed3a..1a0e52aa20 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
@@ -40,8 +40,6 @@ TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
JMP libc_sendmsg(SB)
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
JMP libc_kevent(SB)
-TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
- JMP libc___sysctl(SB)
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
JMP libc_utimes(SB)
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
@@ -90,6 +88,8 @@ TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
JMP libc_kill(SB)
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
JMP libc_ioctl(SB)
+TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_sysctl(SB)
TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
JMP libc_sendfile(SB)
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
@@ -274,8 +274,6 @@ TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
JMP libc_fstatat64(SB)
TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
JMP libc_fstatfs64(SB)
-TEXT ·libc___getdirentries64_trampoline(SB),NOSPLIT,$0-0
- JMP libc___getdirentries64(SB)
TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
JMP libc_getfsstat64(SB)
TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go
index f8caecef02..63a236b504 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -l32 -tags darwin,arm,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go
+// go run mksyscall.go -l32 -tags darwin,arm,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm.1_11.go syscall_darwin_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build darwin,arm,!go1.12
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -377,16 +361,6 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
_, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
if e1 != 0 {
@@ -573,6 +547,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
if e1 != 0 {
@@ -1352,8 +1342,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go
new file mode 100644
index 0000000000..f519ce9afb
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go
@@ -0,0 +1,41 @@
+// go run mksyscall.go -l32 -tags darwin,arm,go1.13 syscall_darwin.1_13.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build darwin,arm,go1.13
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+var _ syscall.Errno
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func closedir(dir uintptr) (err error) {
+ _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_closedir_trampoline()
+
+//go:linkname libc_closedir libc_closedir
+//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
+ r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
+ res = Errno(r0)
+ return
+}
+
+func libc_readdir_r_trampoline()
+
+//go:linkname libc_readdir_r libc_readdir_r
+//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.s
new file mode 100644
index 0000000000..488e55707a
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.s
@@ -0,0 +1,12 @@
+// go run mkasm_darwin.go arm
+// Code generated by the command above; DO NOT EDIT.
+
+// +build go1.13
+
+#include "textflag.h"
+TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_fdopendir(SB)
+TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_closedir(SB)
+TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_readdir_r(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
index ed33062399..adb8668c2b 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
@@ -304,27 +304,6 @@ func libc_kevent_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall6(funcPC(libc___sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc___sysctl_trampoline()
-
-//go:linkname libc___sysctl libc___sysctl
-//go:cgo_import_dynamic libc___sysctl __sysctl "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -778,6 +757,27 @@ func libc_ioctl_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_sysctl_trampoline()
+
+//go:linkname libc_sysctl libc_sysctl
+//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
_, _, e1 := syscall_syscall9(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
if e1 != 0 {
@@ -928,6 +928,21 @@ func libc_chroot_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ClockGettime(clockid int32, time *Timespec) (err error) {
+ _, _, e1 := syscall_syscall(funcPC(libc_clock_gettime_trampoline), uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_clock_gettime_trampoline()
+
+//go:linkname libc_clock_gettime libc_clock_gettime
+//go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Close(fd int) (err error) {
_, _, e1 := syscall_syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
if e1 != 0 {
@@ -1857,8 +1872,9 @@ func libc_lseek_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s
index 66af9f480e..5bebb1bbd0 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s
@@ -40,8 +40,6 @@ TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
JMP libc_sendmsg(SB)
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
JMP libc_kevent(SB)
-TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
- JMP libc___sysctl(SB)
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
JMP libc_utimes(SB)
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
@@ -106,6 +104,8 @@ TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
JMP libc_chown(SB)
TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
JMP libc_chroot(SB)
+TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_clock_gettime(SB)
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
JMP libc_close(SB)
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go
index 3fd0f3c854..87c0b61221 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -tags darwin,arm64,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
+// go run mksyscall.go -tags darwin,arm64,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.1_11.go syscall_darwin_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build darwin,arm64,!go1.12
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -377,16 +361,6 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
_, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
if e1 != 0 {
@@ -573,6 +547,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
_, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
if e1 != 0 {
@@ -1352,8 +1342,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
new file mode 100644
index 0000000000..d64e6c806f
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
@@ -0,0 +1,41 @@
+// go run mksyscall.go -tags darwin,arm64,go1.13 syscall_darwin.1_13.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build darwin,arm64,go1.13
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+var _ syscall.Errno
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func closedir(dir uintptr) (err error) {
+ _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_closedir_trampoline()
+
+//go:linkname libc_closedir libc_closedir
+//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
+ r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
+ res = Errno(r0)
+ return
+}
+
+func libc_readdir_r_trampoline()
+
+//go:linkname libc_readdir_r libc_readdir_r
+//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s
new file mode 100644
index 0000000000..b29dabb0f0
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s
@@ -0,0 +1,12 @@
+// go run mkasm_darwin.go arm64
+// Code generated by the command above; DO NOT EDIT.
+
+// +build go1.13
+
+#include "textflag.h"
+TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_fdopendir(SB)
+TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_closedir(SB)
+TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_readdir_r(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index 5258a73282..c882a4f9d2 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
@@ -304,27 +304,6 @@ func libc_kevent_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := syscall_syscall6(funcPC(libc___sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc___sysctl_trampoline()
-
-//go:linkname libc___sysctl libc___sysctl
-//go:cgo_import_dynamic libc___sysctl __sysctl "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -778,6 +757,27 @@ func libc_ioctl_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_sysctl_trampoline()
+
+//go:linkname libc_sysctl libc_sysctl
+//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
_, _, e1 := syscall_syscall6(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
if e1 != 0 {
@@ -928,6 +928,21 @@ func libc_chroot_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ClockGettime(clockid int32, time *Timespec) (err error) {
+ _, _, e1 := syscall_syscall(funcPC(libc_clock_gettime_trampoline), uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_clock_gettime_trampoline()
+
+//go:linkname libc_clock_gettime libc_clock_gettime
+//go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Close(fd int) (err error) {
_, _, e1 := syscall_syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
if e1 != 0 {
@@ -1857,8 +1872,9 @@ func libc_lseek_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
index f57f48f826..19faa4d8d6 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
@@ -40,8 +40,6 @@ TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
JMP libc_sendmsg(SB)
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
JMP libc_kevent(SB)
-TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
- JMP libc___sysctl(SB)
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
JMP libc_utimes(SB)
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
@@ -90,6 +88,8 @@ TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
JMP libc_kill(SB)
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
JMP libc_ioctl(SB)
+TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_sysctl(SB)
TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
JMP libc_sendfile(SB)
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
index cdfe9318ba..df199b3454 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
@@ -1272,8 +1272,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
index a783306b2a..e68185f1e3 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
@@ -1606,8 +1606,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
index f995520d38..2f77f93c4e 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -377,8 +361,14 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -387,8 +377,8 @@ func pipe2(p *[2]_C_int, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ptrace(request int, pid int, addr uintptr, data int) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -424,6 +414,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ptrace(request int, pid int, addr uintptr, data int) (err error) {
+ _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1606,8 +1606,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
index d681acd430..e9a12c9d93 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -377,8 +361,14 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -387,8 +377,8 @@ func pipe2(p *[2]_C_int, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ptrace(request int, pid int, addr uintptr, data int) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -424,6 +414,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ptrace(request int, pid int, addr uintptr, data int) (err error) {
+ _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1606,8 +1606,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
index 5049b2ede4..27ab0fbda0 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -377,6 +361,22 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe2(p *[2]_C_int, flags int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
@@ -404,8 +404,8 @@ func Getcwd(buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ptrace(request int, pid int, addr uintptr, data int) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -414,8 +414,8 @@ func ptrace(request int, pid int, addr uintptr, data int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+func ptrace(request int, pid int, addr uintptr, data int) (err error) {
+ _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1606,8 +1606,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
index c5e46e4cf6..fe5d462e49 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
@@ -305,6 +305,36 @@ func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
index da8819e480..536abcea33 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
@@ -305,6 +305,36 @@ func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
index 6ad9be6dd4..37823cd6bf 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
@@ -305,6 +305,36 @@ func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
index f88331782b..794f61264a 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
@@ -305,6 +305,36 @@ func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
index 8eebc6c77c..1b34b550c3 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
@@ -305,6 +305,36 @@ func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
index ecf62a677d..5714e25922 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
@@ -305,6 +305,36 @@ func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
index 1ba0f7b6f4..88a6b3362f 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
@@ -305,6 +305,36 @@ func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
index 20012b2f0e..c09dbe3454 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
@@ -305,6 +305,36 @@ func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
index 2b520deaa2..42f6c21039 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
@@ -305,6 +305,36 @@ func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
index d9f044c953..de2cd8db91 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
@@ -305,6 +305,36 @@ func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
index 9feed65eb0..d51bf07fc5 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
@@ -305,6 +305,36 @@ func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
index 0a65150881..1e3a3cb732 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
@@ -305,6 +305,36 @@ func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
index e27f66930c..3c97008cd0 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
@@ -305,6 +305,36 @@ func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
index 7e05826647..5ade42cce0 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -377,6 +361,22 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe() (fd1 int, fd2 int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
fd1 = int(r0)
@@ -1498,8 +1498,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
index d94d076aa0..3e0bbc5f10 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -377,6 +361,22 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe() (fd1 int, fd2 int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
fd1 = int(r0)
@@ -1498,8 +1498,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
index cf5bf3d054..cb0af13a3c 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -377,6 +361,22 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe() (fd1 int, fd2 int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
fd1 = int(r0)
@@ -1498,8 +1498,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
index 243a9317cf..6fd48d3dcd 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -377,6 +361,22 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe() (fd1 int, fd2 int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
fd1 = int(r0)
@@ -1498,8 +1498,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
index a9532d0787..2938e4124e 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -377,6 +361,22 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe(p *[2]_C_int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
@@ -1304,8 +1304,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
index 0cb9f01774..22b79ab0e2 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -377,6 +361,22 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe(p *[2]_C_int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
@@ -1304,8 +1304,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
index 6fc99b5494..cb921f37af 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -377,6 +361,22 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe(p *[2]_C_int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
@@ -1304,8 +1304,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
index 27878a72b8..5a74380355 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
@@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -377,6 +361,22 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe(p *[2]_C_int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
@@ -1304,8 +1304,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
index 5f614760c6..a96165d4bf 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
@@ -1478,8 +1478,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSelect)), 5, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSelect)), 5, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
if e1 != 0 {
err = e1
}
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
index e869c06031..7aae554f21 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
@@ -429,4 +429,6 @@ const (
SYS_FSCONFIG = 431
SYS_FSMOUNT = 432
SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
index 4917b8ab6d..7968439a92 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
@@ -351,4 +351,6 @@ const (
SYS_FSCONFIG = 431
SYS_FSMOUNT = 432
SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
index f85fcb4f80..3c663c69d4 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
@@ -393,4 +393,6 @@ const (
SYS_FSCONFIG = 431
SYS_FSMOUNT = 432
SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
index 678a119bc9..753def987e 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
@@ -296,4 +296,5 @@ const (
SYS_FSCONFIG = 431
SYS_FSMOUNT = 432
SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
index 222c9f9a2f..ac86bd5446 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
@@ -414,4 +414,5 @@ const (
SYS_FSCONFIG = 4431
SYS_FSMOUNT = 4432
SYS_FSPICK = 4433
+ SYS_PIDFD_OPEN = 4434
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
index 28e6d0e9d6..1f5705b588 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
@@ -344,4 +344,5 @@ const (
SYS_FSCONFIG = 5431
SYS_FSMOUNT = 5432
SYS_FSPICK = 5433
+ SYS_PIDFD_OPEN = 5434
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
index e643c6f632..d9ed953264 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
@@ -344,4 +344,5 @@ const (
SYS_FSCONFIG = 5431
SYS_FSMOUNT = 5432
SYS_FSPICK = 5433
+ SYS_PIDFD_OPEN = 5434
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
index 01d93c420f..94266b65a4 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
@@ -414,4 +414,5 @@ const (
SYS_FSCONFIG = 4431
SYS_FSMOUNT = 4432
SYS_FSPICK = 4433
+ SYS_PIDFD_OPEN = 4434
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
index 5744149ebf..52e3da6490 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
@@ -393,4 +393,6 @@ const (
SYS_FSCONFIG = 431
SYS_FSMOUNT = 432
SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
index 21c8320428..6141f90a82 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
@@ -393,4 +393,6 @@ const (
SYS_FSCONFIG = 431
SYS_FSMOUNT = 432
SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
index c1bb6d8f2d..4f7261a884 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
@@ -295,4 +295,6 @@ const (
SYS_FSCONFIG = 431
SYS_FSMOUNT = 432
SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
index bc3cc6b5b2..f47014ac05 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
@@ -358,4 +358,6 @@ const (
SYS_FSCONFIG = 431
SYS_FSMOUNT = 432
SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
index 0a2841ba8c..dd78abb0d6 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
@@ -373,4 +373,5 @@ const (
SYS_FSCONFIG = 431
SYS_FSMOUNT = 432
SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
index 1542a87734..c681d7dbcd 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
@@ -397,7 +397,7 @@ type Reg struct {
}
type FpReg struct {
- Fp_q [32]uint128
+ Fp_q [512]uint8
Fp_sr uint32
Fp_cr uint32
}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index 50bc4128ff..2c94373ea5 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -285,6 +285,13 @@ type RawSockaddrXDP struct {
type RawSockaddrPPPoX [0x1e]byte
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -425,6 +432,7 @@ const (
SizeofSockaddrVM = 0x10
SizeofSockaddrXDP = 0x10
SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x8
SizeofIPMreq = 0x8
@@ -591,22 +599,6 @@ const (
RTN_THROW = 0x9
RTN_NAT = 0xa
RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
SizeofNlMsghdr = 0x10
SizeofNlMsgerr = 0x14
SizeofRtGenmsg = 0x1
@@ -614,6 +606,7 @@ const (
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
SizeofNdUseroptmsg = 0x10
@@ -664,6 +657,13 @@ type IfAddrmsg struct {
Index uint32
}
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
type RtMsg struct {
Family uint8
Dst_len uint8
@@ -2468,6 +2468,42 @@ const (
BPF_FD_TYPE_URETPROBE = 0x5
)
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+)
+
type CapUserHeader struct {
Version uint32
Pid int32
@@ -2521,3 +2557,201 @@ type LoopInfo64 struct {
Encrypt_key [32]uint8
Init [2]uint64
}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]int8
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]int8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]int8
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_MAX = 0x3c
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_MAX = 0x80
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index 055eaa76a4..1eedcb2386 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -285,6 +285,13 @@ type RawSockaddrXDP struct {
type RawSockaddrPPPoX [0x1e]byte
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -426,6 +433,7 @@ const (
SizeofSockaddrVM = 0x10
SizeofSockaddrXDP = 0x10
SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -592,22 +600,6 @@ const (
RTN_THROW = 0x9
RTN_NAT = 0xa
RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
SizeofNlMsghdr = 0x10
SizeofNlMsgerr = 0x14
SizeofRtGenmsg = 0x1
@@ -615,6 +607,7 @@ const (
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
SizeofNdUseroptmsg = 0x10
@@ -665,6 +658,13 @@ type IfAddrmsg struct {
Index uint32
}
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
type RtMsg struct {
Family uint8
Dst_len uint8
@@ -2481,6 +2481,42 @@ const (
BPF_FD_TYPE_URETPROBE = 0x5
)
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+)
+
type CapUserHeader struct {
Version uint32
Pid int32
@@ -2535,3 +2571,201 @@ type LoopInfo64 struct {
Encrypt_key [32]uint8
Init [2]uint64
}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]int8
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]int8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]int8
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_MAX = 0x3c
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_MAX = 0x80
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index 66019c9cfe..35ef7b35d9 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -289,6 +289,13 @@ type RawSockaddrXDP struct {
type RawSockaddrPPPoX [0x1e]byte
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
type RawSockaddr struct {
Family uint16
Data [14]uint8
@@ -429,6 +436,7 @@ const (
SizeofSockaddrVM = 0x10
SizeofSockaddrXDP = 0x10
SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x8
SizeofIPMreq = 0x8
@@ -595,22 +603,6 @@ const (
RTN_THROW = 0x9
RTN_NAT = 0xa
RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
SizeofNlMsghdr = 0x10
SizeofNlMsgerr = 0x14
SizeofRtGenmsg = 0x1
@@ -618,6 +610,7 @@ const (
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
SizeofNdUseroptmsg = 0x10
@@ -668,6 +661,13 @@ type IfAddrmsg struct {
Index uint32
}
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
type RtMsg struct {
Family uint8
Dst_len uint8
@@ -2459,6 +2459,42 @@ const (
BPF_FD_TYPE_URETPROBE = 0x5
)
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+)
+
type CapUserHeader struct {
Version uint32
Pid int32
@@ -2512,3 +2548,201 @@ type LoopInfo64 struct {
Encrypt_key [32]uint8
Init [2]uint64
}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]uint8
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]uint8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]uint8
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_MAX = 0x3c
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_MAX = 0x80
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index 3104798c40..054b1870ea 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -286,6 +286,13 @@ type RawSockaddrXDP struct {
type RawSockaddrPPPoX [0x1e]byte
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -427,6 +434,7 @@ const (
SizeofSockaddrVM = 0x10
SizeofSockaddrXDP = 0x10
SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -593,22 +601,6 @@ const (
RTN_THROW = 0x9
RTN_NAT = 0xa
RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
SizeofNlMsghdr = 0x10
SizeofNlMsgerr = 0x14
SizeofRtGenmsg = 0x1
@@ -616,6 +608,7 @@ const (
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
SizeofNdUseroptmsg = 0x10
@@ -666,6 +659,13 @@ type IfAddrmsg struct {
Index uint32
}
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
type RtMsg struct {
Family uint8
Dst_len uint8
@@ -2460,6 +2460,42 @@ const (
BPF_FD_TYPE_URETPROBE = 0x5
)
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+)
+
type CapUserHeader struct {
Version uint32
Pid int32
@@ -2514,3 +2550,201 @@ type LoopInfo64 struct {
Encrypt_key [32]uint8
Init [2]uint64
}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]int8
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]int8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]int8
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_MAX = 0x3c
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_MAX = 0x80
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
index 46c86021b7..615ea3ef97 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -288,6 +288,13 @@ type RawSockaddrXDP struct {
type RawSockaddrPPPoX [0x1e]byte
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -428,6 +435,7 @@ const (
SizeofSockaddrVM = 0x10
SizeofSockaddrXDP = 0x10
SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x8
SizeofIPMreq = 0x8
@@ -594,22 +602,6 @@ const (
RTN_THROW = 0x9
RTN_NAT = 0xa
RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
SizeofNlMsghdr = 0x10
SizeofNlMsgerr = 0x14
SizeofRtGenmsg = 0x1
@@ -617,6 +609,7 @@ const (
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
SizeofNdUseroptmsg = 0x10
@@ -667,6 +660,13 @@ type IfAddrmsg struct {
Index uint32
}
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
type RtMsg struct {
Family uint8
Dst_len uint8
@@ -2465,6 +2465,42 @@ const (
BPF_FD_TYPE_URETPROBE = 0x5
)
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+)
+
type CapUserHeader struct {
Version uint32
Pid int32
@@ -2518,3 +2554,201 @@ type LoopInfo64 struct {
Encrypt_key [32]uint8
Init [2]uint64
}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]int8
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]int8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]int8
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_MAX = 0x3c
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_MAX = 0x80
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index c2fe1a62a6..81a818b09d 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -286,6 +286,13 @@ type RawSockaddrXDP struct {
type RawSockaddrPPPoX [0x1e]byte
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -427,6 +434,7 @@ const (
SizeofSockaddrVM = 0x10
SizeofSockaddrXDP = 0x10
SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -593,22 +601,6 @@ const (
RTN_THROW = 0x9
RTN_NAT = 0xa
RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
SizeofNlMsghdr = 0x10
SizeofNlMsgerr = 0x14
SizeofRtGenmsg = 0x1
@@ -616,6 +608,7 @@ const (
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
SizeofNdUseroptmsg = 0x10
@@ -666,6 +659,13 @@ type IfAddrmsg struct {
Index uint32
}
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
type RtMsg struct {
Family uint8
Dst_len uint8
@@ -2462,6 +2462,42 @@ const (
BPF_FD_TYPE_URETPROBE = 0x5
)
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+)
+
type CapUserHeader struct {
Version uint32
Pid int32
@@ -2516,3 +2552,201 @@ type LoopInfo64 struct {
Encrypt_key [32]uint8
Init [2]uint64
}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]int8
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]int8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]int8
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_MAX = 0x3c
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_MAX = 0x80
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index f1eb0d3979..214e345b7c 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -286,6 +286,13 @@ type RawSockaddrXDP struct {
type RawSockaddrPPPoX [0x1e]byte
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -427,6 +434,7 @@ const (
SizeofSockaddrVM = 0x10
SizeofSockaddrXDP = 0x10
SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -593,22 +601,6 @@ const (
RTN_THROW = 0x9
RTN_NAT = 0xa
RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
SizeofNlMsghdr = 0x10
SizeofNlMsgerr = 0x14
SizeofRtGenmsg = 0x1
@@ -616,6 +608,7 @@ const (
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
SizeofNdUseroptmsg = 0x10
@@ -666,6 +659,13 @@ type IfAddrmsg struct {
Index uint32
}
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
type RtMsg struct {
Family uint8
Dst_len uint8
@@ -2462,6 +2462,42 @@ const (
BPF_FD_TYPE_URETPROBE = 0x5
)
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+)
+
type CapUserHeader struct {
Version uint32
Pid int32
@@ -2516,3 +2552,201 @@ type LoopInfo64 struct {
Encrypt_key [32]uint8
Init [2]uint64
}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]int8
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]int8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]int8
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_MAX = 0x3c
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_MAX = 0x80
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
index 8759bc36b8..9741cff6c4 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -288,6 +288,13 @@ type RawSockaddrXDP struct {
type RawSockaddrPPPoX [0x1e]byte
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -428,6 +435,7 @@ const (
SizeofSockaddrVM = 0x10
SizeofSockaddrXDP = 0x10
SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x8
SizeofIPMreq = 0x8
@@ -594,22 +602,6 @@ const (
RTN_THROW = 0x9
RTN_NAT = 0xa
RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
SizeofNlMsghdr = 0x10
SizeofNlMsgerr = 0x14
SizeofRtGenmsg = 0x1
@@ -617,6 +609,7 @@ const (
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
SizeofNdUseroptmsg = 0x10
@@ -667,6 +660,13 @@ type IfAddrmsg struct {
Index uint32
}
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
type RtMsg struct {
Family uint8
Dst_len uint8
@@ -2465,6 +2465,42 @@ const (
BPF_FD_TYPE_URETPROBE = 0x5
)
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+)
+
type CapUserHeader struct {
Version uint32
Pid int32
@@ -2518,3 +2554,201 @@ type LoopInfo64 struct {
Encrypt_key [32]uint8
Init [2]uint64
}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]int8
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]int8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]int8
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_MAX = 0x3c
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_MAX = 0x80
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index a812005412..123e875041 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -287,6 +287,13 @@ type RawSockaddrXDP struct {
type RawSockaddrPPPoX [0x1e]byte
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
type RawSockaddr struct {
Family uint16
Data [14]uint8
@@ -428,6 +435,7 @@ const (
SizeofSockaddrVM = 0x10
SizeofSockaddrXDP = 0x10
SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -594,22 +602,6 @@ const (
RTN_THROW = 0x9
RTN_NAT = 0xa
RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
SizeofNlMsghdr = 0x10
SizeofNlMsgerr = 0x14
SizeofRtGenmsg = 0x1
@@ -617,6 +609,7 @@ const (
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
SizeofNdUseroptmsg = 0x10
@@ -667,6 +660,13 @@ type IfAddrmsg struct {
Index uint32
}
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
type RtMsg struct {
Family uint8
Dst_len uint8
@@ -2470,6 +2470,42 @@ const (
BPF_FD_TYPE_URETPROBE = 0x5
)
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+)
+
type CapUserHeader struct {
Version uint32
Pid int32
@@ -2524,3 +2560,201 @@ type LoopInfo64 struct {
Encrypt_key [32]uint8
Init [2]uint64
}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]uint8
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]uint8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]uint8
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_MAX = 0x3c
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_MAX = 0x80
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index 74b7a9199b..c9ca0a286d 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -287,6 +287,13 @@ type RawSockaddrXDP struct {
type RawSockaddrPPPoX [0x1e]byte
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
type RawSockaddr struct {
Family uint16
Data [14]uint8
@@ -428,6 +435,7 @@ const (
SizeofSockaddrVM = 0x10
SizeofSockaddrXDP = 0x10
SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -594,22 +602,6 @@ const (
RTN_THROW = 0x9
RTN_NAT = 0xa
RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
SizeofNlMsghdr = 0x10
SizeofNlMsgerr = 0x14
SizeofRtGenmsg = 0x1
@@ -617,6 +609,7 @@ const (
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
SizeofNdUseroptmsg = 0x10
@@ -667,6 +660,13 @@ type IfAddrmsg struct {
Index uint32
}
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
type RtMsg struct {
Family uint8
Dst_len uint8
@@ -2470,6 +2470,42 @@ const (
BPF_FD_TYPE_URETPROBE = 0x5
)
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+)
+
type CapUserHeader struct {
Version uint32
Pid int32
@@ -2524,3 +2560,201 @@ type LoopInfo64 struct {
Encrypt_key [32]uint8
Init [2]uint64
}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]uint8
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]uint8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]uint8
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_MAX = 0x3c
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_MAX = 0x80
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
index ccea3e6387..9b205aa1a4 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
@@ -286,6 +286,13 @@ type RawSockaddrXDP struct {
type RawSockaddrPPPoX [0x1e]byte
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
type RawSockaddr struct {
Family uint16
Data [14]uint8
@@ -427,6 +434,7 @@ const (
SizeofSockaddrVM = 0x10
SizeofSockaddrXDP = 0x10
SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -593,22 +601,6 @@ const (
RTN_THROW = 0x9
RTN_NAT = 0xa
RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
SizeofNlMsghdr = 0x10
SizeofNlMsgerr = 0x14
SizeofRtGenmsg = 0x1
@@ -616,6 +608,7 @@ const (
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
SizeofNdUseroptmsg = 0x10
@@ -666,6 +659,13 @@ type IfAddrmsg struct {
Index uint32
}
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
type RtMsg struct {
Family uint8
Dst_len uint8
@@ -2488,6 +2488,42 @@ const (
BPF_FD_TYPE_URETPROBE = 0x5
)
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+)
+
type CapUserHeader struct {
Version uint32
Pid int32
@@ -2542,3 +2578,201 @@ type LoopInfo64 struct {
Encrypt_key [32]uint8
Init [2]uint64
}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]uint8
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]uint8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]uint8
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_MAX = 0x3c
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_MAX = 0x80
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index d8fc0bc1cd..9a95c5b9f5 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -285,6 +285,13 @@ type RawSockaddrXDP struct {
type RawSockaddrPPPoX [0x1e]byte
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -426,6 +433,7 @@ const (
SizeofSockaddrVM = 0x10
SizeofSockaddrXDP = 0x10
SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -592,22 +600,6 @@ const (
RTN_THROW = 0x9
RTN_NAT = 0xa
RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
SizeofNlMsghdr = 0x10
SizeofNlMsgerr = 0x14
SizeofRtGenmsg = 0x1
@@ -615,6 +607,7 @@ const (
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
SizeofNdUseroptmsg = 0x10
@@ -665,6 +658,13 @@ type IfAddrmsg struct {
Index uint32
}
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
type RtMsg struct {
Family uint8
Dst_len uint8
@@ -2484,6 +2484,42 @@ const (
BPF_FD_TYPE_URETPROBE = 0x5
)
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+)
+
type CapUserHeader struct {
Version uint32
Pid int32
@@ -2538,3 +2574,201 @@ type LoopInfo64 struct {
Encrypt_key [32]uint8
Init [2]uint64
}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]int8
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]int8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]int8
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_MAX = 0x3c
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_MAX = 0x80
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
index 5e0ab93292..eb72393d13 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
@@ -289,6 +289,13 @@ type RawSockaddrXDP struct {
type RawSockaddrPPPoX [0x1e]byte
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -430,6 +437,7 @@ const (
SizeofSockaddrVM = 0x10
SizeofSockaddrXDP = 0x10
SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -596,22 +604,6 @@ const (
RTN_THROW = 0x9
RTN_NAT = 0xa
RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
SizeofNlMsghdr = 0x10
SizeofNlMsgerr = 0x14
SizeofRtGenmsg = 0x1
@@ -619,6 +611,7 @@ const (
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
SizeofNdUseroptmsg = 0x10
@@ -669,6 +662,13 @@ type IfAddrmsg struct {
Index uint32
}
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
type RtMsg struct {
Family uint8
Dst_len uint8
@@ -2465,6 +2465,42 @@ const (
BPF_FD_TYPE_URETPROBE = 0x5
)
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+)
+
type CapUserHeader struct {
Version uint32
Pid int32
@@ -2519,3 +2555,201 @@ type LoopInfo64 struct {
Encrypt_key [32]uint8
Init [2]uint64
}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]int8
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]int8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]int8
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_MAX = 0x3c
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_MAX = 0x80
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+)
diff --git a/vendor/golang.org/x/sys/windows/asm_windows_386.s b/vendor/golang.org/x/sys/windows/asm_windows_386.s
deleted file mode 100644
index 21d994d318..0000000000
--- a/vendor/golang.org/x/sys/windows/asm_windows_386.s
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2009 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.
-
-//
-// System calls for 386, Windows are implemented in runtime/syscall_windows.goc
-//
-
-TEXT ·getprocaddress(SB), 7, $0-16
- JMP syscall·getprocaddress(SB)
-
-TEXT ·loadlibrary(SB), 7, $0-12
- JMP syscall·loadlibrary(SB)
diff --git a/vendor/golang.org/x/sys/windows/asm_windows_amd64.s b/vendor/golang.org/x/sys/windows/asm_windows_amd64.s
deleted file mode 100644
index 5bfdf79741..0000000000
--- a/vendor/golang.org/x/sys/windows/asm_windows_amd64.s
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2009 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.
-
-//
-// System calls for amd64, Windows are implemented in runtime/syscall_windows.goc
-//
-
-TEXT ·getprocaddress(SB), 7, $0-32
- JMP syscall·getprocaddress(SB)
-
-TEXT ·loadlibrary(SB), 7, $0-24
- JMP syscall·loadlibrary(SB)
diff --git a/vendor/golang.org/x/sys/windows/asm_windows_arm.s b/vendor/golang.org/x/sys/windows/asm_windows_arm.s
deleted file mode 100644
index 55d8b91a28..0000000000
--- a/vendor/golang.org/x/sys/windows/asm_windows_arm.s
+++ /dev/null
@@ -1,11 +0,0 @@
-// 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.
-
-#include "textflag.h"
-
-TEXT ·getprocaddress(SB),NOSPLIT,$0
- B syscall·getprocaddress(SB)
-
-TEXT ·loadlibrary(SB),NOSPLIT,$0
- B syscall·loadlibrary(SB)
diff --git a/vendor/golang.org/x/sys/windows/dll_windows.go b/vendor/golang.org/x/sys/windows/dll_windows.go
index ba67658db1..d777113415 100644
--- a/vendor/golang.org/x/sys/windows/dll_windows.go
+++ b/vendor/golang.org/x/sys/windows/dll_windows.go
@@ -11,6 +11,18 @@ import (
"unsafe"
)
+// We need to use LoadLibrary and GetProcAddress from the Go runtime, because
+// the these symbols are loaded by the system linker and are required to
+// dynamically load additional symbols. Note that in the Go runtime, these
+// return syscall.Handle and syscall.Errno, but these are the same, in fact,
+// as windows.Handle and windows.Errno, and we intend to keep these the same.
+
+//go:linkname syscall_loadlibrary syscall.loadlibrary
+func syscall_loadlibrary(filename *uint16) (handle Handle, err Errno)
+
+//go:linkname syscall_getprocaddress syscall.getprocaddress
+func syscall_getprocaddress(handle Handle, procname *uint8) (proc uintptr, err Errno)
+
// DLLError describes reasons for DLL load failures.
type DLLError struct {
Err error
@@ -20,10 +32,6 @@ type DLLError struct {
func (e *DLLError) Error() string { return e.Msg }
-// Implemented in runtime/syscall_windows.goc; we provide jumps to them in our assembly file.
-func loadlibrary(filename *uint16) (handle uintptr, err syscall.Errno)
-func getprocaddress(handle uintptr, procname *uint8) (proc uintptr, err syscall.Errno)
-
// A DLL implements access to a single DLL.
type DLL struct {
Name string
@@ -40,7 +48,7 @@ func LoadDLL(name string) (dll *DLL, err error) {
if err != nil {
return nil, err
}
- h, e := loadlibrary(namep)
+ h, e := syscall_loadlibrary(namep)
if e != 0 {
return nil, &DLLError{
Err: e,
@@ -50,7 +58,7 @@ func LoadDLL(name string) (dll *DLL, err error) {
}
d := &DLL{
Name: name,
- Handle: Handle(h),
+ Handle: h,
}
return d, nil
}
@@ -71,7 +79,7 @@ func (d *DLL) FindProc(name string) (proc *Proc, err error) {
if err != nil {
return nil, err
}
- a, e := getprocaddress(uintptr(d.Handle), namep)
+ a, e := syscall_getprocaddress(d.Handle, namep)
if e != 0 {
return nil, &DLLError{
Err: e,
diff --git a/vendor/golang.org/x/sys/windows/mksyscall.go b/vendor/golang.org/x/sys/windows/mksyscall.go
index 6277057274..328e3b2ace 100644
--- a/vendor/golang.org/x/sys/windows/mksyscall.go
+++ b/vendor/golang.org/x/sys/windows/mksyscall.go
@@ -6,4 +6,4 @@
package windows
-//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go
+//go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go
diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go
index 61b49647b9..d88ed91a84 100644
--- a/vendor/golang.org/x/sys/windows/security_windows.go
+++ b/vendor/golang.org/x/sys/windows/security_windows.go
@@ -9,14 +9,6 @@ import (
"unsafe"
)
-const (
- STANDARD_RIGHTS_REQUIRED = 0xf0000
- STANDARD_RIGHTS_READ = 0x20000
- STANDARD_RIGHTS_WRITE = 0x20000
- STANDARD_RIGHTS_EXECUTE = 0x20000
- STANDARD_RIGHTS_ALL = 0x1F0000
-)
-
const (
NameUnknown = 0
NameFullyQualifiedDN = 1
@@ -235,16 +227,17 @@ func LookupSID(system, account string) (sid *SID, domain string, accType uint32,
}
}
-// String converts SID to a string format
-// suitable for display, storage, or transmission.
-func (sid *SID) String() (string, error) {
+// String converts SID to a string format suitable for display, storage, or transmission.
+func (sid *SID) String() string {
+ // From https://docs.microsoft.com/en-us/windows/win32/secbiomet/general-constants
+ const SecurityMaxSidSize = 68
var s *uint16
e := ConvertSidToStringSid(sid, &s)
if e != nil {
- return "", e
+ return ""
}
defer LocalFree((Handle)(unsafe.Pointer(s)))
- return UTF16ToString((*[256]uint16)(unsafe.Pointer(s))[:]), nil
+ return UTF16ToString((*[SecurityMaxSidSize]uint16)(unsafe.Pointer(s))[:])
}
// Len returns the length, in bytes, of a valid security identifier SID.
@@ -644,6 +637,8 @@ func (tml *Tokenmandatorylabel) Size() uint32 {
//sys DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes *SecurityAttributes, impersonationLevel uint32, tokenType uint32, newToken *Token) (err error) = advapi32.DuplicateTokenEx
//sys GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) = userenv.GetUserProfileDirectoryW
//sys getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) = kernel32.GetSystemDirectoryW
+//sys getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) = kernel32.GetWindowsDirectoryW
+//sys getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) = kernel32.GetSystemWindowsDirectoryW
// An access token contains the security information for a logon session.
// The system creates an access token when a user logs on, and every
@@ -654,21 +649,16 @@ func (tml *Tokenmandatorylabel) Size() uint32 {
// system-related operations on the local computer.
type Token Handle
-// OpenCurrentProcessToken opens the access token
-// associated with current process. It is a real
-// token that needs to be closed, unlike
-// GetCurrentProcessToken.
+// OpenCurrentProcessToken opens an access token associated with current
+// process with TOKEN_QUERY access. It is a real token that needs to be closed.
+//
+// Deprecated: Explicitly call OpenProcessToken(CurrentProcess(), ...)
+// with the desired access instead, or use GetCurrentProcessToken for a
+// TOKEN_QUERY token.
func OpenCurrentProcessToken() (Token, error) {
- p, e := GetCurrentProcess()
- if e != nil {
- return 0, e
- }
- var t Token
- e = OpenProcessToken(p, TOKEN_QUERY, &t)
- if e != nil {
- return 0, e
- }
- return t, nil
+ var token Token
+ err := OpenProcessToken(CurrentProcess(), TOKEN_QUERY, &token)
+ return token, err
}
// GetCurrentProcessToken returns the access token associated with
@@ -785,8 +775,8 @@ func (token Token) GetLinkedToken() (Token, error) {
return linkedToken, nil
}
-// GetSystemDirectory retrieves path to current location of the system
-// directory, which is typically, though not always, C:\Windows\System32.
+// GetSystemDirectory retrieves the path to current location of the system
+// directory, which is typically, though not always, `C:\Windows\System32`.
func GetSystemDirectory() (string, error) {
n := uint32(MAX_PATH)
for {
@@ -802,6 +792,42 @@ func GetSystemDirectory() (string, error) {
}
}
+// GetWindowsDirectory retrieves the path to current location of the Windows
+// directory, which is typically, though not always, `C:\Windows`. This may
+// be a private user directory in the case that the application is running
+// under a terminal server.
+func GetWindowsDirectory() (string, error) {
+ n := uint32(MAX_PATH)
+ for {
+ b := make([]uint16, n)
+ l, e := getWindowsDirectory(&b[0], n)
+ if e != nil {
+ return "", e
+ }
+ if l <= n {
+ return UTF16ToString(b[:l]), nil
+ }
+ n = l
+ }
+}
+
+// GetSystemWindowsDirectory retrieves the path to current location of the
+// Windows directory, which is typically, though not always, `C:\Windows`.
+func GetSystemWindowsDirectory() (string, error) {
+ n := uint32(MAX_PATH)
+ for {
+ b := make([]uint16, n)
+ l, e := getSystemWindowsDirectory(&b[0], n)
+ if e != nil {
+ return "", e
+ }
+ if l <= n {
+ return UTF16ToString(b[:l]), nil
+ }
+ n = l
+ }
+}
+
// IsMember reports whether the access token t is a member of the provided SID.
func (t Token) IsMember(sid *SID) (bool, error) {
var b int32
@@ -852,3 +878,521 @@ type WTS_SESSION_INFO struct {
//sys WTSQueryUserToken(session uint32, token *Token) (err error) = wtsapi32.WTSQueryUserToken
//sys WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) = wtsapi32.WTSEnumerateSessionsW
//sys WTSFreeMemory(ptr uintptr) = wtsapi32.WTSFreeMemory
+
+type ACL struct {
+ aclRevision byte
+ sbz1 byte
+ aclSize uint16
+ aceCount uint16
+ sbz2 uint16
+}
+
+type SECURITY_DESCRIPTOR struct {
+ revision byte
+ sbz1 byte
+ control SECURITY_DESCRIPTOR_CONTROL
+ owner *SID
+ group *SID
+ sacl *ACL
+ dacl *ACL
+}
+
+type SecurityAttributes struct {
+ Length uint32
+ SecurityDescriptor *SECURITY_DESCRIPTOR
+ InheritHandle uint32
+}
+
+type SE_OBJECT_TYPE uint32
+
+// Constants for type SE_OBJECT_TYPE
+const (
+ SE_UNKNOWN_OBJECT_TYPE = 0
+ SE_FILE_OBJECT = 1
+ SE_SERVICE = 2
+ SE_PRINTER = 3
+ SE_REGISTRY_KEY = 4
+ SE_LMSHARE = 5
+ SE_KERNEL_OBJECT = 6
+ SE_WINDOW_OBJECT = 7
+ SE_DS_OBJECT = 8
+ SE_DS_OBJECT_ALL = 9
+ SE_PROVIDER_DEFINED_OBJECT = 10
+ SE_WMIGUID_OBJECT = 11
+ SE_REGISTRY_WOW64_32KEY = 12
+ SE_REGISTRY_WOW64_64KEY = 13
+)
+
+type SECURITY_INFORMATION uint32
+
+// Constants for type SECURITY_INFORMATION
+const (
+ OWNER_SECURITY_INFORMATION = 0x00000001
+ GROUP_SECURITY_INFORMATION = 0x00000002
+ DACL_SECURITY_INFORMATION = 0x00000004
+ SACL_SECURITY_INFORMATION = 0x00000008
+ LABEL_SECURITY_INFORMATION = 0x00000010
+ ATTRIBUTE_SECURITY_INFORMATION = 0x00000020
+ SCOPE_SECURITY_INFORMATION = 0x00000040
+ BACKUP_SECURITY_INFORMATION = 0x00010000
+ PROTECTED_DACL_SECURITY_INFORMATION = 0x80000000
+ PROTECTED_SACL_SECURITY_INFORMATION = 0x40000000
+ UNPROTECTED_DACL_SECURITY_INFORMATION = 0x20000000
+ UNPROTECTED_SACL_SECURITY_INFORMATION = 0x10000000
+)
+
+type SECURITY_DESCRIPTOR_CONTROL uint16
+
+// Constants for type SECURITY_DESCRIPTOR_CONTROL
+const (
+ SE_OWNER_DEFAULTED = 0x0001
+ SE_GROUP_DEFAULTED = 0x0002
+ SE_DACL_PRESENT = 0x0004
+ SE_DACL_DEFAULTED = 0x0008
+ SE_SACL_PRESENT = 0x0010
+ SE_SACL_DEFAULTED = 0x0020
+ SE_DACL_AUTO_INHERIT_REQ = 0x0100
+ SE_SACL_AUTO_INHERIT_REQ = 0x0200
+ SE_DACL_AUTO_INHERITED = 0x0400
+ SE_SACL_AUTO_INHERITED = 0x0800
+ SE_DACL_PROTECTED = 0x1000
+ SE_SACL_PROTECTED = 0x2000
+ SE_RM_CONTROL_VALID = 0x4000
+ SE_SELF_RELATIVE = 0x8000
+)
+
+type ACCESS_MASK uint32
+
+// Constants for type ACCESS_MASK
+const (
+ DELETE = 0x00010000
+ READ_CONTROL = 0x00020000
+ WRITE_DAC = 0x00040000
+ WRITE_OWNER = 0x00080000
+ SYNCHRONIZE = 0x00100000
+ STANDARD_RIGHTS_REQUIRED = 0x000F0000
+ STANDARD_RIGHTS_READ = READ_CONTROL
+ STANDARD_RIGHTS_WRITE = READ_CONTROL
+ STANDARD_RIGHTS_EXECUTE = READ_CONTROL
+ STANDARD_RIGHTS_ALL = 0x001F0000
+ SPECIFIC_RIGHTS_ALL = 0x0000FFFF
+ ACCESS_SYSTEM_SECURITY = 0x01000000
+ MAXIMUM_ALLOWED = 0x02000000
+ GENERIC_READ = 0x80000000
+ GENERIC_WRITE = 0x40000000
+ GENERIC_EXECUTE = 0x20000000
+ GENERIC_ALL = 0x10000000
+)
+
+type ACCESS_MODE uint32
+
+// Constants for type ACCESS_MODE
+const (
+ NOT_USED_ACCESS = 0
+ GRANT_ACCESS = 1
+ SET_ACCESS = 2
+ DENY_ACCESS = 3
+ REVOKE_ACCESS = 4
+ SET_AUDIT_SUCCESS = 5
+ SET_AUDIT_FAILURE = 6
+)
+
+// Constants for AceFlags and Inheritance fields
+const (
+ NO_INHERITANCE = 0x0
+ SUB_OBJECTS_ONLY_INHERIT = 0x1
+ SUB_CONTAINERS_ONLY_INHERIT = 0x2
+ SUB_CONTAINERS_AND_OBJECTS_INHERIT = 0x3
+ INHERIT_NO_PROPAGATE = 0x4
+ INHERIT_ONLY = 0x8
+ INHERITED_ACCESS_ENTRY = 0x10
+ INHERITED_PARENT = 0x10000000
+ INHERITED_GRANDPARENT = 0x20000000
+ OBJECT_INHERIT_ACE = 0x1
+ CONTAINER_INHERIT_ACE = 0x2
+ NO_PROPAGATE_INHERIT_ACE = 0x4
+ INHERIT_ONLY_ACE = 0x8
+ INHERITED_ACE = 0x10
+ VALID_INHERIT_FLAGS = 0x1F
+)
+
+type MULTIPLE_TRUSTEE_OPERATION uint32
+
+// Constants for MULTIPLE_TRUSTEE_OPERATION
+const (
+ NO_MULTIPLE_TRUSTEE = 0
+ TRUSTEE_IS_IMPERSONATE = 1
+)
+
+type TRUSTEE_FORM uint32
+
+// Constants for TRUSTEE_FORM
+const (
+ TRUSTEE_IS_SID = 0
+ TRUSTEE_IS_NAME = 1
+ TRUSTEE_BAD_FORM = 2
+ TRUSTEE_IS_OBJECTS_AND_SID = 3
+ TRUSTEE_IS_OBJECTS_AND_NAME = 4
+)
+
+type TRUSTEE_TYPE uint32
+
+// Constants for TRUSTEE_TYPE
+const (
+ TRUSTEE_IS_UNKNOWN = 0
+ TRUSTEE_IS_USER = 1
+ TRUSTEE_IS_GROUP = 2
+ TRUSTEE_IS_DOMAIN = 3
+ TRUSTEE_IS_ALIAS = 4
+ TRUSTEE_IS_WELL_KNOWN_GROUP = 5
+ TRUSTEE_IS_DELETED = 6
+ TRUSTEE_IS_INVALID = 7
+ TRUSTEE_IS_COMPUTER = 8
+)
+
+// Constants for ObjectsPresent field
+const (
+ ACE_OBJECT_TYPE_PRESENT = 0x1
+ ACE_INHERITED_OBJECT_TYPE_PRESENT = 0x2
+)
+
+type EXPLICIT_ACCESS struct {
+ AccessPermissions ACCESS_MASK
+ AccessMode ACCESS_MODE
+ Inheritance uint32
+ Trustee TRUSTEE
+}
+
+// This type is the union inside of TRUSTEE and must be created using one of the TrusteeValueFrom* functions.
+type TrusteeValue uintptr
+
+func TrusteeValueFromString(str string) TrusteeValue {
+ return TrusteeValue(unsafe.Pointer(StringToUTF16Ptr(str)))
+}
+func TrusteeValueFromSID(sid *SID) TrusteeValue {
+ return TrusteeValue(unsafe.Pointer(sid))
+}
+func TrusteeValueFromObjectsAndSid(objectsAndSid *OBJECTS_AND_SID) TrusteeValue {
+ return TrusteeValue(unsafe.Pointer(objectsAndSid))
+}
+func TrusteeValueFromObjectsAndName(objectsAndName *OBJECTS_AND_NAME) TrusteeValue {
+ return TrusteeValue(unsafe.Pointer(objectsAndName))
+}
+
+type TRUSTEE struct {
+ MultipleTrustee *TRUSTEE
+ MultipleTrusteeOperation MULTIPLE_TRUSTEE_OPERATION
+ TrusteeForm TRUSTEE_FORM
+ TrusteeType TRUSTEE_TYPE
+ TrusteeValue TrusteeValue
+}
+
+type OBJECTS_AND_SID struct {
+ ObjectsPresent uint32
+ ObjectTypeGuid GUID
+ InheritedObjectTypeGuid GUID
+ Sid *SID
+}
+
+type OBJECTS_AND_NAME struct {
+ ObjectsPresent uint32
+ ObjectType SE_OBJECT_TYPE
+ ObjectTypeName *uint16
+ InheritedObjectTypeName *uint16
+ Name *uint16
+}
+
+//sys getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) = advapi32.GetSecurityInfo
+//sys SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) = advapi32.SetSecurityInfo
+//sys getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) = advapi32.GetNamedSecurityInfoW
+//sys SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) = advapi32.SetNamedSecurityInfoW
+
+//sys buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) = advapi32.BuildSecurityDescriptorW
+//sys initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) = advapi32.InitializeSecurityDescriptor
+
+//sys getSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, control *SECURITY_DESCRIPTOR_CONTROL, revision *uint32) (err error) = advapi32.GetSecurityDescriptorControl
+//sys getSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent *bool, dacl **ACL, daclDefaulted *bool) (err error) = advapi32.GetSecurityDescriptorDacl
+//sys getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl **ACL, saclDefaulted *bool) (err error) = advapi32.GetSecurityDescriptorSacl
+//sys getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefaulted *bool) (err error) = advapi32.GetSecurityDescriptorOwner
+//sys getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefaulted *bool) (err error) = advapi32.GetSecurityDescriptorGroup
+//sys getSecurityDescriptorLength(sd *SECURITY_DESCRIPTOR) (len uint32) = advapi32.GetSecurityDescriptorLength
+//sys getSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) (ret error) [failretval!=0] = advapi32.GetSecurityDescriptorRMControl
+//sys isValidSecurityDescriptor(sd *SECURITY_DESCRIPTOR) (isValid bool) = advapi32.IsValidSecurityDescriptor
+
+//sys setSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) (err error) = advapi32.SetSecurityDescriptorControl
+//sys setSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent bool, dacl *ACL, daclDefaulted bool) (err error) = advapi32.SetSecurityDescriptorDacl
+//sys setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *ACL, saclDefaulted bool) (err error) = advapi32.SetSecurityDescriptorSacl
+//sys setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaulted bool) (err error) = advapi32.SetSecurityDescriptorOwner
+//sys setSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group *SID, groupDefaulted bool) (err error) = advapi32.SetSecurityDescriptorGroup
+//sys setSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) = advapi32.SetSecurityDescriptorRMControl
+
+//sys convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) = advapi32.ConvertStringSecurityDescriptorToSecurityDescriptorW
+//sys convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR, revision uint32, securityInformation SECURITY_INFORMATION, str **uint16, strLen *uint32) (err error) = advapi32.ConvertSecurityDescriptorToStringSecurityDescriptorW
+
+//sys makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DESCRIPTOR, absoluteSDSize *uint32, dacl *ACL, daclSize *uint32, sacl *ACL, saclSize *uint32, owner *SID, ownerSize *uint32, group *SID, groupSize *uint32) (err error) = advapi32.MakeAbsoluteSD
+//sys makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) = advapi32.MakeSelfRelativeSD
+
+//sys setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) = advapi32.SetEntriesInAclW
+
+// Control returns the security descriptor control bits.
+func (sd *SECURITY_DESCRIPTOR) Control() (control SECURITY_DESCRIPTOR_CONTROL, revision uint32, err error) {
+ err = getSecurityDescriptorControl(sd, &control, &revision)
+ return
+}
+
+// SetControl sets the security descriptor control bits.
+func (sd *SECURITY_DESCRIPTOR) SetControl(controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) error {
+ return setSecurityDescriptorControl(sd, controlBitsOfInterest, controlBitsToSet)
+}
+
+// RMControl returns the security descriptor resource manager control bits.
+func (sd *SECURITY_DESCRIPTOR) RMControl() (control uint8, err error) {
+ err = getSecurityDescriptorRMControl(sd, &control)
+ return
+}
+
+// SetRMControl sets the security descriptor resource manager control bits.
+func (sd *SECURITY_DESCRIPTOR) SetRMControl(rmControl uint8) {
+ setSecurityDescriptorRMControl(sd, &rmControl)
+}
+
+// DACL returns the security descriptor DACL and whether it was defaulted. The dacl return value may be nil
+// if a DACL exists but is an "empty DACL", meaning fully permissive. If the DACL does not exist, err returns
+// ERROR_OBJECT_NOT_FOUND.
+func (sd *SECURITY_DESCRIPTOR) DACL() (dacl *ACL, defaulted bool, err error) {
+ var present bool
+ err = getSecurityDescriptorDacl(sd, &present, &dacl, &defaulted)
+ if !present {
+ err = ERROR_OBJECT_NOT_FOUND
+ }
+ return
+}
+
+// SetDACL sets the absolute security descriptor DACL.
+func (absoluteSD *SECURITY_DESCRIPTOR) SetDACL(dacl *ACL, present, defaulted bool) error {
+ return setSecurityDescriptorDacl(absoluteSD, present, dacl, defaulted)
+}
+
+// SACL returns the security descriptor SACL and whether it was defaulted. The sacl return value may be nil
+// if a SACL exists but is an "empty SACL", meaning fully permissive. If the SACL does not exist, err returns
+// ERROR_OBJECT_NOT_FOUND.
+func (sd *SECURITY_DESCRIPTOR) SACL() (sacl *ACL, defaulted bool, err error) {
+ var present bool
+ err = getSecurityDescriptorSacl(sd, &present, &sacl, &defaulted)
+ if !present {
+ err = ERROR_OBJECT_NOT_FOUND
+ }
+ return
+}
+
+// SetSACL sets the absolute security descriptor SACL.
+func (absoluteSD *SECURITY_DESCRIPTOR) SetSACL(sacl *ACL, present, defaulted bool) error {
+ return setSecurityDescriptorSacl(absoluteSD, present, sacl, defaulted)
+}
+
+// Owner returns the security descriptor owner and whether it was defaulted.
+func (sd *SECURITY_DESCRIPTOR) Owner() (owner *SID, defaulted bool, err error) {
+ err = getSecurityDescriptorOwner(sd, &owner, &defaulted)
+ return
+}
+
+// SetOwner sets the absolute security descriptor owner.
+func (absoluteSD *SECURITY_DESCRIPTOR) SetOwner(owner *SID, defaulted bool) error {
+ return setSecurityDescriptorOwner(absoluteSD, owner, defaulted)
+}
+
+// Group returns the security descriptor group and whether it was defaulted.
+func (sd *SECURITY_DESCRIPTOR) Group() (group *SID, defaulted bool, err error) {
+ err = getSecurityDescriptorGroup(sd, &group, &defaulted)
+ return
+}
+
+// SetGroup sets the absolute security descriptor owner.
+func (absoluteSD *SECURITY_DESCRIPTOR) SetGroup(group *SID, defaulted bool) error {
+ return setSecurityDescriptorGroup(absoluteSD, group, defaulted)
+}
+
+// Length returns the length of the security descriptor.
+func (sd *SECURITY_DESCRIPTOR) Length() uint32 {
+ return getSecurityDescriptorLength(sd)
+}
+
+// IsValid returns whether the security descriptor is valid.
+func (sd *SECURITY_DESCRIPTOR) IsValid() bool {
+ return isValidSecurityDescriptor(sd)
+}
+
+// String returns the SDDL form of the security descriptor, with a function signature that can be
+// used with %v formatting directives.
+func (sd *SECURITY_DESCRIPTOR) String() string {
+ var sddl *uint16
+ err := convertSecurityDescriptorToStringSecurityDescriptor(sd, 1, 0xff, &sddl, nil)
+ if err != nil {
+ return ""
+ }
+ defer LocalFree(Handle(unsafe.Pointer(sddl)))
+ return UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(sddl))[:])
+}
+
+// ToAbsolute converts a self-relative security descriptor into an absolute one.
+func (selfRelativeSD *SECURITY_DESCRIPTOR) ToAbsolute() (absoluteSD *SECURITY_DESCRIPTOR, err error) {
+ control, _, err := selfRelativeSD.Control()
+ if err != nil {
+ return
+ }
+ if control&SE_SELF_RELATIVE == 0 {
+ err = ERROR_INVALID_PARAMETER
+ return
+ }
+ var absoluteSDSize, daclSize, saclSize, ownerSize, groupSize uint32
+ err = makeAbsoluteSD(selfRelativeSD, nil, &absoluteSDSize,
+ nil, &daclSize, nil, &saclSize, nil, &ownerSize, nil, &groupSize)
+ switch err {
+ case ERROR_INSUFFICIENT_BUFFER:
+ case nil:
+ // makeAbsoluteSD is expected to fail, but it succeeds.
+ return nil, ERROR_INTERNAL_ERROR
+ default:
+ return nil, err
+ }
+ if absoluteSDSize > 0 {
+ absoluteSD = (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&make([]byte, absoluteSDSize)[0]))
+ }
+ var (
+ dacl *ACL
+ sacl *ACL
+ owner *SID
+ group *SID
+ )
+ if daclSize > 0 {
+ dacl = (*ACL)(unsafe.Pointer(&make([]byte, daclSize)[0]))
+ }
+ if saclSize > 0 {
+ sacl = (*ACL)(unsafe.Pointer(&make([]byte, saclSize)[0]))
+ }
+ if ownerSize > 0 {
+ owner = (*SID)(unsafe.Pointer(&make([]byte, ownerSize)[0]))
+ }
+ if groupSize > 0 {
+ group = (*SID)(unsafe.Pointer(&make([]byte, groupSize)[0]))
+ }
+ err = makeAbsoluteSD(selfRelativeSD, absoluteSD, &absoluteSDSize,
+ dacl, &daclSize, sacl, &saclSize, owner, &ownerSize, group, &groupSize)
+ return
+}
+
+// ToSelfRelative converts an absolute security descriptor into a self-relative one.
+func (absoluteSD *SECURITY_DESCRIPTOR) ToSelfRelative() (selfRelativeSD *SECURITY_DESCRIPTOR, err error) {
+ control, _, err := absoluteSD.Control()
+ if err != nil {
+ return
+ }
+ if control&SE_SELF_RELATIVE != 0 {
+ err = ERROR_INVALID_PARAMETER
+ return
+ }
+ var selfRelativeSDSize uint32
+ err = makeSelfRelativeSD(absoluteSD, nil, &selfRelativeSDSize)
+ switch err {
+ case ERROR_INSUFFICIENT_BUFFER:
+ case nil:
+ // makeSelfRelativeSD is expected to fail, but it succeeds.
+ return nil, ERROR_INTERNAL_ERROR
+ default:
+ return nil, err
+ }
+ if selfRelativeSDSize > 0 {
+ selfRelativeSD = (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&make([]byte, selfRelativeSDSize)[0]))
+ }
+ err = makeSelfRelativeSD(absoluteSD, selfRelativeSD, &selfRelativeSDSize)
+ return
+}
+
+func (selfRelativeSD *SECURITY_DESCRIPTOR) copySelfRelativeSecurityDescriptor() *SECURITY_DESCRIPTOR {
+ sdBytes := make([]byte, selfRelativeSD.Length())
+ copy(sdBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(selfRelativeSD))[:len(sdBytes)])
+ return (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&sdBytes[0]))
+}
+
+// SecurityDescriptorFromString converts an SDDL string describing a security descriptor into a
+// self-relative security descriptor object allocated on the Go heap.
+func SecurityDescriptorFromString(sddl string) (sd *SECURITY_DESCRIPTOR, err error) {
+ var winHeapSD *SECURITY_DESCRIPTOR
+ err = convertStringSecurityDescriptorToSecurityDescriptor(sddl, 1, &winHeapSD, nil)
+ if err != nil {
+ return
+ }
+ defer LocalFree(Handle(unsafe.Pointer(winHeapSD)))
+ return winHeapSD.copySelfRelativeSecurityDescriptor(), nil
+}
+
+// GetSecurityInfo queries the security information for a given handle and returns the self-relative security
+// descriptor result on the Go heap.
+func GetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION) (sd *SECURITY_DESCRIPTOR, err error) {
+ var winHeapSD *SECURITY_DESCRIPTOR
+ err = getSecurityInfo(handle, objectType, securityInformation, nil, nil, nil, nil, &winHeapSD)
+ if err != nil {
+ return
+ }
+ defer LocalFree(Handle(unsafe.Pointer(winHeapSD)))
+ return winHeapSD.copySelfRelativeSecurityDescriptor(), nil
+}
+
+// GetNamedSecurityInfo queries the security information for a given named object and returns the self-relative security
+// descriptor result on the Go heap.
+func GetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION) (sd *SECURITY_DESCRIPTOR, err error) {
+ var winHeapSD *SECURITY_DESCRIPTOR
+ err = getNamedSecurityInfo(objectName, objectType, securityInformation, nil, nil, nil, nil, &winHeapSD)
+ if err != nil {
+ return
+ }
+ defer LocalFree(Handle(unsafe.Pointer(winHeapSD)))
+ return winHeapSD.copySelfRelativeSecurityDescriptor(), nil
+}
+
+// BuildSecurityDescriptor makes a new security descriptor using the input trustees, explicit access lists, and
+// prior security descriptor to be merged, any of which can be nil, returning the self-relative security descriptor
+// result on the Go heap.
+func BuildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, accessEntries []EXPLICIT_ACCESS, auditEntries []EXPLICIT_ACCESS, mergedSecurityDescriptor *SECURITY_DESCRIPTOR) (sd *SECURITY_DESCRIPTOR, err error) {
+ var winHeapSD *SECURITY_DESCRIPTOR
+ var winHeapSDSize uint32
+ var firstAccessEntry *EXPLICIT_ACCESS
+ if len(accessEntries) > 0 {
+ firstAccessEntry = &accessEntries[0]
+ }
+ var firstAuditEntry *EXPLICIT_ACCESS
+ if len(auditEntries) > 0 {
+ firstAuditEntry = &auditEntries[0]
+ }
+ err = buildSecurityDescriptor(owner, group, uint32(len(accessEntries)), firstAccessEntry, uint32(len(auditEntries)), firstAuditEntry, mergedSecurityDescriptor, &winHeapSDSize, &winHeapSD)
+ if err != nil {
+ return
+ }
+ defer LocalFree(Handle(unsafe.Pointer(winHeapSD)))
+ return winHeapSD.copySelfRelativeSecurityDescriptor(), nil
+}
+
+// NewSecurityDescriptor creates and initializes a new absolute security descriptor.
+func NewSecurityDescriptor() (absoluteSD *SECURITY_DESCRIPTOR, err error) {
+ absoluteSD = &SECURITY_DESCRIPTOR{}
+ err = initializeSecurityDescriptor(absoluteSD, 1)
+ return
+}
+
+// ACLFromEntries returns a new ACL on the Go heap containing a list of explicit entries as well as those of another ACL.
+// Both explicitEntries and mergedACL are optional and can be nil.
+func ACLFromEntries(explicitEntries []EXPLICIT_ACCESS, mergedACL *ACL) (acl *ACL, err error) {
+ var firstExplicitEntry *EXPLICIT_ACCESS
+ if len(explicitEntries) > 0 {
+ firstExplicitEntry = &explicitEntries[0]
+ }
+ var winHeapACL *ACL
+ err = setEntriesInAcl(uint32(len(explicitEntries)), firstExplicitEntry, mergedACL, &winHeapACL)
+ if err != nil {
+ return
+ }
+ defer LocalFree(Handle(unsafe.Pointer(winHeapACL)))
+ aclBytes := make([]byte, winHeapACL.aclSize)
+ copy(aclBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(winHeapACL))[:len(aclBytes)])
+ return (*ACL)(unsafe.Pointer(&aclBytes[0])), nil
+}
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go
index b23050924f..fe8e42cff1 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -57,6 +57,10 @@ const (
FILE_VOLUME_IS_COMPRESSED = 0x00008000
FILE_VOLUME_QUOTAS = 0x00000020
+ // Flags for LockFileEx.
+ LOCKFILE_FAIL_IMMEDIATELY = 0x00000001
+ LOCKFILE_EXCLUSIVE_LOCK = 0x00000002
+
// Return values of SleepEx and other APC functions
STATUS_USER_APC = 0x000000C0
WAIT_IO_COMPLETION = STATUS_USER_APC
@@ -136,6 +140,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, err error) = LoadLibraryExW
//sys FreeLibrary(handle Handle) (err error)
//sys GetProcAddress(module Handle, procname string) (proc uintptr, err error)
+//sys GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) = kernel32.GetModuleFileNameW
+//sys GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) = kernel32.GetModuleHandleExW
//sys GetVersion() (ver uint32, err error)
//sys FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) = FormatMessageW
//sys ExitProcess(exitcode uint32)
@@ -160,6 +166,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys DeleteFile(path *uint16) (err error) = DeleteFileW
//sys MoveFile(from *uint16, to *uint16) (err error) = MoveFileW
//sys MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) = MoveFileExW
+//sys LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error)
+//sys UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error)
//sys GetComputerName(buf *uint16, n *uint32) (err error) = GetComputerNameW
//sys GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) = GetComputerNameExW
//sys SetEndOfFile(handle Handle) (err error)
@@ -173,13 +181,11 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys CancelIoEx(s Handle, o *Overlapped) (err error)
//sys CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) = CreateProcessW
//sys OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error)
-//sys ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) = shell32.ShellExecuteW
+//sys ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) [failretval<=32] = shell32.ShellExecuteW
//sys shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) = shell32.SHGetKnownFolderPath
//sys TerminateProcess(handle Handle, exitcode uint32) (err error)
//sys GetExitCodeProcess(handle Handle, exitcode *uint32) (err error)
//sys GetStartupInfo(startupInfo *StartupInfo) (err error) = GetStartupInfoW
-//sys GetCurrentProcess() (pseudoHandle Handle, err error)
-//sys GetCurrentThread() (pseudoHandle Handle, err error)
//sys GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error)
//sys DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error)
//sys WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) [failretval==0xffffffff]
@@ -257,6 +263,10 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys SetEvent(event Handle) (err error) = kernel32.SetEvent
//sys ResetEvent(event Handle) (err error) = kernel32.ResetEvent
//sys PulseEvent(event Handle) (err error) = kernel32.PulseEvent
+//sys CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) = kernel32.CreateMutexW
+//sys CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) = kernel32.CreateMutexExW
+//sys OpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) = kernel32.OpenMutexW
+//sys ReleaseMutex(mutex Handle) (err error) = kernel32.ReleaseMutex
//sys SleepEx(milliseconds uint32, alertable bool) (ret uint32) = kernel32.SleepEx
//sys CreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle, err error) = kernel32.CreateJobObjectW
//sys AssignProcessToJobObject(job Handle, process Handle) (err error) = kernel32.AssignProcessToJobObject
@@ -269,6 +279,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error)
//sys GetProcessId(process Handle) (id uint32, err error)
//sys OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error)
+//sys SetProcessPriorityBoost(process Handle, disable bool) (err error) = kernel32.SetProcessPriorityBoost
// Volume Management Functions
//sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW
@@ -279,6 +290,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) = FindNextVolumeMountPointW
//sys FindVolumeClose(findVolume Handle) (err error)
//sys FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error)
+//sys GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint64, totalNumberOfBytes *uint64, totalNumberOfFreeBytes *uint64) (err error) = GetDiskFreeSpaceExW
//sys GetDriveType(rootPathName *uint16) (driveType uint32) = GetDriveTypeW
//sys GetLogicalDrives() (drivesBitMask uint32, err error) [failretval==0]
//sys GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) [failretval==0] = GetLogicalDriveStringsW
@@ -291,14 +303,50 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) = SetVolumeLabelW
//sys SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) = SetVolumeMountPointW
//sys MessageBox(hwnd Handle, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW
+//sys ExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx
+//sys InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint32, forceAppsClosed bool, rebootAfterShutdown bool, reason uint32) (err error) = advapi32.InitiateSystemShutdownExW
+//sys SetProcessShutdownParameters(level uint32, flags uint32) (err error) = kernel32.SetProcessShutdownParameters
+//sys GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) = kernel32.GetProcessShutdownParameters
//sys clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) = ole32.CLSIDFromString
//sys stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) = ole32.StringFromGUID2
//sys coCreateGuid(pguid *GUID) (ret error) = ole32.CoCreateGuid
//sys CoTaskMemFree(address unsafe.Pointer) = ole32.CoTaskMemFree
//sys rtlGetVersion(info *OsVersionInfoEx) (ret error) = ntdll.RtlGetVersion
+//sys rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) = ntdll.RtlGetNtVersionNumbers
+
+// Process Status API (PSAPI)
+//sys EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
// syscall interface implementation for other packages
+// GetCurrentProcess returns the handle for the current process.
+// It is a pseudo handle that does not need to be closed.
+// The returned error is always nil.
+//
+// Deprecated: use CurrentProcess for the same Handle without the nil
+// error.
+func GetCurrentProcess() (Handle, error) {
+ return CurrentProcess(), nil
+}
+
+// CurrentProcess returns the handle for the current process.
+// It is a pseudo handle that does not need to be closed.
+func CurrentProcess() Handle { return Handle(^uintptr(1 - 1)) }
+
+// GetCurrentThread returns the handle for the current thread.
+// It is a pseudo handle that does not need to be closed.
+// The returned error is always nil.
+//
+// Deprecated: use CurrentThread for the same Handle without the nil
+// error.
+func GetCurrentThread() (Handle, error) {
+ return CurrentThread(), nil
+}
+
+// CurrentThread returns the handle for the current thread.
+// It is a pseudo handle that does not need to be closed.
+func CurrentThread() Handle { return Handle(^uintptr(2 - 1)) }
+
// GetProcAddressByOrdinal retrieves the address of the exported
// function from module by ordinal.
func GetProcAddressByOrdinal(module Handle, ordinal uintptr) (proc uintptr, err error) {
@@ -365,7 +413,11 @@ func Open(path string, mode int, perm uint32) (fd Handle, err error) {
default:
createmode = OPEN_EXISTING
}
- h, e := CreateFile(pathp, access, sharemode, sa, createmode, FILE_ATTRIBUTE_NORMAL, 0)
+ var attrs uint32 = FILE_ATTRIBUTE_NORMAL
+ if perm&S_IWRITE == 0 {
+ attrs = FILE_ATTRIBUTE_READONLY
+ }
+ h, e := CreateFile(pathp, access, sharemode, sa, createmode, attrs, 0)
return h, e
}
@@ -812,7 +864,7 @@ func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) {
for n < len(pp.Path) && pp.Path[n] != 0 {
n++
}
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
+ bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
sa.Name = string(bytes)
return sa, nil
@@ -1306,8 +1358,8 @@ func (t Token) KnownFolderPath(folderID *KNOWNFOLDERID, flags uint32) (string, e
return UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(p))[:]), nil
}
-// RtlGetVersion returns the true version of the underlying operating system, ignoring
-// any manifesting or compatibility layers on top of the win32 layer.
+// RtlGetVersion returns the version of the underlying operating system, ignoring
+// manifest semantics but is affected by the application compatibility layer.
func RtlGetVersion() *OsVersionInfoEx {
info := &OsVersionInfoEx{}
info.osVersionInfoSize = uint32(unsafe.Sizeof(*info))
@@ -1318,3 +1370,11 @@ func RtlGetVersion() *OsVersionInfoEx {
_ = rtlGetVersion(info)
return info
}
+
+// RtlGetNtVersionNumbers returns the version of the underlying operating system,
+// ignoring manifest semantics and the application compatibility layer.
+func RtlGetNtVersionNumbers() (majorVersion, minorVersion, buildNumber uint32) {
+ rtlGetNtVersionNumbers(&majorVersion, &minorVersion, &buildNumber)
+ buildNumber &= 0xffff
+ return
+}
diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go
index 1e3947f0f6..7f178bb91e 100644
--- a/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/vendor/golang.org/x/sys/windows/types_windows.go
@@ -62,11 +62,6 @@ var signals = [...]string{
}
const (
- GENERIC_READ = 0x80000000
- GENERIC_WRITE = 0x40000000
- GENERIC_EXECUTE = 0x20000000
- GENERIC_ALL = 0x10000000
-
FILE_LIST_DIRECTORY = 0x00000001
FILE_APPEND_DATA = 0x00000004
FILE_WRITE_ATTRIBUTES = 0x00000100
@@ -158,13 +153,6 @@ const (
WAIT_OBJECT_0 = 0x00000000
WAIT_FAILED = 0xFFFFFFFF
- // Standard access rights.
- DELETE = 0x00010000
- READ_CONTROL = 0x00020000
- SYNCHRONIZE = 0x00100000
- WRITE_DAC = 0x00040000
- WRITE_OWNER = 0x00080000
-
// Access rights for process.
PROCESS_CREATE_PROCESS = 0x0080
PROCESS_CREATE_THREAD = 0x0002
@@ -483,12 +471,6 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
return
}
-type SecurityAttributes struct {
- Length uint32
- SecurityDescriptor uintptr
- InheritHandle uint32
-}
-
type Overlapped struct {
Internal uintptr
InternalHigh uintptr
@@ -1190,6 +1172,28 @@ const (
REG_QWORD = REG_QWORD_LITTLE_ENDIAN
)
+const (
+ EVENT_MODIFY_STATE = 0x0002
+ EVENT_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3
+
+ MUTANT_QUERY_STATE = 0x0001
+ MUTANT_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | MUTANT_QUERY_STATE
+
+ SEMAPHORE_MODIFY_STATE = 0x0002
+ SEMAPHORE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3
+
+ TIMER_QUERY_STATE = 0x0001
+ TIMER_MODIFY_STATE = 0x0002
+ TIMER_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | TIMER_QUERY_STATE | TIMER_MODIFY_STATE
+
+ MUTEX_MODIFY_STATE = MUTANT_QUERY_STATE
+ MUTEX_ALL_ACCESS = MUTANT_ALL_ACCESS
+
+ CREATE_EVENT_MANUAL_RESET = 0x1
+ CREATE_EVENT_INITIAL_SET = 0x2
+ CREATE_MUTEX_INITIAL_OWNER = 0x1
+)
+
type AddrinfoW struct {
Flags int32
Family int32
@@ -1666,3 +1670,75 @@ type OsVersionInfoEx struct {
ProductType byte
_ byte
}
+
+const (
+ EWX_LOGOFF = 0x00000000
+ EWX_SHUTDOWN = 0x00000001
+ EWX_REBOOT = 0x00000002
+ EWX_FORCE = 0x00000004
+ EWX_POWEROFF = 0x00000008
+ EWX_FORCEIFHUNG = 0x00000010
+ EWX_QUICKRESOLVE = 0x00000020
+ EWX_RESTARTAPPS = 0x00000040
+ EWX_HYBRID_SHUTDOWN = 0x00400000
+ EWX_BOOTOPTIONS = 0x01000000
+
+ SHTDN_REASON_FLAG_COMMENT_REQUIRED = 0x01000000
+ SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED = 0x02000000
+ SHTDN_REASON_FLAG_CLEAN_UI = 0x04000000
+ SHTDN_REASON_FLAG_DIRTY_UI = 0x08000000
+ SHTDN_REASON_FLAG_USER_DEFINED = 0x40000000
+ SHTDN_REASON_FLAG_PLANNED = 0x80000000
+ SHTDN_REASON_MAJOR_OTHER = 0x00000000
+ SHTDN_REASON_MAJOR_NONE = 0x00000000
+ SHTDN_REASON_MAJOR_HARDWARE = 0x00010000
+ SHTDN_REASON_MAJOR_OPERATINGSYSTEM = 0x00020000
+ SHTDN_REASON_MAJOR_SOFTWARE = 0x00030000
+ SHTDN_REASON_MAJOR_APPLICATION = 0x00040000
+ SHTDN_REASON_MAJOR_SYSTEM = 0x00050000
+ SHTDN_REASON_MAJOR_POWER = 0x00060000
+ SHTDN_REASON_MAJOR_LEGACY_API = 0x00070000
+ SHTDN_REASON_MINOR_OTHER = 0x00000000
+ SHTDN_REASON_MINOR_NONE = 0x000000ff
+ SHTDN_REASON_MINOR_MAINTENANCE = 0x00000001
+ SHTDN_REASON_MINOR_INSTALLATION = 0x00000002
+ SHTDN_REASON_MINOR_UPGRADE = 0x00000003
+ SHTDN_REASON_MINOR_RECONFIG = 0x00000004
+ SHTDN_REASON_MINOR_HUNG = 0x00000005
+ SHTDN_REASON_MINOR_UNSTABLE = 0x00000006
+ SHTDN_REASON_MINOR_DISK = 0x00000007
+ SHTDN_REASON_MINOR_PROCESSOR = 0x00000008
+ SHTDN_REASON_MINOR_NETWORKCARD = 0x00000009
+ SHTDN_REASON_MINOR_POWER_SUPPLY = 0x0000000a
+ SHTDN_REASON_MINOR_CORDUNPLUGGED = 0x0000000b
+ SHTDN_REASON_MINOR_ENVIRONMENT = 0x0000000c
+ SHTDN_REASON_MINOR_HARDWARE_DRIVER = 0x0000000d
+ SHTDN_REASON_MINOR_OTHERDRIVER = 0x0000000e
+ SHTDN_REASON_MINOR_BLUESCREEN = 0x0000000F
+ SHTDN_REASON_MINOR_SERVICEPACK = 0x00000010
+ SHTDN_REASON_MINOR_HOTFIX = 0x00000011
+ SHTDN_REASON_MINOR_SECURITYFIX = 0x00000012
+ SHTDN_REASON_MINOR_SECURITY = 0x00000013
+ SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY = 0x00000014
+ SHTDN_REASON_MINOR_WMI = 0x00000015
+ SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL = 0x00000016
+ SHTDN_REASON_MINOR_HOTFIX_UNINSTALL = 0x00000017
+ SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL = 0x00000018
+ SHTDN_REASON_MINOR_MMC = 0x00000019
+ SHTDN_REASON_MINOR_SYSTEMRESTORE = 0x0000001a
+ SHTDN_REASON_MINOR_TERMSRV = 0x00000020
+ SHTDN_REASON_MINOR_DC_PROMOTION = 0x00000021
+ SHTDN_REASON_MINOR_DC_DEMOTION = 0x00000022
+ SHTDN_REASON_UNKNOWN = SHTDN_REASON_MINOR_NONE
+ SHTDN_REASON_LEGACY_API = SHTDN_REASON_MAJOR_LEGACY_API | SHTDN_REASON_FLAG_PLANNED
+ SHTDN_REASON_VALID_BIT_MASK = 0xc0ffffff
+
+ SHUTDOWN_NORETRY = 0x1
+)
+
+// Flags used for GetModuleHandleEx
+const (
+ GET_MODULE_HANDLE_EX_FLAG_PIN = 1
+ GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT = 2
+ GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS = 4
+)
diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index d461bed98a..6658ccd1b0 100644
--- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -44,6 +44,7 @@ var (
moduser32 = NewLazySystemDLL("user32.dll")
modole32 = NewLazySystemDLL("ole32.dll")
modntdll = NewLazySystemDLL("ntdll.dll")
+ modpsapi = NewLazySystemDLL("psapi.dll")
modws2_32 = NewLazySystemDLL("ws2_32.dll")
moddnsapi = NewLazySystemDLL("dnsapi.dll")
modiphlpapi = NewLazySystemDLL("iphlpapi.dll")
@@ -51,261 +52,302 @@ var (
modnetapi32 = NewLazySystemDLL("netapi32.dll")
modwtsapi32 = NewLazySystemDLL("wtsapi32.dll")
- procRegisterEventSourceW = modadvapi32.NewProc("RegisterEventSourceW")
- procDeregisterEventSource = modadvapi32.NewProc("DeregisterEventSource")
- procReportEventW = modadvapi32.NewProc("ReportEventW")
- procOpenSCManagerW = modadvapi32.NewProc("OpenSCManagerW")
- procCloseServiceHandle = modadvapi32.NewProc("CloseServiceHandle")
- procCreateServiceW = modadvapi32.NewProc("CreateServiceW")
- procOpenServiceW = modadvapi32.NewProc("OpenServiceW")
- procDeleteService = modadvapi32.NewProc("DeleteService")
- procStartServiceW = modadvapi32.NewProc("StartServiceW")
- procQueryServiceStatus = modadvapi32.NewProc("QueryServiceStatus")
- procQueryServiceLockStatusW = modadvapi32.NewProc("QueryServiceLockStatusW")
- procControlService = modadvapi32.NewProc("ControlService")
- procStartServiceCtrlDispatcherW = modadvapi32.NewProc("StartServiceCtrlDispatcherW")
- procSetServiceStatus = modadvapi32.NewProc("SetServiceStatus")
- procChangeServiceConfigW = modadvapi32.NewProc("ChangeServiceConfigW")
- procQueryServiceConfigW = modadvapi32.NewProc("QueryServiceConfigW")
- procChangeServiceConfig2W = modadvapi32.NewProc("ChangeServiceConfig2W")
- procQueryServiceConfig2W = modadvapi32.NewProc("QueryServiceConfig2W")
- procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW")
- procQueryServiceStatusEx = modadvapi32.NewProc("QueryServiceStatusEx")
- procNotifyServiceStatusChangeW = modadvapi32.NewProc("NotifyServiceStatusChangeW")
- procGetLastError = modkernel32.NewProc("GetLastError")
- procLoadLibraryW = modkernel32.NewProc("LoadLibraryW")
- procLoadLibraryExW = modkernel32.NewProc("LoadLibraryExW")
- procFreeLibrary = modkernel32.NewProc("FreeLibrary")
- procGetProcAddress = modkernel32.NewProc("GetProcAddress")
- procGetVersion = modkernel32.NewProc("GetVersion")
- procFormatMessageW = modkernel32.NewProc("FormatMessageW")
- procExitProcess = modkernel32.NewProc("ExitProcess")
- procIsWow64Process = modkernel32.NewProc("IsWow64Process")
- procCreateFileW = modkernel32.NewProc("CreateFileW")
- procReadFile = modkernel32.NewProc("ReadFile")
- procWriteFile = modkernel32.NewProc("WriteFile")
- procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult")
- procSetFilePointer = modkernel32.NewProc("SetFilePointer")
- procCloseHandle = modkernel32.NewProc("CloseHandle")
- procGetStdHandle = modkernel32.NewProc("GetStdHandle")
- procSetStdHandle = modkernel32.NewProc("SetStdHandle")
- procFindFirstFileW = modkernel32.NewProc("FindFirstFileW")
- procFindNextFileW = modkernel32.NewProc("FindNextFileW")
- procFindClose = modkernel32.NewProc("FindClose")
- procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle")
- procGetFileInformationByHandleEx = modkernel32.NewProc("GetFileInformationByHandleEx")
- procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW")
- procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW")
- procCreateDirectoryW = modkernel32.NewProc("CreateDirectoryW")
- procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW")
- procDeleteFileW = modkernel32.NewProc("DeleteFileW")
- procMoveFileW = modkernel32.NewProc("MoveFileW")
- procMoveFileExW = modkernel32.NewProc("MoveFileExW")
- procGetComputerNameW = modkernel32.NewProc("GetComputerNameW")
- procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW")
- procSetEndOfFile = modkernel32.NewProc("SetEndOfFile")
- procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTimeAsFileTime")
- procGetSystemTimePreciseAsFileTime = modkernel32.NewProc("GetSystemTimePreciseAsFileTime")
- procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneInformation")
- procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
- procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus")
- procPostQueuedCompletionStatus = modkernel32.NewProc("PostQueuedCompletionStatus")
- procCancelIo = modkernel32.NewProc("CancelIo")
- procCancelIoEx = modkernel32.NewProc("CancelIoEx")
- procCreateProcessW = modkernel32.NewProc("CreateProcessW")
- procOpenProcess = modkernel32.NewProc("OpenProcess")
- procShellExecuteW = modshell32.NewProc("ShellExecuteW")
- procSHGetKnownFolderPath = modshell32.NewProc("SHGetKnownFolderPath")
- procTerminateProcess = modkernel32.NewProc("TerminateProcess")
- procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeProcess")
- procGetStartupInfoW = modkernel32.NewProc("GetStartupInfoW")
- procGetCurrentProcess = modkernel32.NewProc("GetCurrentProcess")
- procGetCurrentThread = modkernel32.NewProc("GetCurrentThread")
- procGetProcessTimes = modkernel32.NewProc("GetProcessTimes")
- procDuplicateHandle = modkernel32.NewProc("DuplicateHandle")
- procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject")
- procWaitForMultipleObjects = modkernel32.NewProc("WaitForMultipleObjects")
- procGetTempPathW = modkernel32.NewProc("GetTempPathW")
- procCreatePipe = modkernel32.NewProc("CreatePipe")
- procGetFileType = modkernel32.NewProc("GetFileType")
- procCryptAcquireContextW = modadvapi32.NewProc("CryptAcquireContextW")
- procCryptReleaseContext = modadvapi32.NewProc("CryptReleaseContext")
- procCryptGenRandom = modadvapi32.NewProc("CryptGenRandom")
- procGetEnvironmentStringsW = modkernel32.NewProc("GetEnvironmentStringsW")
- procFreeEnvironmentStringsW = modkernel32.NewProc("FreeEnvironmentStringsW")
- procGetEnvironmentVariableW = modkernel32.NewProc("GetEnvironmentVariableW")
- procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW")
- procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock")
- procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock")
- procGetTickCount64 = modkernel32.NewProc("GetTickCount64")
- procSetFileTime = modkernel32.NewProc("SetFileTime")
- procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW")
- procSetFileAttributesW = modkernel32.NewProc("SetFileAttributesW")
- procGetFileAttributesExW = modkernel32.NewProc("GetFileAttributesExW")
- procGetCommandLineW = modkernel32.NewProc("GetCommandLineW")
- procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW")
- procLocalFree = modkernel32.NewProc("LocalFree")
- procSetHandleInformation = modkernel32.NewProc("SetHandleInformation")
- procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers")
- procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW")
- procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW")
- procGetShortPathNameW = modkernel32.NewProc("GetShortPathNameW")
- procCreateFileMappingW = modkernel32.NewProc("CreateFileMappingW")
- procMapViewOfFile = modkernel32.NewProc("MapViewOfFile")
- procUnmapViewOfFile = modkernel32.NewProc("UnmapViewOfFile")
- procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile")
- procVirtualLock = modkernel32.NewProc("VirtualLock")
- procVirtualUnlock = modkernel32.NewProc("VirtualUnlock")
- procVirtualAlloc = modkernel32.NewProc("VirtualAlloc")
- procVirtualFree = modkernel32.NewProc("VirtualFree")
- procVirtualProtect = modkernel32.NewProc("VirtualProtect")
- procTransmitFile = modmswsock.NewProc("TransmitFile")
- procReadDirectoryChangesW = modkernel32.NewProc("ReadDirectoryChangesW")
- procCertOpenSystemStoreW = modcrypt32.NewProc("CertOpenSystemStoreW")
- procCertOpenStore = modcrypt32.NewProc("CertOpenStore")
- procCertEnumCertificatesInStore = modcrypt32.NewProc("CertEnumCertificatesInStore")
- procCertAddCertificateContextToStore = modcrypt32.NewProc("CertAddCertificateContextToStore")
- procCertCloseStore = modcrypt32.NewProc("CertCloseStore")
- procCertGetCertificateChain = modcrypt32.NewProc("CertGetCertificateChain")
- procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCertificateChain")
- procCertCreateCertificateContext = modcrypt32.NewProc("CertCreateCertificateContext")
- procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCertificateContext")
- procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCertificateChainPolicy")
- procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyExW")
- procRegCloseKey = modadvapi32.NewProc("RegCloseKey")
- procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfoKeyW")
- procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyExW")
- procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW")
- procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId")
- procGetConsoleMode = modkernel32.NewProc("GetConsoleMode")
- procSetConsoleMode = modkernel32.NewProc("SetConsoleMode")
- procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo")
- procWriteConsoleW = modkernel32.NewProc("WriteConsoleW")
- procReadConsoleW = modkernel32.NewProc("ReadConsoleW")
- procCreateToolhelp32Snapshot = modkernel32.NewProc("CreateToolhelp32Snapshot")
- procProcess32FirstW = modkernel32.NewProc("Process32FirstW")
- procProcess32NextW = modkernel32.NewProc("Process32NextW")
- procThread32First = modkernel32.NewProc("Thread32First")
- procThread32Next = modkernel32.NewProc("Thread32Next")
- procDeviceIoControl = modkernel32.NewProc("DeviceIoControl")
- procCreateSymbolicLinkW = modkernel32.NewProc("CreateSymbolicLinkW")
- procCreateHardLinkW = modkernel32.NewProc("CreateHardLinkW")
- procGetCurrentThreadId = modkernel32.NewProc("GetCurrentThreadId")
- procCreateEventW = modkernel32.NewProc("CreateEventW")
- procCreateEventExW = modkernel32.NewProc("CreateEventExW")
- procOpenEventW = modkernel32.NewProc("OpenEventW")
- procSetEvent = modkernel32.NewProc("SetEvent")
- procResetEvent = modkernel32.NewProc("ResetEvent")
- procPulseEvent = modkernel32.NewProc("PulseEvent")
- procSleepEx = modkernel32.NewProc("SleepEx")
- procCreateJobObjectW = modkernel32.NewProc("CreateJobObjectW")
- procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject")
- procTerminateJobObject = modkernel32.NewProc("TerminateJobObject")
- procSetErrorMode = modkernel32.NewProc("SetErrorMode")
- procResumeThread = modkernel32.NewProc("ResumeThread")
- procSetPriorityClass = modkernel32.NewProc("SetPriorityClass")
- procGetPriorityClass = modkernel32.NewProc("GetPriorityClass")
- procSetInformationJobObject = modkernel32.NewProc("SetInformationJobObject")
- procGenerateConsoleCtrlEvent = modkernel32.NewProc("GenerateConsoleCtrlEvent")
- procGetProcessId = modkernel32.NewProc("GetProcessId")
- procOpenThread = modkernel32.NewProc("OpenThread")
- procDefineDosDeviceW = modkernel32.NewProc("DefineDosDeviceW")
- procDeleteVolumeMountPointW = modkernel32.NewProc("DeleteVolumeMountPointW")
- procFindFirstVolumeW = modkernel32.NewProc("FindFirstVolumeW")
- procFindFirstVolumeMountPointW = modkernel32.NewProc("FindFirstVolumeMountPointW")
- procFindNextVolumeW = modkernel32.NewProc("FindNextVolumeW")
- procFindNextVolumeMountPointW = modkernel32.NewProc("FindNextVolumeMountPointW")
- procFindVolumeClose = modkernel32.NewProc("FindVolumeClose")
- procFindVolumeMountPointClose = modkernel32.NewProc("FindVolumeMountPointClose")
- procGetDriveTypeW = modkernel32.NewProc("GetDriveTypeW")
- procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives")
- procGetLogicalDriveStringsW = modkernel32.NewProc("GetLogicalDriveStringsW")
- procGetVolumeInformationW = modkernel32.NewProc("GetVolumeInformationW")
- procGetVolumeInformationByHandleW = modkernel32.NewProc("GetVolumeInformationByHandleW")
- procGetVolumeNameForVolumeMountPointW = modkernel32.NewProc("GetVolumeNameForVolumeMountPointW")
- procGetVolumePathNameW = modkernel32.NewProc("GetVolumePathNameW")
- procGetVolumePathNamesForVolumeNameW = modkernel32.NewProc("GetVolumePathNamesForVolumeNameW")
- procQueryDosDeviceW = modkernel32.NewProc("QueryDosDeviceW")
- procSetVolumeLabelW = modkernel32.NewProc("SetVolumeLabelW")
- procSetVolumeMountPointW = modkernel32.NewProc("SetVolumeMountPointW")
- procMessageBoxW = moduser32.NewProc("MessageBoxW")
- procCLSIDFromString = modole32.NewProc("CLSIDFromString")
- procStringFromGUID2 = modole32.NewProc("StringFromGUID2")
- procCoCreateGuid = modole32.NewProc("CoCreateGuid")
- procCoTaskMemFree = modole32.NewProc("CoTaskMemFree")
- procRtlGetVersion = modntdll.NewProc("RtlGetVersion")
- procWSAStartup = modws2_32.NewProc("WSAStartup")
- procWSACleanup = modws2_32.NewProc("WSACleanup")
- procWSAIoctl = modws2_32.NewProc("WSAIoctl")
- procsocket = modws2_32.NewProc("socket")
- procsetsockopt = modws2_32.NewProc("setsockopt")
- procgetsockopt = modws2_32.NewProc("getsockopt")
- procbind = modws2_32.NewProc("bind")
- procconnect = modws2_32.NewProc("connect")
- procgetsockname = modws2_32.NewProc("getsockname")
- procgetpeername = modws2_32.NewProc("getpeername")
- proclisten = modws2_32.NewProc("listen")
- procshutdown = modws2_32.NewProc("shutdown")
- procclosesocket = modws2_32.NewProc("closesocket")
- procAcceptEx = modmswsock.NewProc("AcceptEx")
- procGetAcceptExSockaddrs = modmswsock.NewProc("GetAcceptExSockaddrs")
- procWSARecv = modws2_32.NewProc("WSARecv")
- procWSASend = modws2_32.NewProc("WSASend")
- procWSARecvFrom = modws2_32.NewProc("WSARecvFrom")
- procWSASendTo = modws2_32.NewProc("WSASendTo")
- procgethostbyname = modws2_32.NewProc("gethostbyname")
- procgetservbyname = modws2_32.NewProc("getservbyname")
- procntohs = modws2_32.NewProc("ntohs")
- procgetprotobyname = modws2_32.NewProc("getprotobyname")
- procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
- procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
- procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W")
- procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW")
- procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW")
- procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
- procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
- procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes")
- procWSAEnumProtocolsW = modws2_32.NewProc("WSAEnumProtocolsW")
- procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
- procGetACP = modkernel32.NewProc("GetACP")
- procMultiByteToWideChar = modkernel32.NewProc("MultiByteToWideChar")
- procTranslateNameW = modsecur32.NewProc("TranslateNameW")
- procGetUserNameExW = modsecur32.NewProc("GetUserNameExW")
- procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo")
- procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation")
- procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree")
- procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW")
- procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW")
- procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW")
- procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW")
- procGetLengthSid = modadvapi32.NewProc("GetLengthSid")
- procCopySid = modadvapi32.NewProc("CopySid")
- procAllocateAndInitializeSid = modadvapi32.NewProc("AllocateAndInitializeSid")
- procCreateWellKnownSid = modadvapi32.NewProc("CreateWellKnownSid")
- procIsWellKnownSid = modadvapi32.NewProc("IsWellKnownSid")
- procFreeSid = modadvapi32.NewProc("FreeSid")
- procEqualSid = modadvapi32.NewProc("EqualSid")
- procGetSidIdentifierAuthority = modadvapi32.NewProc("GetSidIdentifierAuthority")
- procGetSidSubAuthorityCount = modadvapi32.NewProc("GetSidSubAuthorityCount")
- procGetSidSubAuthority = modadvapi32.NewProc("GetSidSubAuthority")
- procIsValidSid = modadvapi32.NewProc("IsValidSid")
- procCheckTokenMembership = modadvapi32.NewProc("CheckTokenMembership")
- procOpenProcessToken = modadvapi32.NewProc("OpenProcessToken")
- procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken")
- procImpersonateSelf = modadvapi32.NewProc("ImpersonateSelf")
- procRevertToSelf = modadvapi32.NewProc("RevertToSelf")
- procSetThreadToken = modadvapi32.NewProc("SetThreadToken")
- procLookupPrivilegeValueW = modadvapi32.NewProc("LookupPrivilegeValueW")
- procAdjustTokenPrivileges = modadvapi32.NewProc("AdjustTokenPrivileges")
- procAdjustTokenGroups = modadvapi32.NewProc("AdjustTokenGroups")
- procGetTokenInformation = modadvapi32.NewProc("GetTokenInformation")
- procSetTokenInformation = modadvapi32.NewProc("SetTokenInformation")
- procDuplicateTokenEx = modadvapi32.NewProc("DuplicateTokenEx")
- procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW")
- procGetSystemDirectoryW = modkernel32.NewProc("GetSystemDirectoryW")
- procWTSQueryUserToken = modwtsapi32.NewProc("WTSQueryUserToken")
- procWTSEnumerateSessionsW = modwtsapi32.NewProc("WTSEnumerateSessionsW")
- procWTSFreeMemory = modwtsapi32.NewProc("WTSFreeMemory")
+ procRegisterEventSourceW = modadvapi32.NewProc("RegisterEventSourceW")
+ procDeregisterEventSource = modadvapi32.NewProc("DeregisterEventSource")
+ procReportEventW = modadvapi32.NewProc("ReportEventW")
+ procOpenSCManagerW = modadvapi32.NewProc("OpenSCManagerW")
+ procCloseServiceHandle = modadvapi32.NewProc("CloseServiceHandle")
+ procCreateServiceW = modadvapi32.NewProc("CreateServiceW")
+ procOpenServiceW = modadvapi32.NewProc("OpenServiceW")
+ procDeleteService = modadvapi32.NewProc("DeleteService")
+ procStartServiceW = modadvapi32.NewProc("StartServiceW")
+ procQueryServiceStatus = modadvapi32.NewProc("QueryServiceStatus")
+ procQueryServiceLockStatusW = modadvapi32.NewProc("QueryServiceLockStatusW")
+ procControlService = modadvapi32.NewProc("ControlService")
+ procStartServiceCtrlDispatcherW = modadvapi32.NewProc("StartServiceCtrlDispatcherW")
+ procSetServiceStatus = modadvapi32.NewProc("SetServiceStatus")
+ procChangeServiceConfigW = modadvapi32.NewProc("ChangeServiceConfigW")
+ procQueryServiceConfigW = modadvapi32.NewProc("QueryServiceConfigW")
+ procChangeServiceConfig2W = modadvapi32.NewProc("ChangeServiceConfig2W")
+ procQueryServiceConfig2W = modadvapi32.NewProc("QueryServiceConfig2W")
+ procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW")
+ procQueryServiceStatusEx = modadvapi32.NewProc("QueryServiceStatusEx")
+ procNotifyServiceStatusChangeW = modadvapi32.NewProc("NotifyServiceStatusChangeW")
+ procGetLastError = modkernel32.NewProc("GetLastError")
+ procLoadLibraryW = modkernel32.NewProc("LoadLibraryW")
+ procLoadLibraryExW = modkernel32.NewProc("LoadLibraryExW")
+ procFreeLibrary = modkernel32.NewProc("FreeLibrary")
+ procGetProcAddress = modkernel32.NewProc("GetProcAddress")
+ procGetModuleFileNameW = modkernel32.NewProc("GetModuleFileNameW")
+ procGetModuleHandleExW = modkernel32.NewProc("GetModuleHandleExW")
+ procGetVersion = modkernel32.NewProc("GetVersion")
+ procFormatMessageW = modkernel32.NewProc("FormatMessageW")
+ procExitProcess = modkernel32.NewProc("ExitProcess")
+ procIsWow64Process = modkernel32.NewProc("IsWow64Process")
+ procCreateFileW = modkernel32.NewProc("CreateFileW")
+ procReadFile = modkernel32.NewProc("ReadFile")
+ procWriteFile = modkernel32.NewProc("WriteFile")
+ procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult")
+ procSetFilePointer = modkernel32.NewProc("SetFilePointer")
+ procCloseHandle = modkernel32.NewProc("CloseHandle")
+ procGetStdHandle = modkernel32.NewProc("GetStdHandle")
+ procSetStdHandle = modkernel32.NewProc("SetStdHandle")
+ procFindFirstFileW = modkernel32.NewProc("FindFirstFileW")
+ procFindNextFileW = modkernel32.NewProc("FindNextFileW")
+ procFindClose = modkernel32.NewProc("FindClose")
+ procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle")
+ procGetFileInformationByHandleEx = modkernel32.NewProc("GetFileInformationByHandleEx")
+ procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW")
+ procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW")
+ procCreateDirectoryW = modkernel32.NewProc("CreateDirectoryW")
+ procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW")
+ procDeleteFileW = modkernel32.NewProc("DeleteFileW")
+ procMoveFileW = modkernel32.NewProc("MoveFileW")
+ procMoveFileExW = modkernel32.NewProc("MoveFileExW")
+ procLockFileEx = modkernel32.NewProc("LockFileEx")
+ procUnlockFileEx = modkernel32.NewProc("UnlockFileEx")
+ procGetComputerNameW = modkernel32.NewProc("GetComputerNameW")
+ procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW")
+ procSetEndOfFile = modkernel32.NewProc("SetEndOfFile")
+ procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTimeAsFileTime")
+ procGetSystemTimePreciseAsFileTime = modkernel32.NewProc("GetSystemTimePreciseAsFileTime")
+ procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneInformation")
+ procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
+ procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus")
+ procPostQueuedCompletionStatus = modkernel32.NewProc("PostQueuedCompletionStatus")
+ procCancelIo = modkernel32.NewProc("CancelIo")
+ procCancelIoEx = modkernel32.NewProc("CancelIoEx")
+ procCreateProcessW = modkernel32.NewProc("CreateProcessW")
+ procOpenProcess = modkernel32.NewProc("OpenProcess")
+ procShellExecuteW = modshell32.NewProc("ShellExecuteW")
+ procSHGetKnownFolderPath = modshell32.NewProc("SHGetKnownFolderPath")
+ procTerminateProcess = modkernel32.NewProc("TerminateProcess")
+ procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeProcess")
+ procGetStartupInfoW = modkernel32.NewProc("GetStartupInfoW")
+ procGetProcessTimes = modkernel32.NewProc("GetProcessTimes")
+ procDuplicateHandle = modkernel32.NewProc("DuplicateHandle")
+ procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject")
+ procWaitForMultipleObjects = modkernel32.NewProc("WaitForMultipleObjects")
+ procGetTempPathW = modkernel32.NewProc("GetTempPathW")
+ procCreatePipe = modkernel32.NewProc("CreatePipe")
+ procGetFileType = modkernel32.NewProc("GetFileType")
+ procCryptAcquireContextW = modadvapi32.NewProc("CryptAcquireContextW")
+ procCryptReleaseContext = modadvapi32.NewProc("CryptReleaseContext")
+ procCryptGenRandom = modadvapi32.NewProc("CryptGenRandom")
+ procGetEnvironmentStringsW = modkernel32.NewProc("GetEnvironmentStringsW")
+ procFreeEnvironmentStringsW = modkernel32.NewProc("FreeEnvironmentStringsW")
+ procGetEnvironmentVariableW = modkernel32.NewProc("GetEnvironmentVariableW")
+ procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW")
+ procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock")
+ procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock")
+ procGetTickCount64 = modkernel32.NewProc("GetTickCount64")
+ procSetFileTime = modkernel32.NewProc("SetFileTime")
+ procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW")
+ procSetFileAttributesW = modkernel32.NewProc("SetFileAttributesW")
+ procGetFileAttributesExW = modkernel32.NewProc("GetFileAttributesExW")
+ procGetCommandLineW = modkernel32.NewProc("GetCommandLineW")
+ procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW")
+ procLocalFree = modkernel32.NewProc("LocalFree")
+ procSetHandleInformation = modkernel32.NewProc("SetHandleInformation")
+ procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers")
+ procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW")
+ procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW")
+ procGetShortPathNameW = modkernel32.NewProc("GetShortPathNameW")
+ procCreateFileMappingW = modkernel32.NewProc("CreateFileMappingW")
+ procMapViewOfFile = modkernel32.NewProc("MapViewOfFile")
+ procUnmapViewOfFile = modkernel32.NewProc("UnmapViewOfFile")
+ procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile")
+ procVirtualLock = modkernel32.NewProc("VirtualLock")
+ procVirtualUnlock = modkernel32.NewProc("VirtualUnlock")
+ procVirtualAlloc = modkernel32.NewProc("VirtualAlloc")
+ procVirtualFree = modkernel32.NewProc("VirtualFree")
+ procVirtualProtect = modkernel32.NewProc("VirtualProtect")
+ procTransmitFile = modmswsock.NewProc("TransmitFile")
+ procReadDirectoryChangesW = modkernel32.NewProc("ReadDirectoryChangesW")
+ procCertOpenSystemStoreW = modcrypt32.NewProc("CertOpenSystemStoreW")
+ procCertOpenStore = modcrypt32.NewProc("CertOpenStore")
+ procCertEnumCertificatesInStore = modcrypt32.NewProc("CertEnumCertificatesInStore")
+ procCertAddCertificateContextToStore = modcrypt32.NewProc("CertAddCertificateContextToStore")
+ procCertCloseStore = modcrypt32.NewProc("CertCloseStore")
+ procCertGetCertificateChain = modcrypt32.NewProc("CertGetCertificateChain")
+ procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCertificateChain")
+ procCertCreateCertificateContext = modcrypt32.NewProc("CertCreateCertificateContext")
+ procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCertificateContext")
+ procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCertificateChainPolicy")
+ procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyExW")
+ procRegCloseKey = modadvapi32.NewProc("RegCloseKey")
+ procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfoKeyW")
+ procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyExW")
+ procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW")
+ procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId")
+ procGetConsoleMode = modkernel32.NewProc("GetConsoleMode")
+ procSetConsoleMode = modkernel32.NewProc("SetConsoleMode")
+ procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo")
+ procWriteConsoleW = modkernel32.NewProc("WriteConsoleW")
+ procReadConsoleW = modkernel32.NewProc("ReadConsoleW")
+ procCreateToolhelp32Snapshot = modkernel32.NewProc("CreateToolhelp32Snapshot")
+ procProcess32FirstW = modkernel32.NewProc("Process32FirstW")
+ procProcess32NextW = modkernel32.NewProc("Process32NextW")
+ procThread32First = modkernel32.NewProc("Thread32First")
+ procThread32Next = modkernel32.NewProc("Thread32Next")
+ procDeviceIoControl = modkernel32.NewProc("DeviceIoControl")
+ procCreateSymbolicLinkW = modkernel32.NewProc("CreateSymbolicLinkW")
+ procCreateHardLinkW = modkernel32.NewProc("CreateHardLinkW")
+ procGetCurrentThreadId = modkernel32.NewProc("GetCurrentThreadId")
+ procCreateEventW = modkernel32.NewProc("CreateEventW")
+ procCreateEventExW = modkernel32.NewProc("CreateEventExW")
+ procOpenEventW = modkernel32.NewProc("OpenEventW")
+ procSetEvent = modkernel32.NewProc("SetEvent")
+ procResetEvent = modkernel32.NewProc("ResetEvent")
+ procPulseEvent = modkernel32.NewProc("PulseEvent")
+ procCreateMutexW = modkernel32.NewProc("CreateMutexW")
+ procCreateMutexExW = modkernel32.NewProc("CreateMutexExW")
+ procOpenMutexW = modkernel32.NewProc("OpenMutexW")
+ procReleaseMutex = modkernel32.NewProc("ReleaseMutex")
+ procSleepEx = modkernel32.NewProc("SleepEx")
+ procCreateJobObjectW = modkernel32.NewProc("CreateJobObjectW")
+ procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject")
+ procTerminateJobObject = modkernel32.NewProc("TerminateJobObject")
+ procSetErrorMode = modkernel32.NewProc("SetErrorMode")
+ procResumeThread = modkernel32.NewProc("ResumeThread")
+ procSetPriorityClass = modkernel32.NewProc("SetPriorityClass")
+ procGetPriorityClass = modkernel32.NewProc("GetPriorityClass")
+ procSetInformationJobObject = modkernel32.NewProc("SetInformationJobObject")
+ procGenerateConsoleCtrlEvent = modkernel32.NewProc("GenerateConsoleCtrlEvent")
+ procGetProcessId = modkernel32.NewProc("GetProcessId")
+ procOpenThread = modkernel32.NewProc("OpenThread")
+ procSetProcessPriorityBoost = modkernel32.NewProc("SetProcessPriorityBoost")
+ procDefineDosDeviceW = modkernel32.NewProc("DefineDosDeviceW")
+ procDeleteVolumeMountPointW = modkernel32.NewProc("DeleteVolumeMountPointW")
+ procFindFirstVolumeW = modkernel32.NewProc("FindFirstVolumeW")
+ procFindFirstVolumeMountPointW = modkernel32.NewProc("FindFirstVolumeMountPointW")
+ procFindNextVolumeW = modkernel32.NewProc("FindNextVolumeW")
+ procFindNextVolumeMountPointW = modkernel32.NewProc("FindNextVolumeMountPointW")
+ procFindVolumeClose = modkernel32.NewProc("FindVolumeClose")
+ procFindVolumeMountPointClose = modkernel32.NewProc("FindVolumeMountPointClose")
+ procGetDiskFreeSpaceExW = modkernel32.NewProc("GetDiskFreeSpaceExW")
+ procGetDriveTypeW = modkernel32.NewProc("GetDriveTypeW")
+ procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives")
+ procGetLogicalDriveStringsW = modkernel32.NewProc("GetLogicalDriveStringsW")
+ procGetVolumeInformationW = modkernel32.NewProc("GetVolumeInformationW")
+ procGetVolumeInformationByHandleW = modkernel32.NewProc("GetVolumeInformationByHandleW")
+ procGetVolumeNameForVolumeMountPointW = modkernel32.NewProc("GetVolumeNameForVolumeMountPointW")
+ procGetVolumePathNameW = modkernel32.NewProc("GetVolumePathNameW")
+ procGetVolumePathNamesForVolumeNameW = modkernel32.NewProc("GetVolumePathNamesForVolumeNameW")
+ procQueryDosDeviceW = modkernel32.NewProc("QueryDosDeviceW")
+ procSetVolumeLabelW = modkernel32.NewProc("SetVolumeLabelW")
+ procSetVolumeMountPointW = modkernel32.NewProc("SetVolumeMountPointW")
+ procMessageBoxW = moduser32.NewProc("MessageBoxW")
+ procExitWindowsEx = moduser32.NewProc("ExitWindowsEx")
+ procInitiateSystemShutdownExW = modadvapi32.NewProc("InitiateSystemShutdownExW")
+ procSetProcessShutdownParameters = modkernel32.NewProc("SetProcessShutdownParameters")
+ procGetProcessShutdownParameters = modkernel32.NewProc("GetProcessShutdownParameters")
+ procCLSIDFromString = modole32.NewProc("CLSIDFromString")
+ procStringFromGUID2 = modole32.NewProc("StringFromGUID2")
+ procCoCreateGuid = modole32.NewProc("CoCreateGuid")
+ procCoTaskMemFree = modole32.NewProc("CoTaskMemFree")
+ procRtlGetVersion = modntdll.NewProc("RtlGetVersion")
+ procRtlGetNtVersionNumbers = modntdll.NewProc("RtlGetNtVersionNumbers")
+ procEnumProcesses = modpsapi.NewProc("EnumProcesses")
+ procWSAStartup = modws2_32.NewProc("WSAStartup")
+ procWSACleanup = modws2_32.NewProc("WSACleanup")
+ procWSAIoctl = modws2_32.NewProc("WSAIoctl")
+ procsocket = modws2_32.NewProc("socket")
+ procsetsockopt = modws2_32.NewProc("setsockopt")
+ procgetsockopt = modws2_32.NewProc("getsockopt")
+ procbind = modws2_32.NewProc("bind")
+ procconnect = modws2_32.NewProc("connect")
+ procgetsockname = modws2_32.NewProc("getsockname")
+ procgetpeername = modws2_32.NewProc("getpeername")
+ proclisten = modws2_32.NewProc("listen")
+ procshutdown = modws2_32.NewProc("shutdown")
+ procclosesocket = modws2_32.NewProc("closesocket")
+ procAcceptEx = modmswsock.NewProc("AcceptEx")
+ procGetAcceptExSockaddrs = modmswsock.NewProc("GetAcceptExSockaddrs")
+ procWSARecv = modws2_32.NewProc("WSARecv")
+ procWSASend = modws2_32.NewProc("WSASend")
+ procWSARecvFrom = modws2_32.NewProc("WSARecvFrom")
+ procWSASendTo = modws2_32.NewProc("WSASendTo")
+ procgethostbyname = modws2_32.NewProc("gethostbyname")
+ procgetservbyname = modws2_32.NewProc("getservbyname")
+ procntohs = modws2_32.NewProc("ntohs")
+ procgetprotobyname = modws2_32.NewProc("getprotobyname")
+ procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
+ procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
+ procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W")
+ procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW")
+ procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW")
+ procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
+ procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
+ procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes")
+ procWSAEnumProtocolsW = modws2_32.NewProc("WSAEnumProtocolsW")
+ procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
+ procGetACP = modkernel32.NewProc("GetACP")
+ procMultiByteToWideChar = modkernel32.NewProc("MultiByteToWideChar")
+ procTranslateNameW = modsecur32.NewProc("TranslateNameW")
+ procGetUserNameExW = modsecur32.NewProc("GetUserNameExW")
+ procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo")
+ procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation")
+ procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree")
+ procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW")
+ procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW")
+ procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW")
+ procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW")
+ procGetLengthSid = modadvapi32.NewProc("GetLengthSid")
+ procCopySid = modadvapi32.NewProc("CopySid")
+ procAllocateAndInitializeSid = modadvapi32.NewProc("AllocateAndInitializeSid")
+ procCreateWellKnownSid = modadvapi32.NewProc("CreateWellKnownSid")
+ procIsWellKnownSid = modadvapi32.NewProc("IsWellKnownSid")
+ procFreeSid = modadvapi32.NewProc("FreeSid")
+ procEqualSid = modadvapi32.NewProc("EqualSid")
+ procGetSidIdentifierAuthority = modadvapi32.NewProc("GetSidIdentifierAuthority")
+ procGetSidSubAuthorityCount = modadvapi32.NewProc("GetSidSubAuthorityCount")
+ procGetSidSubAuthority = modadvapi32.NewProc("GetSidSubAuthority")
+ procIsValidSid = modadvapi32.NewProc("IsValidSid")
+ procCheckTokenMembership = modadvapi32.NewProc("CheckTokenMembership")
+ procOpenProcessToken = modadvapi32.NewProc("OpenProcessToken")
+ procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken")
+ procImpersonateSelf = modadvapi32.NewProc("ImpersonateSelf")
+ procRevertToSelf = modadvapi32.NewProc("RevertToSelf")
+ procSetThreadToken = modadvapi32.NewProc("SetThreadToken")
+ procLookupPrivilegeValueW = modadvapi32.NewProc("LookupPrivilegeValueW")
+ procAdjustTokenPrivileges = modadvapi32.NewProc("AdjustTokenPrivileges")
+ procAdjustTokenGroups = modadvapi32.NewProc("AdjustTokenGroups")
+ procGetTokenInformation = modadvapi32.NewProc("GetTokenInformation")
+ procSetTokenInformation = modadvapi32.NewProc("SetTokenInformation")
+ procDuplicateTokenEx = modadvapi32.NewProc("DuplicateTokenEx")
+ procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW")
+ procGetSystemDirectoryW = modkernel32.NewProc("GetSystemDirectoryW")
+ procGetWindowsDirectoryW = modkernel32.NewProc("GetWindowsDirectoryW")
+ procGetSystemWindowsDirectoryW = modkernel32.NewProc("GetSystemWindowsDirectoryW")
+ procWTSQueryUserToken = modwtsapi32.NewProc("WTSQueryUserToken")
+ procWTSEnumerateSessionsW = modwtsapi32.NewProc("WTSEnumerateSessionsW")
+ procWTSFreeMemory = modwtsapi32.NewProc("WTSFreeMemory")
+ procGetSecurityInfo = modadvapi32.NewProc("GetSecurityInfo")
+ procSetSecurityInfo = modadvapi32.NewProc("SetSecurityInfo")
+ procGetNamedSecurityInfoW = modadvapi32.NewProc("GetNamedSecurityInfoW")
+ procSetNamedSecurityInfoW = modadvapi32.NewProc("SetNamedSecurityInfoW")
+ procBuildSecurityDescriptorW = modadvapi32.NewProc("BuildSecurityDescriptorW")
+ procInitializeSecurityDescriptor = modadvapi32.NewProc("InitializeSecurityDescriptor")
+ procGetSecurityDescriptorControl = modadvapi32.NewProc("GetSecurityDescriptorControl")
+ procGetSecurityDescriptorDacl = modadvapi32.NewProc("GetSecurityDescriptorDacl")
+ procGetSecurityDescriptorSacl = modadvapi32.NewProc("GetSecurityDescriptorSacl")
+ procGetSecurityDescriptorOwner = modadvapi32.NewProc("GetSecurityDescriptorOwner")
+ procGetSecurityDescriptorGroup = modadvapi32.NewProc("GetSecurityDescriptorGroup")
+ procGetSecurityDescriptorLength = modadvapi32.NewProc("GetSecurityDescriptorLength")
+ procGetSecurityDescriptorRMControl = modadvapi32.NewProc("GetSecurityDescriptorRMControl")
+ procIsValidSecurityDescriptor = modadvapi32.NewProc("IsValidSecurityDescriptor")
+ procSetSecurityDescriptorControl = modadvapi32.NewProc("SetSecurityDescriptorControl")
+ procSetSecurityDescriptorDacl = modadvapi32.NewProc("SetSecurityDescriptorDacl")
+ procSetSecurityDescriptorSacl = modadvapi32.NewProc("SetSecurityDescriptorSacl")
+ procSetSecurityDescriptorOwner = modadvapi32.NewProc("SetSecurityDescriptorOwner")
+ procSetSecurityDescriptorGroup = modadvapi32.NewProc("SetSecurityDescriptorGroup")
+ procSetSecurityDescriptorRMControl = modadvapi32.NewProc("SetSecurityDescriptorRMControl")
+ procConvertStringSecurityDescriptorToSecurityDescriptorW = modadvapi32.NewProc("ConvertStringSecurityDescriptorToSecurityDescriptorW")
+ procConvertSecurityDescriptorToStringSecurityDescriptorW = modadvapi32.NewProc("ConvertSecurityDescriptorToStringSecurityDescriptorW")
+ procMakeAbsoluteSD = modadvapi32.NewProc("MakeAbsoluteSD")
+ procMakeSelfRelativeSD = modadvapi32.NewProc("MakeSelfRelativeSD")
+ procSetEntriesInAclW = modadvapi32.NewProc("SetEntriesInAclW")
)
func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) {
@@ -646,6 +688,31 @@ func _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) {
return
}
+func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetModuleFileNameW.Addr(), 3, uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))
+ n = uint32(r0)
+ if n == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetModuleHandleExW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(moduleName)), uintptr(unsafe.Pointer(module)))
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
func GetVersion() (ver uint32, err error) {
r0, _, e1 := syscall.Syscall(procGetVersion.Addr(), 0, 0, 0, 0)
ver = uint32(r0)
@@ -682,7 +749,14 @@ func ExitProcess(exitcode uint32) {
}
func IsWow64Process(handle Handle, isWow64 *bool) (err error) {
- r1, _, e1 := syscall.Syscall(procIsWow64Process.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(isWow64)), 0)
+ var _p0 uint32
+ if *isWow64 {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ r1, _, e1 := syscall.Syscall(procIsWow64Process.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(&_p0)), 0)
+ *isWow64 = _p0 != 0
if r1 == 0 {
if e1 != 0 {
err = errnoErr(e1)
@@ -952,6 +1026,30 @@ func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {
return
}
+func LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6, uintptr(file), uintptr(flags), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)))
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall6(procUnlockFileEx.Addr(), 5, uintptr(file), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)), 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
func GetComputerName(buf *uint16, n *uint32) (err error) {
r1, _, e1 := syscall.Syscall(procGetComputerNameW.Addr(), 2, uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)), 0)
if r1 == 0 {
@@ -1111,7 +1209,7 @@ func OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (ha
func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) {
r1, _, e1 := syscall.Syscall6(procShellExecuteW.Addr(), 6, uintptr(hwnd), uintptr(unsafe.Pointer(verb)), uintptr(unsafe.Pointer(file)), uintptr(unsafe.Pointer(args)), uintptr(unsafe.Pointer(cwd)), uintptr(showCmd))
- if r1 == 0 {
+ if r1 <= 32 {
if e1 != 0 {
err = errnoErr(e1)
} else {
@@ -1165,32 +1263,6 @@ func GetStartupInfo(startupInfo *StartupInfo) (err error) {
return
}
-func GetCurrentProcess() (pseudoHandle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procGetCurrentProcess.Addr(), 0, 0, 0, 0)
- pseudoHandle = Handle(r0)
- if pseudoHandle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
- }
- return
-}
-
-func GetCurrentThread() (pseudoHandle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procGetCurrentThread.Addr(), 0, 0, 0, 0)
- pseudoHandle = Handle(r0)
- if pseudoHandle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
- }
- return
-}
-
func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) {
r1, _, e1 := syscall.Syscall6(procGetProcessTimes.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)), 0)
if r1 == 0 {
@@ -2105,6 +2177,69 @@ func PulseEvent(event Handle) (err error) {
return
}
+func CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) {
+ var _p0 uint32
+ if initialOwner {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ r0, _, e1 := syscall.Syscall(procCreateMutexW.Addr(), 3, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(_p0), uintptr(unsafe.Pointer(name)))
+ handle = Handle(r0)
+ if handle == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procCreateMutexExW.Addr(), 4, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0)
+ handle = Handle(r0)
+ if handle == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func OpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) {
+ var _p0 uint32
+ if inheritHandle {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ r0, _, e1 := syscall.Syscall(procOpenMutexW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
+ handle = Handle(r0)
+ if handle == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func ReleaseMutex(mutex Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procReleaseMutex.Addr(), 1, uintptr(mutex), 0, 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
func SleepEx(milliseconds uint32, alertable bool) (ret uint32) {
var _p0 uint32
if alertable {
@@ -2255,6 +2390,24 @@ func OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (hand
return
}
+func SetProcessPriorityBoost(process Handle, disable bool) (err error) {
+ var _p0 uint32
+ if disable {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ r1, _, e1 := syscall.Syscall(procSetProcessPriorityBoost.Addr(), 2, uintptr(process), uintptr(_p0), 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) {
r1, _, e1 := syscall.Syscall(procDefineDosDeviceW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)))
if r1 == 0 {
@@ -2353,6 +2506,18 @@ func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) {
return
}
+func GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint64, totalNumberOfBytes *uint64, totalNumberOfFreeBytes *uint64) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetDiskFreeSpaceExW.Addr(), 4, uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes)), 0, 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
func GetDriveType(rootPathName *uint16) (driveType uint32) {
r0, _, _ := syscall.Syscall(procGetDriveTypeW.Addr(), 1, uintptr(unsafe.Pointer(rootPathName)), 0, 0)
driveType = uint32(r0)
@@ -2495,6 +2660,66 @@ func MessageBox(hwnd Handle, text *uint16, caption *uint16, boxtype uint32) (ret
return
}
+func ExitWindowsEx(flags uint32, reason uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procExitWindowsEx.Addr(), 2, uintptr(flags), uintptr(reason), 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint32, forceAppsClosed bool, rebootAfterShutdown bool, reason uint32) (err error) {
+ var _p0 uint32
+ if forceAppsClosed {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ var _p1 uint32
+ if rebootAfterShutdown {
+ _p1 = 1
+ } else {
+ _p1 = 0
+ }
+ r1, _, e1 := syscall.Syscall6(procInitiateSystemShutdownExW.Addr(), 6, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(message)), uintptr(timeout), uintptr(_p0), uintptr(_p1), uintptr(reason))
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func SetProcessShutdownParameters(level uint32, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetProcessShutdownParameters.Addr(), 2, uintptr(level), uintptr(flags), 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetProcessShutdownParameters.Addr(), 2, uintptr(unsafe.Pointer(level)), uintptr(unsafe.Pointer(flags)), 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
func clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) {
r0, _, _ := syscall.Syscall(procCLSIDFromString.Addr(), 2, uintptr(unsafe.Pointer(lpsz)), uintptr(unsafe.Pointer(pclsid)), 0)
if r0 != 0 {
@@ -2530,6 +2755,27 @@ func rtlGetVersion(info *OsVersionInfoEx) (ret error) {
return
}
+func rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) {
+ syscall.Syscall(procRtlGetNtVersionNumbers.Addr(), 3, uintptr(unsafe.Pointer(majorVersion)), uintptr(unsafe.Pointer(minorVersion)), uintptr(unsafe.Pointer(buildNumber)))
+ return
+}
+
+func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
+ var _p0 *uint32
+ if len(processIds) > 0 {
+ _p0 = &processIds[0]
+ }
+ r1, _, e1 := syscall.Syscall(procEnumProcesses.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(processIds)), uintptr(unsafe.Pointer(bytesReturned)))
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
func WSAStartup(verreq uint32, data *WSAData) (sockerr error) {
r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0)
if r0 != 0 {
@@ -3307,6 +3553,32 @@ func getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
return
}
+func getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
+ len = uint32(r0)
+ if len == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetSystemWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
+ len = uint32(r0)
+ if len == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
func WTSQueryUserToken(session uint32, token *Token) (err error) {
r1, _, e1 := syscall.Syscall(procWTSQueryUserToken.Addr(), 2, uintptr(session), uintptr(unsafe.Pointer(token)), 0)
if r1 == 0 {
@@ -3335,3 +3607,358 @@ func WTSFreeMemory(ptr uintptr) {
syscall.Syscall(procWTSFreeMemory.Addr(), 1, uintptr(ptr), 0, 0)
return
}
+
+func getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
+ r0, _, _ := syscall.Syscall9(procGetSecurityInfo.Addr(), 8, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) {
+ syscall.Syscall9(procSetSecurityInfo.Addr(), 7, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0)
+ return
+}
+
+func getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
+ var _p0 *uint16
+ _p0, ret = syscall.UTF16PtrFromString(objectName)
+ if ret != nil {
+ return
+ }
+ return _getNamedSecurityInfo(_p0, objectType, securityInformation, owner, group, dacl, sacl, sd)
+}
+
+func _getNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
+ r0, _, _ := syscall.Syscall9(procGetNamedSecurityInfoW.Addr(), 8, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
+ var _p0 *uint16
+ _p0, ret = syscall.UTF16PtrFromString(objectName)
+ if ret != nil {
+ return
+ }
+ return _SetNamedSecurityInfo(_p0, objectType, securityInformation, owner, group, dacl, sacl)
+}
+
+func _SetNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
+ r0, _, _ := syscall.Syscall9(procSetNamedSecurityInfoW.Addr(), 7, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) {
+ r0, _, _ := syscall.Syscall9(procBuildSecurityDescriptorW.Addr(), 9, uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(countAccessEntries), uintptr(unsafe.Pointer(accessEntries)), uintptr(countAuditEntries), uintptr(unsafe.Pointer(auditEntries)), uintptr(unsafe.Pointer(oldSecurityDescriptor)), uintptr(unsafe.Pointer(sizeNewSecurityDescriptor)), uintptr(unsafe.Pointer(newSecurityDescriptor)))
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procInitializeSecurityDescriptor.Addr(), 2, uintptr(unsafe.Pointer(absoluteSD)), uintptr(revision), 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func getSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, control *SECURITY_DESCRIPTOR_CONTROL, revision *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(control)), uintptr(unsafe.Pointer(revision)))
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func getSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent *bool, dacl **ACL, daclDefaulted *bool) (err error) {
+ var _p0 uint32
+ if *daclPresent {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ var _p1 uint32
+ if *daclDefaulted {
+ _p1 = 1
+ } else {
+ _p1 = 0
+ }
+ r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0)
+ *daclPresent = _p0 != 0
+ *daclDefaulted = _p1 != 0
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl **ACL, saclDefaulted *bool) (err error) {
+ var _p0 uint32
+ if *saclPresent {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ var _p1 uint32
+ if *saclDefaulted {
+ _p1 = 1
+ } else {
+ _p1 = 0
+ }
+ r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0)
+ *saclPresent = _p0 != 0
+ *saclDefaulted = _p1 != 0
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefaulted *bool) (err error) {
+ var _p0 uint32
+ if *ownerDefaulted {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(&_p0)))
+ *ownerDefaulted = _p0 != 0
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefaulted *bool) (err error) {
+ var _p0 uint32
+ if *groupDefaulted {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(&_p0)))
+ *groupDefaulted = _p0 != 0
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func getSecurityDescriptorLength(sd *SECURITY_DESCRIPTOR) (len uint32) {
+ r0, _, _ := syscall.Syscall(procGetSecurityDescriptorLength.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0)
+ len = uint32(r0)
+ return
+}
+
+func getSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) (ret error) {
+ r0, _, _ := syscall.Syscall(procGetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func isValidSecurityDescriptor(sd *SECURITY_DESCRIPTOR) (isValid bool) {
+ r0, _, _ := syscall.Syscall(procIsValidSecurityDescriptor.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0)
+ isValid = r0 != 0
+ return
+}
+
+func setSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(controlBitsOfInterest), uintptr(controlBitsToSet))
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func setSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent bool, dacl *ACL, daclDefaulted bool) (err error) {
+ var _p0 uint32
+ if daclPresent {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ var _p1 uint32
+ if daclDefaulted {
+ _p1 = 1
+ } else {
+ _p1 = 0
+ }
+ r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(dacl)), uintptr(_p1), 0, 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *ACL, saclDefaulted bool) (err error) {
+ var _p0 uint32
+ if saclPresent {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ var _p1 uint32
+ if saclDefaulted {
+ _p1 = 1
+ } else {
+ _p1 = 0
+ }
+ r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(sacl)), uintptr(_p1), 0, 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaulted bool) (err error) {
+ var _p0 uint32
+ if ownerDefaulted {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(_p0))
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func setSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group *SID, groupDefaulted bool) (err error) {
+ var _p0 uint32
+ if groupDefaulted {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(_p0))
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func setSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) {
+ syscall.Syscall(procSetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0)
+ return
+}
+
+func convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(str)
+ if err != nil {
+ return
+ }
+ return _convertStringSecurityDescriptorToSecurityDescriptor(_p0, revision, sd, size)
+}
+
+func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), 4, uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)), 0, 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR, revision uint32, securityInformation SECURITY_INFORMATION, str **uint16, strLen *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), 5, uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(securityInformation), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(strLen)), 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DESCRIPTOR, absoluteSDSize *uint32, dacl *ACL, daclSize *uint32, sacl *ACL, saclSize *uint32, owner *SID, ownerSize *uint32, group *SID, groupSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall12(procMakeAbsoluteSD.Addr(), 11, uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(absoluteSDSize)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(daclSize)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(saclSize)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(ownerSize)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(groupSize)), 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procMakeSelfRelativeSD.Addr(), 3, uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(selfRelativeSDSize)))
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) {
+ r0, _, _ := syscall.Syscall6(procSetEntriesInAclW.Addr(), 4, uintptr(countExplicitEntries), uintptr(unsafe.Pointer(explicitEntries)), uintptr(unsafe.Pointer(oldACL)), uintptr(unsafe.Pointer(newACL)), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 026dea6910..3e56c89a04 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -287,7 +287,7 @@ github.com/mattn/go-colorable
github.com/mattn/go-isatty
# github.com/matttproud/golang_protobuf_extensions v1.0.1
github.com/matttproud/golang_protobuf_extensions/pbutil
-# github.com/miekg/dns v1.0.14
+# github.com/miekg/dns v1.1.22
github.com/miekg/dns
# github.com/mitchellh/cli v1.0.0
github.com/mitchellh/cli
@@ -402,7 +402,7 @@ github.com/vmware/govmomi/vim25/methods
github.com/vmware/govmomi/vim25/progress
github.com/vmware/govmomi/vim25/debug
github.com/vmware/govmomi/vim25/xml
-# golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4
+# golang.org/x/crypto v0.0.0-20191106202628-ed6320f186d4
golang.org/x/crypto/blake2b
golang.org/x/crypto/ed25519
golang.org/x/crypto/ssh/terminal
@@ -416,7 +416,7 @@ golang.org/x/crypto/curve25519
golang.org/x/crypto/internal/chacha20
golang.org/x/crypto/poly1305
golang.org/x/crypto/internal/subtle
-# golang.org/x/net v0.0.0-20190620200207-3b0461eec859
+# golang.org/x/net v0.0.0-20190923162816-aa69164e4478
golang.org/x/net/context
golang.org/x/net/http2
golang.org/x/net/ipv4
@@ -442,7 +442,7 @@ golang.org/x/oauth2/jwt
# golang.org/x/sync v0.0.0-20190423024810-112230192c58
golang.org/x/sync/singleflight
golang.org/x/sync/errgroup
-# golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
+# golang.org/x/sys v0.0.0-20191105231009-c1f44814a5cd
golang.org/x/sys/unix
golang.org/x/sys/windows/svc
golang.org/x/sys/cpu