summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-09-28 12:40:17 -0700
committerGitHub <noreply@github.com>2018-09-28 12:40:17 -0700
commita8c01377bce777bf1940850e390e587c290e98e0 (patch)
tree0e176269b5faae110bb402b209d4f192654a435c
parent006623e0f737ca7ee5d482fe47c09048a6f3d06a (diff)
downloadchat-a8c01377bce777bf1940850e390e587c290e98e0.tar.gz
chat-a8c01377bce777bf1940850e390e587c290e98e0.tar.bz2
chat-a8c01377bce777bf1940850e390e587c290e98e0.zip
Updating server dependancies. (#9498)
-rw-r--r--Gopkg.lock413
-rw-r--r--Gopkg.toml14
-rw-r--r--plugin/hclog_adapter.go2
-rw-r--r--vendor/github.com/avct/uasurfer/.travis.yml1
-rw-r--r--vendor/github.com/go-redis/redis/command.go2
-rw-r--r--vendor/github.com/go-redis/redis/commands.go42
-rw-r--r--vendor/github.com/go-sql-driver/mysql/.travis.yml1
-rw-r--r--vendor/github.com/go-sql-driver/mysql/AUTHORS1
-rw-r--r--vendor/github.com/go-sql-driver/mysql/README.md2
-rw-r--r--vendor/github.com/go-sql-driver/mysql/auth.go2
-rw-r--r--vendor/github.com/go-sql-driver/mysql/connection.go193
-rw-r--r--vendor/github.com/go-sql-driver/mysql/connection_go18.go208
-rw-r--r--vendor/github.com/go-sql-driver/mysql/driver.go12
-rw-r--r--vendor/github.com/go-sql-driver/mysql/packets.go13
-rw-r--r--vendor/github.com/go-sql-driver/mysql/utils.go251
-rw-r--r--vendor/github.com/go-sql-driver/mysql/utils_go17.go40
-rw-r--r--vendor/github.com/go-sql-driver/mysql/utils_go18.go50
-rw-r--r--vendor/github.com/google/uuid/.travis.yml9
-rw-r--r--vendor/github.com/google/uuid/CONTRIBUTING.md10
-rw-r--r--vendor/github.com/google/uuid/CONTRIBUTORS9
-rw-r--r--vendor/github.com/google/uuid/LICENSE27
-rw-r--r--vendor/github.com/google/uuid/README.md19
-rw-r--r--vendor/github.com/google/uuid/dce.go80
-rw-r--r--vendor/github.com/google/uuid/doc.go12
-rw-r--r--vendor/github.com/google/uuid/hash.go53
-rw-r--r--vendor/github.com/google/uuid/marshal.go37
-rw-r--r--vendor/github.com/google/uuid/node.go89
-rw-r--r--vendor/github.com/google/uuid/node_js.go12
-rw-r--r--vendor/github.com/google/uuid/node_net.go33
-rw-r--r--vendor/github.com/google/uuid/sql.go59
-rw-r--r--vendor/github.com/google/uuid/time.go123
-rw-r--r--vendor/github.com/google/uuid/util.go43
-rw-r--r--vendor/github.com/google/uuid/uuid.go198
-rw-r--r--vendor/github.com/google/uuid/version1.go44
-rw-r--r--vendor/github.com/google/uuid/version4.go38
-rw-r--r--vendor/github.com/gorilla/websocket/.travis.yml1
-rw-r--r--vendor/github.com/gorilla/websocket/client.go88
-rw-r--r--vendor/github.com/gorilla/websocket/prepared.go1
-rw-r--r--vendor/github.com/gorilla/websocket/server.go10
-rw-r--r--vendor/github.com/gorilla/websocket/trace.go19
-rw-r--r--vendor/github.com/gorilla/websocket/trace_17.go12
-rw-r--r--vendor/github.com/gorilla/websocket/util.go2
-rw-r--r--vendor/github.com/hashicorp/go-hclog/go.mod7
-rw-r--r--vendor/github.com/hashicorp/go-hclog/go.sum6
-rw-r--r--vendor/github.com/hashicorp/go-hclog/int.go57
-rw-r--r--vendor/github.com/hashicorp/go-hclog/log.go8
-rw-r--r--vendor/github.com/hashicorp/go-hclog/nulllogger.go6
-rw-r--r--vendor/github.com/hashicorp/go-immutable-radix/go.mod6
-rw-r--r--vendor/github.com/hashicorp/go-immutable-radix/go.sum4
-rw-r--r--vendor/github.com/hashicorp/go-plugin/client.go104
-rw-r--r--vendor/github.com/hashicorp/go-plugin/server.go112
-rw-r--r--vendor/github.com/hashicorp/golang-lru/go.mod1
-rw-r--r--vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go45
-rw-r--r--vendor/github.com/hashicorp/hcl/go.mod3
-rw-r--r--vendor/github.com/hashicorp/hcl/go.sum2
-rw-r--r--vendor/github.com/hashicorp/yamux/go.mod1
-rw-r--r--vendor/github.com/hashicorp/yamux/mux.go13
-rw-r--r--vendor/github.com/hashicorp/yamux/session.go7
-rw-r--r--vendor/github.com/konsorten/go-windows-terminal-sequences/README.md40
-rw-r--r--vendor/github.com/konsorten/go-windows-terminal-sequences/license9
-rw-r--r--vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go36
-rw-r--r--vendor/github.com/mattermost/viper/.gitignore7
-rw-r--r--vendor/github.com/mattermost/viper/.travis.yml5
-rw-r--r--vendor/github.com/mattermost/viper/README.md45
-rw-r--r--vendor/github.com/mattermost/viper/go.mod16
-rw-r--r--vendor/github.com/mattermost/viper/go.sum26
-rw-r--r--vendor/github.com/mattermost/viper/viper.go113
-rw-r--r--vendor/github.com/miekg/dns/.travis.yml3
-rw-r--r--vendor/github.com/miekg/dns/Gopkg.lock4
-rw-r--r--vendor/github.com/miekg/dns/README.md3
-rw-r--r--vendor/github.com/miekg/dns/client.go33
-rw-r--r--vendor/github.com/miekg/dns/dnssec.go30
-rw-r--r--vendor/github.com/miekg/dns/dnssec_keyscan.go17
-rw-r--r--vendor/github.com/miekg/dns/dnssec_privkey.go2
-rw-r--r--vendor/github.com/miekg/dns/duplicate.go25
-rw-r--r--vendor/github.com/miekg/dns/duplicate_generate.go158
-rw-r--r--vendor/github.com/miekg/dns/edns.go8
-rw-r--r--vendor/github.com/miekg/dns/generate.go14
-rw-r--r--vendor/github.com/miekg/dns/labels.go4
-rw-r--r--vendor/github.com/miekg/dns/listen_go111.go43
-rw-r--r--vendor/github.com/miekg/dns/listen_go_not111.go23
-rw-r--r--vendor/github.com/miekg/dns/msg.go16
-rw-r--r--vendor/github.com/miekg/dns/msg_helpers.go8
-rw-r--r--vendor/github.com/miekg/dns/sanitize.go1
-rw-r--r--vendor/github.com/miekg/dns/scan_rr.go12
-rw-r--r--vendor/github.com/miekg/dns/server.go302
-rw-r--r--vendor/github.com/miekg/dns/types.go20
-rw-r--r--vendor/github.com/miekg/dns/udp.go2
-rw-r--r--vendor/github.com/miekg/dns/udp_windows.go37
-rw-r--r--vendor/github.com/miekg/dns/version.go2
-rw-r--r--vendor/github.com/miekg/dns/zcompress.go3
-rw-r--r--vendor/github.com/miekg/dns/zduplicate.go943
-rw-r--r--vendor/github.com/miekg/dns/zmsg.go2
-rw-r--r--vendor/github.com/minio/minio-go/README.md18
-rw-r--r--vendor/github.com/minio/minio-go/api-compose-object.go33
-rw-r--r--vendor/github.com/minio/minio-go/api-get-lifecycle.go77
-rw-r--r--vendor/github.com/minio/minio-go/api-get-object-acl.go136
-rw-r--r--vendor/github.com/minio/minio-go/api-get-options.go2
-rw-r--r--vendor/github.com/minio/minio-go/api-put-bucket.go81
-rw-r--r--vendor/github.com/minio/minio-go/api-put-object-multipart.go6
-rw-r--r--vendor/github.com/minio/minio-go/api-select.go520
-rw-r--r--vendor/github.com/minio/minio-go/api.go25
-rw-r--r--vendor/github.com/minio/minio-go/core.go9
-rw-r--r--vendor/github.com/minio/minio-go/functional_tests.go165
-rw-r--r--vendor/github.com/minio/minio-go/pkg/credentials/file_minio_client.go18
-rw-r--r--vendor/github.com/minio/minio-go/retry.go46
-rw-r--r--vendor/github.com/minio/minio-go/utils.go3
-rw-r--r--vendor/github.com/mitchellh/go-testing-interface/go.mod1
-rw-r--r--vendor/github.com/olekukonko/tablewriter/.travis.yml2
-rw-r--r--vendor/github.com/olekukonko/tablewriter/README.md2
-rw-r--r--vendor/github.com/pborman/uuid/.travis.yml5
-rw-r--r--vendor/github.com/pborman/uuid/README.md2
-rw-r--r--vendor/github.com/pborman/uuid/doc.go7
-rw-r--r--vendor/github.com/pborman/uuid/marshal.go10
-rw-r--r--vendor/github.com/pborman/uuid/node.go77
-rw-r--r--vendor/github.com/pborman/uuid/sql.go4
-rw-r--r--vendor/github.com/pborman/uuid/time.go87
-rw-r--r--vendor/github.com/pborman/uuid/util.go11
-rw-r--r--vendor/github.com/pborman/uuid/uuid.go84
-rw-r--r--vendor/github.com/pborman/uuid/version1.go28
-rw-r--r--vendor/github.com/pborman/uuid/version4.go13
-rw-r--r--vendor/github.com/prometheus/procfs/fixtures.ttar16
-rw-r--r--vendor/github.com/prometheus/procfs/proc.go20
-rw-r--r--vendor/github.com/sirupsen/logrus/.travis.yml58
-rw-r--r--vendor/github.com/sirupsen/logrus/CHANGELOG.md30
-rw-r--r--vendor/github.com/sirupsen/logrus/entry.go40
-rw-r--r--vendor/github.com/sirupsen/logrus/exported.go19
-rw-r--r--vendor/github.com/sirupsen/logrus/go.mod10
-rw-r--r--vendor/github.com/sirupsen/logrus/go.sum12
-rw-r--r--vendor/github.com/sirupsen/logrus/json_formatter.go21
-rw-r--r--vendor/github.com/sirupsen/logrus/logger.go82
-rw-r--r--vendor/github.com/sirupsen/logrus/logrus.go7
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_appengine.go13
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_bsd.go11
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_check_appengine.go2
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_check_js.go11
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go2
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_check_windows.go20
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_linux.go11
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_windows.go18
-rw-r--r--vendor/github.com/sirupsen/logrus/text_formatter.go84
-rw-r--r--vendor/github.com/spf13/afero/go.mod1
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/license_agpl.go683
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/license_apache_2.go238
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_2.go71
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_3.go78
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_2.go376
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_3.go711
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/license_lgpl.go186
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/license_mit.go63
-rw-r--r--vendor/github.com/spf13/cobra/cobra/cmd/licenses.go118
-rw-r--r--vendor/github.com/spf13/jwalterweatherman/go.mod1
-rw-r--r--vendor/golang.org/x/image/font/font.go12
-rw-r--r--vendor/golang.org/x/net/html/const.go10
-rw-r--r--vendor/golang.org/x/net/html/parse.go25
-rw-r--r--vendor/golang.org/x/net/http2/write.go2
-rw-r--r--vendor/golang.org/x/sys/unix/aliases.go2
-rw-r--r--vendor/golang.org/x/sys/unix/constants.go2
-rw-r--r--vendor/golang.org/x/sys/unix/dev_aix_ppc.go27
-rw-r--r--vendor/golang.org/x/sys/unix/dev_aix_ppc64.go29
-rw-r--r--vendor/golang.org/x/sys/unix/dirent.go2
-rw-r--r--vendor/golang.org/x/sys/unix/env_unix.go2
-rw-r--r--vendor/golang.org/x/sys/unix/gccgo.go1
-rw-r--r--vendor/golang.org/x/sys/unix/gccgo_c.c1
-rw-r--r--vendor/golang.org/x/sys/unix/ioctl.go2
-rwxr-xr-xvendor/golang.org/x/sys/unix/mkall.sh10
-rwxr-xr-xvendor/golang.org/x/sys/unix/mkerrors.sh46
-rw-r--r--vendor/golang.org/x/sys/unix/mksyscall_aix.pl385
-rw-r--r--vendor/golang.org/x/sys/unix/pagesize_unix.go2
-rw-r--r--vendor/golang.org/x/sys/unix/race0.go2
-rw-r--r--vendor/golang.org/x/sys/unix/sockcmsg_unix.go2
-rw-r--r--vendor/golang.org/x/sys/unix/str.go2
-rw-r--r--vendor/golang.org/x/sys/unix/syscall.go2
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_aix.go564
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_aix_ppc.go34
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go34
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux.go30
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go9
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go212
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd.go17
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_unix.go2
-rw-r--r--vendor/golang.org/x/sys/unix/timestruct.go2
-rw-r--r--vendor/golang.org/x/sys/unix/types_aix.go236
-rw-r--r--vendor/golang.org/x/sys/unix/types_netbsd.go6
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go1372
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go1373
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go34
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_386.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_arm.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go2662
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go26
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go26
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go26
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go1519
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go1519
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_386.go26
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go26
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go26
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go26
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go26
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go26
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go26
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go26
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go46
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go46
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go2140
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go26
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go286
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go345
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go354
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_386.go83
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go83
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_arm.go83
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go83
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips.go83
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go83
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go83
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go83
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go83
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go83
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go1995
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go83
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go10
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go10
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go10
-rw-r--r--vendor/golang.org/x/sys/windows/asm_windows_arm.s11
-rw-r--r--vendor/golang.org/x/sys/windows/syscall_windows.go58
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows.go4
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows_arm.go22
-rw-r--r--vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go23
-rw-r--r--vendor/google.golang.org/grpc/.travis.yml36
-rw-r--r--vendor/google.golang.org/grpc/Makefile65
-rw-r--r--vendor/google.golang.org/grpc/balancer.go25
-rw-r--r--vendor/google.golang.org/grpc/clientconn.go157
-rw-r--r--vendor/google.golang.org/grpc/dialoptions.go3
-rw-r--r--vendor/google.golang.org/grpc/go.mod21
-rw-r--r--vendor/google.golang.org/grpc/go.sum34
-rw-r--r--vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go144
-rw-r--r--vendor/google.golang.org/grpc/health/health.go5
-rw-r--r--vendor/google.golang.org/grpc/internal/channelz/types_linux.go1
-rw-r--r--vendor/google.golang.org/grpc/internal/internal.go8
-rw-r--r--vendor/google.golang.org/grpc/internal/transport/controlbuf.go4
-rw-r--r--vendor/google.golang.org/grpc/internal/transport/handler_server.go7
-rw-r--r--vendor/google.golang.org/grpc/internal/transport/http2_client.go63
-rw-r--r--vendor/google.golang.org/grpc/internal/transport/http2_server.go75
-rw-r--r--vendor/google.golang.org/grpc/internal/transport/log.go6
-rw-r--r--vendor/google.golang.org/grpc/internal/transport/transport.go25
-rw-r--r--vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go2
-rw-r--r--vendor/google.golang.org/grpc/rpc_util.go15
-rw-r--r--vendor/google.golang.org/grpc/server.go122
-rw-r--r--vendor/google.golang.org/grpc/version.go2
-rwxr-xr-xvendor/google.golang.org/grpc/vet.sh107
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/.travis.yml9
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/CONTRIBUTORS8
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/client.go2
-rwxr-xr-xvendor/gopkg.in/olivere/elastic.v5/run-es.sh2
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/search.go8
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/search_aggs.go42
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/search_aggs_bucket_date_histogram.go11
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/search_shards.go2
272 files changed, 23290 insertions, 4213 deletions
diff --git a/Gopkg.lock b/Gopkg.lock
index 0e704e083..5f4f23a91 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -2,84 +2,111 @@
[[projects]]
+ digest = "1:0803645e1f57fb5271a6edc7570b9ea59bac2e5de67957075a43f3d74c8dbd97"
name = "github.com/NYTimes/gziphandler"
packages = ["."]
+ pruneopts = "UT"
revision = "2600fb119af974220d3916a5916d6e31176aac1b"
version = "v1.0.1"
[[projects]]
branch = "master"
+ digest = "1:ef5b0622d834c139454148b8fd0c92bb314828900532b267ae62da9fec109866"
name = "github.com/armon/go-metrics"
packages = ["."]
- revision = "3c58d8115a78a6879e5df75ae900846768d36895"
+ pruneopts = "UT"
+ revision = "f0300d1749da6fa982027e449ec0c7a145510c3c"
[[projects]]
branch = "master"
+ digest = "1:4c674bfb10004c3977fd086d36dcb232b06c1ceaa4a58dc7325eeae2e1df44ee"
name = "github.com/avct/uasurfer"
packages = ["."]
- revision = "dc0ec4fd1e875e7ad39d8c932a198d41dd7637d0"
+ pruneopts = "UT"
+ revision = "2ce2c8fcd544edb053678744334884120f60da20"
[[projects]]
branch = "master"
+ digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d"
name = "github.com/beorn7/perks"
packages = ["quantile"]
+ pruneopts = "UT"
revision = "3a771d992973f24aa725d07868b467d1ddfceafb"
[[projects]]
branch = "master"
+ digest = "1:cc439e1d9d8cff3d575642f5401033b00f2b8d0cd9f859db45604701c990879a"
name = "github.com/corpix/uarand"
packages = ["."]
+ pruneopts = "UT"
revision = "2b8494104d86337cdd41d0a49cbed8e4583c0ab4"
[[projects]]
+ digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec"
name = "github.com/davecgh/go-spew"
packages = ["spew"]
+ pruneopts = "UT"
revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73"
version = "v1.1.1"
[[projects]]
branch = "master"
+ digest = "1:d8f5453f55bfb46740ea729278a7ebe45719a736d6e7a97a0157d0b1870f347a"
name = "github.com/dgryski/dgoogauth"
packages = ["."]
+ pruneopts = "UT"
revision = "fd153d5969d30bd701e10f3530228f001213047c"
[[projects]]
+ digest = "1:2694597a20d303502ad1b7f1cc688977c7dc34da732ccf4d27e98b552cceed5b"
name = "github.com/disintegration/imaging"
packages = ["."]
+ pruneopts = "UT"
revision = "0bd5694c78c9c3d9a3cd06a706a8f3c59296a9ac"
version = "v1.5.0"
[[projects]]
branch = "master"
+ digest = "1:6f9339c912bbdda81302633ad7e99a28dfa5a639c864061f1929510a9a64aa74"
name = "github.com/dustin/go-humanize"
packages = ["."]
+ pruneopts = "UT"
revision = "9f541cc9db5d55bce703bd99987c9d5cb8eea45e"
[[projects]]
branch = "master"
+ digest = "1:665c8850f673be8d358fe61ab00412049e685202aa7466ae5c72ad50d89c84f7"
name = "github.com/dyatlov/go-opengraph"
packages = ["opengraph"]
+ pruneopts = "UT"
revision = "816b6608b3c8c1e871bc9cf777f390e2532081fe"
[[projects]]
+ digest = "1:abeb38ade3f32a92943e5be54f55ed6d6e3b6602761d74b4aab4c9dd45c18abd"
name = "github.com/fsnotify/fsnotify"
packages = ["."]
+ pruneopts = "UT"
revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9"
version = "v1.4.7"
[[projects]]
+ digest = "1:5abd6a22805b1919f6a6bca0ae58b13cef1f3412812f38569978f43ef02743d4"
name = "github.com/go-ini/ini"
packages = ["."]
+ pruneopts = "UT"
revision = "5cf292cae48347c2490ac1a58fe36735fb78df7e"
version = "v1.38.2"
[[projects]]
+ digest = "1:93aaeb913621a3a53aaa78592c00f46d63e3bb0ea76e2d9b07327b50959a5778"
name = "github.com/go-ldap/ldap"
packages = ["."]
+ pruneopts = "UT"
revision = "bb7a9ca6e4fbc2129e3db588a34bc970ffe811a9"
version = "v2.5.1"
[[projects]]
+ digest = "1:7c2fd446293ff7799cc496d3446e674ee67902d119f244de645caf95dff1bb98"
name = "github.com/go-redis/redis"
packages = [
".",
@@ -89,126 +116,169 @@
"internal/pool",
"internal/proto",
"internal/singleflight",
- "internal/util"
+ "internal/util",
]
- revision = "1614e579ed966441b8e0c3ccea1dd0fbbd93a6ae"
- version = "v6.14.0"
+ pruneopts = "UT"
+ revision = "f3bba01df2026fc865f7782948845db9cf44cf23"
+ version = "v6.14.1"
[[projects]]
- branch = "master"
+ digest = "1:adea5a94903eb4384abef30f3d878dc9ff6b6b5b0722da25b82e5169216dfb61"
name = "github.com/go-sql-driver/mysql"
packages = ["."]
- revision = "99ff426eb706cffe92ff3d058e168b278cabf7c7"
+ pruneopts = "UT"
+ revision = "d523deb1b23d913de5bdada721a6071e71283618"
+ version = "v1.4.0"
[[projects]]
branch = "master"
+ digest = "1:7a6377256f670508711c56c25556d639e673c0fa0f519c5a758fdcbfc8af9ac8"
name = "github.com/golang/freetype"
packages = [
".",
"raster",
- "truetype"
+ "truetype",
]
+ pruneopts = "UT"
revision = "e2365dfdc4a05e4b8299a783240d4a7d5a65d4e4"
[[projects]]
+ digest = "1:4c0989ca0bcd10799064318923b9bc2db6b4d6338dd75f3f2d86c3511aaaf5cf"
name = "github.com/golang/protobuf"
packages = [
"proto",
"ptypes",
"ptypes/any",
"ptypes/duration",
- "ptypes/timestamp"
+ "ptypes/timestamp",
]
+ pruneopts = "UT"
revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5"
version = "v1.2.0"
[[projects]]
+ digest = "1:3a26588bc48b96825977c1b3df964f8fd842cd6860cc26370588d3563433cf11"
+ name = "github.com/google/uuid"
+ packages = ["."]
+ pruneopts = "UT"
+ revision = "d460ce9f8df2e77fb1ba55ca87fafed96c607494"
+ version = "v1.0.0"
+
+[[projects]]
+ digest = "1:c79fb010be38a59d657c48c6ba1d003a8aa651fa56b579d959d74573b7dff8e1"
name = "github.com/gorilla/context"
packages = ["."]
+ pruneopts = "UT"
revision = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42"
version = "v1.1.1"
[[projects]]
+ digest = "1:664d37ea261f0fc73dd17f4a1f5f46d01fbb0b0d75f6375af064824424109b7d"
name = "github.com/gorilla/handlers"
packages = ["."]
+ pruneopts = "UT"
revision = "7e0847f9db758cdebd26c149d0ae9d5d0b9c98ce"
version = "v1.4.0"
[[projects]]
+ digest = "1:e73f5b0152105f18bc131fba127d9949305c8693f8a762588a82a48f61756f5f"
name = "github.com/gorilla/mux"
packages = ["."]
+ pruneopts = "UT"
revision = "e3702bed27f0d39777b0b37b664b6280e8ef8fbf"
version = "v1.6.2"
[[projects]]
+ digest = "1:f7463b67871bf7fe475e2c69fb0d21ead07de5188b8d7f8abf8fc961965ed841"
name = "github.com/gorilla/schema"
packages = ["."]
+ pruneopts = "UT"
revision = "d0e4c24cff97ae983e9847e0ed5a02dc10013d41"
version = "v1.0.2"
[[projects]]
- branch = "master"
+ digest = "1:7b5c6e2eeaa9ae5907c391a91c132abfd5c9e8a784a341b5625e750c67e6825d"
name = "github.com/gorilla/websocket"
packages = ["."]
- revision = "b378caee5b2a673abe3897c40fde529bff7b986e"
+ pruneopts = "UT"
+ revision = "66b9c49e59c6c48f0ffce28c2d8b8a5678502c6d"
+ version = "v1.4.0"
[[projects]]
- branch = "master"
+ digest = "1:09970bb8daf100bdf11b48b72c71ef980cd2b50efbd903989b3d182956be0b83"
name = "github.com/hako/durafmt"
packages = ["."]
+ pruneopts = "UT"
revision = "7b7ae1e72eade09dbc9c2cfba3e6c4bae7b8bcac"
+ version = "1.0.0"
[[projects]]
+ digest = "1:0ade334594e69404d80d9d323445d2297ff8161637f9b2d347cc6973d2d6f05b"
name = "github.com/hashicorp/errwrap"
packages = ["."]
+ pruneopts = "UT"
revision = "8a6fb523712970c966eefc6b39ed2c5e74880354"
version = "v1.0.0"
[[projects]]
+ digest = "1:d900a5ae66a3181783dbf38e4a23505cdabd3e8e881c3d49ae8aa498b571b886"
name = "github.com/hashicorp/go-hclog"
packages = ["."]
- revision = "69ff559dc25f3b435631604f573a5fa1efdb6433"
+ pruneopts = "UT"
+ revision = "e45cbeb79f0411b1cfedd3f226ff69d5d433c762"
[[projects]]
- branch = "master"
+ digest = "1:2be5a35f0c5b35162c41bb24971e5dcf6ce825403296ee435429cdcc4e1e847e"
name = "github.com/hashicorp/go-immutable-radix"
packages = ["."]
- revision = "7f3cd4390caab3250a57f30efdb2a65dd7649ecf"
+ pruneopts = "UT"
+ revision = "27df80928bb34bb1b0d6d0e01b9e679902e7a6b5"
+ version = "v1.0.0"
[[projects]]
branch = "master"
+ digest = "1:b8ba23b0b493e601d5ebaf21079bd3433eb304a5d73c0fb40b8aea526e94f46b"
name = "github.com/hashicorp/go-msgpack"
packages = ["codec"]
+ pruneopts = "UT"
revision = "fa3f63826f7c23912c15263591e65d54d080b458"
[[projects]]
+ digest = "1:f668349b83f7d779567c880550534addeca7ebadfdcf44b0b9c39be61864b4b7"
name = "github.com/hashicorp/go-multierror"
packages = ["."]
+ pruneopts = "UT"
revision = "886a7fbe3eb1c874d46f623bfa70af45f425b3d1"
version = "v1.0.0"
[[projects]]
+ digest = "1:20f78c1cf1b6fe6c55ba1407350d6fc7dc77d1591f8106ba693c28014a1a1b37"
name = "github.com/hashicorp/go-plugin"
packages = ["."]
- revision = "e8d22c780116115ae5624720c9af0c97afe4f551"
+ pruneopts = "UT"
+ revision = "a4620f9913d19f03a6bf19b2f304daaaf83ea130"
[[projects]]
branch = "master"
+ digest = "1:14f2005c31ddf99c4a0f36fc440f8d1ac43224194c7c4a904b3c8f4ba5654d0b"
name = "github.com/hashicorp/go-sockaddr"
packages = ["."]
+ pruneopts = "UT"
revision = "6d291a969b86c4b633730bfc6b8b9d64c3aafed9"
[[projects]]
- branch = "master"
+ digest = "1:8ec8d88c248041a6df5f6574b87bc00e7e0b493881dad2e7ef47b11dc69093b5"
name = "github.com/hashicorp/golang-lru"
packages = [
".",
- "simplelru"
+ "simplelru",
]
- revision = "0fb14efe8c47ae851c0034ed7a448854d3d34cf3"
+ pruneopts = "UT"
+ revision = "20f1fb78b0740ba8c3cb143a61e86ba5c8669768"
+ version = "v0.5.0"
[[projects]]
- branch = "master"
+ digest = "1:c0d19ab64b32ce9fe5cf4ddceba78d5bc9807f0016db6b1183599da3dcc24d10"
name = "github.com/hashicorp/hcl"
packages = [
".",
@@ -220,120 +290,163 @@
"hcl/token",
"json/parser",
"json/scanner",
- "json/token"
+ "json/token",
]
- revision = "ef8a98b0bbce4a65b5aa4c368430a80ddc533168"
+ pruneopts = "UT"
+ revision = "8cb6e5b959231cc1119e43259c4a608f9c51a241"
+ version = "v1.0.0"
[[projects]]
branch = "master"
+ digest = "1:70e2df69879bd481a620b103b21940a09c61dc7727c9193423509c0507b052d0"
name = "github.com/hashicorp/memberlist"
packages = ["."]
+ pruneopts = "UT"
revision = "b195c8e4fcc6284fff1583fd6ab09e68ca207551"
[[projects]]
branch = "master"
+ digest = "1:a4826c308e84f5f161b90b54a814f0be7d112b80164b9b884698a6903ea47ab3"
name = "github.com/hashicorp/yamux"
packages = ["."]
- revision = "3520598351bb3500a49ae9563f5539666ae0a27c"
+ pruneopts = "UT"
+ revision = "7221087c3d281fda5f794e28c2ea4c6e4d5c4558"
[[projects]]
branch = "master"
+ digest = "1:22725c01ecd8ed0c0f0078944305a57053340d92878b02db925c660cc4accf64"
name = "github.com/icrowley/fake"
packages = ["."]
+ pruneopts = "UT"
revision = "4178557ae428460c3780a381c824a1f3aceb6325"
[[projects]]
+ digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be"
name = "github.com/inconshreveable/mousetrap"
packages = ["."]
+ pruneopts = "UT"
revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
version = "v1.0"
[[projects]]
branch = "master"
+ digest = "1:8bacc2118e6cc6a207eb144656537ff7ee0397f8bc8c1f7639519b0de2bb949a"
name = "github.com/jaytaylor/html2text"
packages = ["."]
+ pruneopts = "UT"
revision = "57d518f124b0cf46ea2021f25a01396b3522e6fb"
[[projects]]
branch = "master"
+ digest = "1:30698afdedd89502ca137b3dac7b762a5919c2e15377445cb42e9c79067f4a83"
name = "github.com/jehiah/go-strftime"
packages = ["."]
+ pruneopts = "UT"
revision = "1d33003b386959af197ba96475f198c114627b5e"
[[projects]]
+ branch = "master"
+ digest = "1:f44d34fda864bed6d6c71514cd40b2ee097e6e67f745d5d014113e1faa5af8b7"
+ name = "github.com/konsorten/go-windows-terminal-sequences"
+ packages = ["."]
+ pruneopts = "UT"
+ revision = "b729f2633dfe35f4d1d8a32385f6685610ce1cb5"
+
+[[projects]]
+ digest = "1:8ef506fc2bb9ced9b151dafa592d4046063d744c646c1bbe801982ce87e4bc24"
name = "github.com/lib/pq"
packages = [
".",
- "oid"
+ "oid",
]
+ pruneopts = "UT"
revision = "4ded0e9383f75c197b3a2aaa6d590ac52df6fd79"
version = "v1.0.0"
[[projects]]
+ digest = "1:c568d7727aa262c32bdf8a3f7db83614f7af0ed661474b24588de635c20024c7"
name = "github.com/magiconair/properties"
packages = ["."]
+ pruneopts = "UT"
revision = "c2353362d570a7bfa228149c62842019201cfb71"
version = "v1.8.0"
[[projects]]
branch = "master"
+ digest = "1:aa3d8d42865c42626b5c1add193692d045b3188b1479f0a0a88690d21fe20083"
name = "github.com/mailru/easyjson"
packages = [
".",
"buffer",
"jlexer",
- "jwriter"
+ "jwriter",
]
+ pruneopts = "UT"
revision = "60711f1a8329503b04e1c88535f419d0bb440bff"
[[projects]]
branch = "master"
+ digest = "1:f44dea49cf8d9389516c537b7ef61bfb5836a9bf485e213673917258413f24c3"
name = "github.com/mattermost/gorp"
packages = ["."]
+ pruneopts = "UT"
revision = "520a119fe3536337cf8feeaf76afae0f5ae193f1"
[[projects]]
branch = "master"
+ digest = "1:416c58875fe8a3977843a53df2c8f244dbcee61e2ba17fc31027924d2ab0f7fe"
name = "github.com/mattermost/rsc"
packages = [
"gf256",
"qr",
- "qr/coding"
+ "qr/coding",
]
+ pruneopts = "UT"
revision = "bbaefb05eaa0389ea712340066837c8ce4d287f9"
[[projects]]
branch = "mattermost"
+ digest = "1:184692ed2b6b7d604bfe9d0d43a95cd0e0d9872b3dc49a6cb3c11a231bd9788d"
name = "github.com/mattermost/viper"
packages = ["."]
- revision = "1b00ce64485c7a2449f239de3cbc9040a9c46aa0"
+ pruneopts = "UT"
+ revision = "362ff1e71044349d56d37d8b75cd317bff8369b9"
source = "https://github.com/mattermost/viper"
[[projects]]
+ digest = "1:cdb899c199f907ac9fb50495ec71212c95cb5b0e0a8ee0800da0238036091033"
name = "github.com/mattn/go-runewidth"
packages = ["."]
+ pruneopts = "UT"
revision = "ce7b0b5c7b45a81508558cd1dba6bb1e4ddb51bb"
version = "v0.0.3"
[[projects]]
+ digest = "1:3cafc6a5a1b8269605d9df4c6956d43d8011fc57f266ca6b9d04da6c09dee548"
name = "github.com/mattn/go-sqlite3"
packages = ["."]
+ pruneopts = "UT"
revision = "25ecb14adfc7543176f7d85291ec7dba82c6f7e4"
version = "v1.9.0"
[[projects]]
+ digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc"
name = "github.com/matttproud/golang_protobuf_extensions"
packages = ["pbutil"]
+ pruneopts = "UT"
revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c"
version = "v1.0.1"
[[projects]]
+ digest = "1:b39aee4261f1ae13fdd21a0db189e0bba0f96c0f2eba77ab278428e2d3b00052"
name = "github.com/miekg/dns"
packages = ["."]
- revision = "5a2b9fab83ff0f8bfc99684bd5f43a37abe560f1"
- version = "v1.0.8"
+ pruneopts = "UT"
+ revision = "f4db2ca6edc3af0ee51bf332099cc480bcf3ef9d"
+ version = "v1.0.10"
[[projects]]
+ digest = "1:66917113d25f811af092599123662fe8e1b9eebdc4057a2eedf9b9f1ca00d76a"
name = "github.com/minio/minio-go"
packages = [
".",
@@ -341,241 +454,309 @@
"pkg/encrypt",
"pkg/s3signer",
"pkg/s3utils",
- "pkg/set"
+ "pkg/set",
]
- revision = "70799fe8dae6ecfb6c7d7e9e048fce27f23a1992"
- version = "v6.0.5"
+ pruneopts = "UT"
+ revision = "e8c97c88468e122f161683409cde02dc89a2961c"
+ version = "v6.0.7"
[[projects]]
+ digest = "1:78bbb1ba5b7c3f2ed0ea1eab57bdd3859aec7e177811563edc41198a760b06af"
name = "github.com/mitchellh/go-homedir"
packages = ["."]
+ pruneopts = "UT"
revision = "ae18d6b8b3205b561c79e8e5f69bff09736185f4"
version = "v1.0.0"
[[projects]]
- branch = "master"
+ digest = "1:42eb1f52b84a06820cedc9baec2e710bfbda3ee6dac6cdb97f8b9a5066134ec6"
name = "github.com/mitchellh/go-testing-interface"
packages = ["."]
- revision = "a61a99592b77c9ba629d254a693acffaeb4b7e28"
+ pruneopts = "UT"
+ revision = "6d0b8010fcc857872e42fc6c931227569016843c"
+ version = "v1.0.0"
[[projects]]
+ digest = "1:645110e089152bd0f4a011a2648fbb0e4df5977be73ca605781157ac297f50c4"
name = "github.com/mitchellh/mapstructure"
packages = ["."]
+ pruneopts = "UT"
revision = "fa473d140ef3c6adf42d6b391fe76707f1f243c8"
version = "v1.0.0"
[[projects]]
+ digest = "1:07140002dbf37da92090f731b46fa47be4820b82fe5c14a035203b0e813d0ec2"
name = "github.com/nicksnyder/go-i18n"
packages = [
"i18n",
"i18n/bundle",
"i18n/language",
- "i18n/translation"
+ "i18n/translation",
]
+ pruneopts = "UT"
revision = "0dc1626d56435e9d605a29875701721c54bc9bbd"
version = "v1.10.0"
[[projects]]
+ digest = "1:9ec6cf1df5ad1d55cf41a43b6b1e7e118a91bade4f68ff4303379343e40c0e25"
name = "github.com/oklog/run"
packages = ["."]
+ pruneopts = "UT"
revision = "4dadeb3030eda0273a12382bb2348ffc7c9d1a39"
version = "v1.0.0"
[[projects]]
branch = "master"
+ digest = "1:f611266e3ac01ab4adb6f1d67f6c1be82998d02f452faff450596658712d860b"
name = "github.com/olekukonko/tablewriter"
packages = ["."]
- revision = "d4647c9c7a84d847478d890b816b7d8b62b0b279"
+ pruneopts = "UT"
+ revision = "be2c049b30ccd4d3fd795d6bf7dce74e42eeedaa"
[[projects]]
+ digest = "1:e5d0bd87abc2781d14e274807a470acd180f0499f8bf5bb18606e9ec22ad9de9"
name = "github.com/pborman/uuid"
packages = ["."]
- revision = "e790cca94e6cc75c7064b1332e63811d4aae1a53"
- version = "v1.1"
+ pruneopts = "UT"
+ revision = "adf5a7427709b9deb95d29d3fa8a2bf9cfd388f1"
+ version = "v1.2"
[[projects]]
+ digest = "1:95741de3af260a92cc5c7f3f3061e85273f5a81b5db20d4bd68da74bd521675e"
name = "github.com/pelletier/go-toml"
packages = ["."]
+ pruneopts = "UT"
revision = "c01d1270ff3e442a8a57cddc1c92dc1138598194"
version = "v1.2.0"
[[projects]]
+ digest = "1:40e195917a951a8bf867cd05de2a46aaf1806c50cf92eebf4c16f78cd196f747"
name = "github.com/pkg/errors"
packages = ["."]
+ pruneopts = "UT"
revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
version = "v0.8.0"
[[projects]]
+ digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe"
name = "github.com/pmezard/go-difflib"
packages = ["difflib"]
+ pruneopts = "UT"
revision = "792786c7400a136282c1664665ae0a8db921c6c2"
version = "v1.0.0"
[[projects]]
+ digest = "1:d14a5f4bfecf017cb780bdde1b6483e5deb87e12c332544d2c430eda58734bcb"
name = "github.com/prometheus/client_golang"
packages = [
"prometheus",
- "prometheus/promhttp"
+ "prometheus/promhttp",
]
+ pruneopts = "UT"
revision = "c5b7fccd204277076155f10851dad72b76a49317"
version = "v0.8.0"
[[projects]]
branch = "master"
+ digest = "1:2d5cd61daa5565187e1d96bae64dbbc6080dacf741448e9629c64fd93203b0d4"
name = "github.com/prometheus/client_model"
packages = ["go"]
+ pruneopts = "UT"
revision = "5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f"
[[projects]]
branch = "master"
+ digest = "1:63b68062b8968092eb86bedc4e68894bd096ea6b24920faca8b9dcf451f54bb5"
name = "github.com/prometheus/common"
packages = [
"expfmt",
"internal/bitbucket.org/ww/goautoneg",
- "model"
+ "model",
]
+ pruneopts = "UT"
revision = "c7de2306084e37d54b8be01f3541a8464345e9a5"
[[projects]]
branch = "master"
+ digest = "1:ef1dd9945e58ee9b635273d28c0ef3fa3742a7dedc038ebe207fd63e6ce000ef"
name = "github.com/prometheus/procfs"
packages = [
".",
"internal/util",
"nfs",
- "xfs"
+ "xfs",
]
- revision = "05ee40e3a273f7245e8777337fc7b46e533a9a92"
+ pruneopts = "UT"
+ revision = "418d78d0b9a7b7de3a6bbc8a23def624cc977bb2"
[[projects]]
+ digest = "1:0b8dd7447e420afff0260179dc892711e837edd1d446bc78dab924624a3c3c81"
name = "github.com/rs/cors"
packages = ["."]
+ pruneopts = "UT"
revision = "3fb1b69b103a84de38a19c3c6ec073dd6caa4d3f"
version = "v1.5.0"
[[projects]]
branch = "go1"
+ digest = "1:392fafc4b5c7a34734e60ea4efa2199ab77e6e914db643232cbe9d99aa6d65cd"
name = "github.com/rwcarlsen/goexif"
packages = [
"exif",
- "tiff"
+ "tiff",
]
+ pruneopts = "UT"
revision = "8d986c03457a2057c7b0fb0a48113f7dd48f9619"
[[projects]]
branch = "master"
+ digest = "1:579c4bbcc2e16d4caf871ba91c0e2c331b07c5560c80d142d82c0de01c57fa96"
name = "github.com/sean-/seed"
packages = ["."]
+ pruneopts = "UT"
revision = "e2103e2c35297fb7e17febb81e49b312087a2372"
[[projects]]
+ digest = "1:c17847cfbf41a97d1627e842eda1215d44eaf443af94725122426c069b35012b"
name = "github.com/segmentio/analytics-go"
packages = ["."]
+ pruneopts = "UT"
revision = "2d840d861c322bdf5346ba7917af1c2285e653d3"
version = "2.1.1"
[[projects]]
branch = "master"
+ digest = "1:ec22607298efbafb122c4e4b2ca8ceb6c4ec1ba72e74705b84f9f2ce8ee77984"
name = "github.com/segmentio/backo-go"
packages = ["."]
+ pruneopts = "UT"
revision = "204274ad699c0983a70203a566887f17a717fef4"
[[projects]]
+ digest = "1:dc2d85c13ac22c22a1f3170a41a8e1b897fa05134aaf533f16df44f66a25b4a1"
name = "github.com/sirupsen/logrus"
packages = ["."]
- revision = "3e01752db0189b9157070a0e1668a620f9a85da2"
- version = "v1.0.6"
+ pruneopts = "UT"
+ revision = "a67f783a3814b8729bd2dac5780b5f78f8dbd64d"
+ version = "v1.1.0"
[[projects]]
+ digest = "1:6a4a11ba764a56d2758899ec6f3848d24698d48442ebce85ee7a3f63284526cd"
name = "github.com/spf13/afero"
packages = [
".",
- "mem"
+ "mem",
]
- revision = "787d034dfe70e44075ccc060d346146ef53270ad"
- version = "v1.1.1"
+ pruneopts = "UT"
+ revision = "d40851caa0d747393da1ffb28f7f9d8b4eeffebd"
+ version = "v1.1.2"
[[projects]]
+ digest = "1:516e71bed754268937f57d4ecb190e01958452336fa73dbac880894164e91c1f"
name = "github.com/spf13/cast"
packages = ["."]
+ pruneopts = "UT"
revision = "8965335b8c7107321228e3e3702cab9832751bac"
version = "v1.2.0"
[[projects]]
+ digest = "1:645cabccbb4fa8aab25a956cbcbdf6a6845ca736b2c64e197ca7cbb9d210b939"
name = "github.com/spf13/cobra"
packages = ["."]
+ pruneopts = "UT"
revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385"
version = "v0.0.3"
[[projects]]
- branch = "master"
+ digest = "1:68ea4e23713989dc20b1bded5d9da2c5f9be14ff9885beef481848edd18c26cb"
name = "github.com/spf13/jwalterweatherman"
packages = ["."]
- revision = "14d3d4c518341bea657dd8a226f5121c0ff8c9f2"
+ pruneopts = "UT"
+ revision = "4a4406e478ca629068e7768fc33f3f044173c0a6"
+ version = "v1.0.0"
[[projects]]
+ digest = "1:dab83a1bbc7ad3d7a6ba1a1cc1760f25ac38cdf7d96a5cdd55cd915a4f5ceaf9"
name = "github.com/spf13/pflag"
packages = ["."]
+ pruneopts = "UT"
revision = "9a97c102cda95a86cec2345a6f09f55a939babf5"
version = "v1.0.2"
[[projects]]
branch = "master"
+ digest = "1:362b269942e8508aed33025593090ad4cdbd9077de4b1cd505e6124728e9e856"
name = "github.com/ssor/bom"
packages = ["."]
+ pruneopts = "UT"
revision = "6386211fdfcf24c0bfbdaceafd02849ed9a8a509"
[[projects]]
+ digest = "1:ac83cf90d08b63ad5f7e020ef480d319ae890c208f8524622a2f3136e2686b02"
name = "github.com/stretchr/objx"
packages = ["."]
+ pruneopts = "UT"
revision = "477a77ecc69700c7cdeb1fa9e129548e1c1c393c"
version = "v0.1.1"
[[projects]]
+ digest = "1:ffae6a0390594c05dc5ba534c385229e883508f17f6da257624913fd9aaa4d21"
name = "github.com/stretchr/testify"
packages = [
"assert",
"mock",
"require",
- "suite"
+ "suite",
]
+ pruneopts = "UT"
revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686"
version = "v1.2.2"
[[projects]]
+ digest = "1:61887463fa9092425462901371114c3d1fbea3272c74e421d4502294a89556e3"
name = "github.com/throttled/throttled"
packages = [
".",
- "store/memstore"
+ "store/memstore",
]
+ pruneopts = "UT"
revision = "aeea1c7338e6dd1e1b309afe07fb7bbcfa83c2fa"
version = "v2.2.1"
[[projects]]
+ digest = "1:43b8a34f6390d8fbdcfd300ed52103064e9eaaecc7e50b7e3518fe246ebe8403"
name = "github.com/tylerb/graceful"
packages = ["."]
+ pruneopts = "UT"
revision = "4654dfbb6ad53cb5e27f37d99b02e16c1872fbbb"
version = "v1.2.15"
[[projects]]
branch = "master"
+ digest = "1:2f9538da7381bb981fb8451b2b0fb304c2bc7f1724228dc336a8f002e6fec704"
name = "github.com/xtgo/uuid"
packages = ["."]
+ pruneopts = "UT"
revision = "a0b114877d4caeffbd7f87e3757c17fce570fea7"
[[projects]]
+ digest = "1:3c1a69cdae3501bf75e76d0d86dc6f2b0a7421bc205c0cb7b96b19eed464a34d"
name = "go.uber.org/atomic"
packages = ["."]
+ pruneopts = "UT"
revision = "1ea20fb1cbb1cc08cbd0d913a96dead89aa18289"
version = "v1.3.2"
[[projects]]
+ digest = "1:60bf2a5e347af463c42ed31a493d817f8a72f102543060ed992754e689805d1a"
name = "go.uber.org/multierr"
packages = ["."]
+ pruneopts = "UT"
revision = "3c4937480c32f4c13a875a1829af76c98ca3d40a"
version = "v1.1.0"
[[projects]]
+ digest = "1:c52caf7bd44f92e54627a31b85baf06a68333a196b3d8d241480a774733dcf8b"
name = "go.uber.org/zap"
packages = [
".",
@@ -583,13 +764,15 @@
"internal/bufferpool",
"internal/color",
"internal/exit",
- "zapcore"
+ "zapcore",
]
+ pruneopts = "UT"
revision = "ff33455a0e382e8a81d14dd7c922020b6b5e7982"
version = "v1.9.1"
[[projects]]
branch = "master"
+ digest = "1:097fe1a8acb060fbbd78abc62c2e2d2a1ec0d24ec620b6a919bd11e75cbf425b"
name = "golang.org/x/crypto"
packages = [
"acme",
@@ -600,24 +783,28 @@
"blowfish",
"ed25519",
"ed25519/internal/edwards25519",
- "ssh/terminal"
+ "ssh/terminal",
]
- revision = "614d502a4dac94afa3a6ce146bd1736da82514c6"
+ pruneopts = "UT"
+ revision = "5295e8364332db77d75fce11f1d19c053919a9c9"
[[projects]]
branch = "master"
+ digest = "1:759e3d3f934e59167dcae65e5270630d0ae1c51d97d3080725dee05146502fa3"
name = "golang.org/x/image"
packages = [
"bmp",
"font",
"math/fixed",
"tiff",
- "tiff/lzw"
+ "tiff/lzw",
]
- revision = "c73c2afc3b812cdd6385de5a50616511c4a3d458"
+ pruneopts = "UT"
+ revision = "991ec62608f3c0da01d400756917825d1e2fd528"
[[projects]]
branch = "master"
+ digest = "1:8d7414cba5388e70dc334e2c938c66d276e7bd56c19c1f914d2e9a3f17db81f7"
name = "golang.org/x/net"
packages = [
"bpf",
@@ -634,21 +821,25 @@
"internal/timeseries",
"ipv4",
"ipv6",
- "trace"
+ "trace",
]
- revision = "faa378e6dbaed88bd8100f8bcf09939375c6e8fa"
+ pruneopts = "UT"
+ revision = "4dfa2610cdf3b287375bbba5b8f2a14d3b01d8de"
[[projects]]
branch = "master"
+ digest = "1:c90c6c71771006dd4c843a1af66f29af3fd7afb4937d2c70097f13f7c2a4a464"
name = "golang.org/x/sys"
packages = [
"cpu",
"unix",
- "windows"
+ "windows",
]
- revision = "4910a1d54f876d7b22162a85f4d066d3ee649450"
+ pruneopts = "UT"
+ revision = "e4b3c5e9061176387e7cea65e4dc5853801f3fb7"
[[projects]]
+ digest = "1:436b24586f8fee329e0dd65fd67c817681420cda1d7f934345c13fe78c212a73"
name = "golang.org/x/text"
packages = [
"collate",
@@ -676,24 +867,30 @@
"unicode/bidi",
"unicode/cldr",
"unicode/norm",
- "unicode/rangetable"
+ "unicode/rangetable",
]
+ pruneopts = "UT"
revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0"
version = "v0.3.0"
[[projects]]
+ digest = "1:c25289f43ac4a68d88b02245742347c94f1e108c534dda442188015ff80669b3"
name = "google.golang.org/appengine"
packages = ["cloudsql"]
- revision = "b1f26356af11148e710935ed1ac8a7f5702c7612"
- version = "v1.1.0"
+ pruneopts = "UT"
+ revision = "ae0ab99deb4dc413a2b4bd6c8bdd0eb67f1e4d06"
+ version = "v1.2.0"
[[projects]]
branch = "master"
+ digest = "1:56b0bca90b7e5d1facf5fbdacba23e4e0ce069d25381b8e2f70ef1e7ebfb9c1a"
name = "google.golang.org/genproto"
packages = ["googleapis/rpc/status"]
- revision = "c66870c02cf823ceb633bcd05be3c7cda29976f4"
+ pruneopts = "UT"
+ revision = "0e822944c569bf5c9afd034adaa56208bd2906ac"
[[projects]]
+ digest = "1:1b6d2676ea895d33cbd1999c75dfc8e25b103c754ccfc66dc06ae845ce3a47bc"
name = "google.golang.org/grpc"
packages = [
".",
@@ -723,54 +920,126 @@
"resolver/passthrough",
"stats",
"status",
- "tap"
+ "tap",
]
- revision = "32fb0ac620c32ba40a4626ddf94d90d12cce3455"
- version = "v1.14.0"
+ pruneopts = "UT"
+ revision = "8dea3dc473e90c8179e519d91302d0597c0ca1d1"
+ version = "v1.15.0"
[[projects]]
branch = "v3"
+ digest = "1:7388652e2215a3f45d341d58766ed58317971030eb1cbd75f005f96ace8e9196"
name = "gopkg.in/alexcesaro/quotedprintable.v3"
packages = ["."]
+ pruneopts = "UT"
revision = "2caba252f4dc53eaf6b553000885530023f54623"
[[projects]]
+ digest = "1:81e1c5cee195fca5de06e2540cb63eea727a850b7e5c213548e7f81521c97a57"
name = "gopkg.in/asn1-ber.v1"
packages = ["."]
+ pruneopts = "UT"
revision = "379148ca0225df7a432012b8df0355c2a2063ac0"
version = "v1.2"
[[projects]]
+ digest = "1:eebd52aee67d9f1e0af1859a584e14b1817581dd5f90d4585418c27b6a93c966"
name = "gopkg.in/gomail.v2"
packages = ["."]
+ pruneopts = "UT"
revision = "41f3572897373c5538c50a2402db15db079fa4fd"
version = "2.0.0"
[[projects]]
+ digest = "1:c805e517269b0ba4c21ded5836019ed7d16953d4026cb7d00041d039c7906be9"
name = "gopkg.in/natefinch/lumberjack.v2"
packages = ["."]
+ pruneopts = "UT"
revision = "a96e63847dc3c67d17befa69c303767e2f84e54f"
version = "v2.1"
[[projects]]
+ digest = "1:a321cc26048fee52d1604ca2509e80f77be291ad073fdbcc5a50fdbcb375ed2f"
name = "gopkg.in/olivere/elastic.v5"
packages = [
".",
"config",
- "uritemplates"
+ "uritemplates",
]
- revision = "d94782c1eadecb8e1d3dcd5f38ba533b66992ff2"
- version = "v5.0.74"
+ pruneopts = "UT"
+ revision = "fc3063a8c0686f64e94f4b2c17eb140c06eb6793"
+ version = "v5.0.76"
[[projects]]
+ digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202"
name = "gopkg.in/yaml.v2"
packages = ["."]
+ pruneopts = "UT"
revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183"
version = "v2.2.1"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
- inputs-digest = "726929919f42dc47011821d1c6eae04af59a385b020f688be2f195c88b395eb5"
+ input-imports = [
+ "github.com/NYTimes/gziphandler",
+ "github.com/avct/uasurfer",
+ "github.com/dgryski/dgoogauth",
+ "github.com/disintegration/imaging",
+ "github.com/dyatlov/go-opengraph/opengraph",
+ "github.com/fsnotify/fsnotify",
+ "github.com/go-ldap/ldap",
+ "github.com/go-redis/redis",
+ "github.com/go-sql-driver/mysql",
+ "github.com/golang/freetype",
+ "github.com/golang/freetype/truetype",
+ "github.com/gorilla/handlers",
+ "github.com/gorilla/mux",
+ "github.com/gorilla/schema",
+ "github.com/gorilla/websocket",
+ "github.com/hako/durafmt",
+ "github.com/hashicorp/go-hclog",
+ "github.com/hashicorp/go-plugin",
+ "github.com/hashicorp/memberlist",
+ "github.com/icrowley/fake",
+ "github.com/jaytaylor/html2text",
+ "github.com/lib/pq",
+ "github.com/mattermost/gorp",
+ "github.com/mattermost/rsc/qr",
+ "github.com/mattermost/viper",
+ "github.com/mattn/go-sqlite3",
+ "github.com/minio/minio-go",
+ "github.com/minio/minio-go/pkg/credentials",
+ "github.com/minio/minio-go/pkg/encrypt",
+ "github.com/nicksnyder/go-i18n/i18n",
+ "github.com/nicksnyder/go-i18n/i18n/bundle",
+ "github.com/nicksnyder/go-i18n/i18n/language",
+ "github.com/nicksnyder/go-i18n/i18n/translation",
+ "github.com/pborman/uuid",
+ "github.com/pkg/errors",
+ "github.com/prometheus/client_golang/prometheus",
+ "github.com/prometheus/client_golang/prometheus/promhttp",
+ "github.com/rs/cors",
+ "github.com/rwcarlsen/goexif/exif",
+ "github.com/segmentio/analytics-go",
+ "github.com/spf13/cobra",
+ "github.com/stretchr/testify/assert",
+ "github.com/stretchr/testify/mock",
+ "github.com/stretchr/testify/require",
+ "github.com/stretchr/testify/suite",
+ "github.com/throttled/throttled",
+ "github.com/throttled/throttled/store/memstore",
+ "github.com/tylerb/graceful",
+ "go.uber.org/zap",
+ "go.uber.org/zap/zapcore",
+ "golang.org/x/crypto/acme/autocert",
+ "golang.org/x/crypto/bcrypt",
+ "golang.org/x/image/bmp",
+ "golang.org/x/net/html/charset",
+ "gopkg.in/gomail.v2",
+ "gopkg.in/natefinch/lumberjack.v2",
+ "gopkg.in/olivere/elastic.v5",
+ "gopkg.in/yaml.v2",
+ ]
solver-name = "gps-cdcl"
solver-version = 1
diff --git a/Gopkg.toml b/Gopkg.toml
index ac916708b..993e374bd 100644
--- a/Gopkg.toml
+++ b/Gopkg.toml
@@ -26,16 +26,6 @@
# To keep us on latest since maintainer stopped releasing versions
[[constraint]]
- name = "github.com/go-sql-driver/mysql"
- branch = "master"
-
-# Constaint to bring us to latest master for bug fixes
-[[constraint]]
- name = "github.com/gorilla/websocket"
- branch = "master"
-
-# To keep us on latest since maintainer stopped releasing versions
-[[constraint]]
name = "github.com/hashicorp/memberlist"
branch = "master"
@@ -58,11 +48,11 @@
# Lock to control when plugins use new versions
[[constraint]]
name = "github.com/hashicorp/go-hclog"
- revision = "69ff559dc25f3b435631604f573a5fa1efdb6433"
+ revision = "e45cbeb79f0411b1cfedd3f226ff69d5d433c762"
[[constraint]]
name = "github.com/hashicorp/go-plugin"
- revision = "e8d22c780116115ae5624720c9af0c97afe4f551"
+ revision = "a4620f9913d19f03a6bf19b2f304daaaf83ea130"
[prune]
go-tests = true
diff --git a/plugin/hclog_adapter.go b/plugin/hclog_adapter.go
index 64b1e5243..3d90d456e 100644
--- a/plugin/hclog_adapter.go
+++ b/plugin/hclog_adapter.go
@@ -97,3 +97,5 @@ func (h *hclogAdapter) ResetNamed(name string) hclog.Logger {
func (h *hclogAdapter) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger {
return h.wrappedLogger.StdLog()
}
+
+func (h *hclogAdapter) SetLevel(hclog.Level) {}
diff --git a/vendor/github.com/avct/uasurfer/.travis.yml b/vendor/github.com/avct/uasurfer/.travis.yml
index 77b64e6f2..2aef4320a 100644
--- a/vendor/github.com/avct/uasurfer/.travis.yml
+++ b/vendor/github.com/avct/uasurfer/.travis.yml
@@ -5,7 +5,6 @@ language: go
go:
- 1.9.x
- 1.8.x
- - 1.7.x
script:
- go test
diff --git a/vendor/github.com/go-redis/redis/command.go b/vendor/github.com/go-redis/redis/command.go
index ca44d7c8b..05dd6755a 100644
--- a/vendor/github.com/go-redis/redis/command.go
+++ b/vendor/github.com/go-redis/redis/command.go
@@ -183,7 +183,7 @@ func (cmd *Cmd) Int() (int, error) {
case string:
return strconv.Atoi(val)
default:
- err := fmt.Errorf("redis: unexpected type=%T for Int64", val)
+ err := fmt.Errorf("redis: unexpected type=%T for Int", val)
return 0, err
}
}
diff --git a/vendor/github.com/go-redis/redis/commands.go b/vendor/github.com/go-redis/redis/commands.go
index b259e3a8c..9954cab18 100644
--- a/vendor/github.com/go-redis/redis/commands.go
+++ b/vendor/github.com/go-redis/redis/commands.go
@@ -206,6 +206,8 @@ type Cmdable interface {
ZLexCount(key, min, max string) *IntCmd
ZIncrBy(key string, increment float64, member string) *FloatCmd
ZInterStore(destination string, store ZStore, keys ...string) *IntCmd
+ ZPopMax(key string, count ...int64) *ZSliceCmd
+ ZPopMin(key string, count ...int64) *ZSliceCmd
ZRange(key string, start, stop int64) *StringSliceCmd
ZRangeWithScores(key string, start, stop int64) *ZSliceCmd
ZRangeByScore(key string, opt ZRangeBy) *StringSliceCmd
@@ -1694,6 +1696,46 @@ func (c *cmdable) ZInterStore(destination string, store ZStore, keys ...string)
return cmd
}
+func (c *cmdable) ZPopMax(key string, count ...int64) *ZSliceCmd {
+ args := []interface{}{
+ "zpopmax",
+ key,
+ }
+
+ switch len(count) {
+ case 0:
+ break
+ case 1:
+ args = append(args, count[0])
+ default:
+ panic("too many arguments")
+ }
+
+ cmd := NewZSliceCmd(args...)
+ c.process(cmd)
+ return cmd
+}
+
+func (c *cmdable) ZPopMin(key string, count ...int64) *ZSliceCmd {
+ args := []interface{}{
+ "zpopmin",
+ key,
+ }
+
+ switch len(count) {
+ case 0:
+ break
+ case 1:
+ args = append(args, count[0])
+ default:
+ panic("too many arguments")
+ }
+
+ cmd := NewZSliceCmd(args...)
+ c.process(cmd)
+ return cmd
+}
+
func (c *cmdable) zRange(key string, start, stop int64, withScores bool) *StringSliceCmd {
args := []interface{}{
"zrange",
diff --git a/vendor/github.com/go-sql-driver/mysql/.travis.yml b/vendor/github.com/go-sql-driver/mysql/.travis.yml
index 47dd289a0..cc1268c36 100644
--- a/vendor/github.com/go-sql-driver/mysql/.travis.yml
+++ b/vendor/github.com/go-sql-driver/mysql/.travis.yml
@@ -1,6 +1,7 @@
sudo: false
language: go
go:
+ - 1.7.x
- 1.8.x
- 1.9.x
- 1.10.x
diff --git a/vendor/github.com/go-sql-driver/mysql/AUTHORS b/vendor/github.com/go-sql-driver/mysql/AUTHORS
index fbe4ec442..73ff68fbc 100644
--- a/vendor/github.com/go-sql-driver/mysql/AUTHORS
+++ b/vendor/github.com/go-sql-driver/mysql/AUTHORS
@@ -72,7 +72,6 @@ Shuode Li <elemount at qq.com>
Soroush Pour <me at soroushjp.com>
Stan Putrya <root.vagner at gmail.com>
Stanley Gunawan <gunawan.stanley at gmail.com>
-Thomas Wodarek <wodarekwebpage at gmail.com>
Xiangyu Hu <xiangyu.hu at outlook.com>
Xiaobing Jiang <s7v7nislands at gmail.com>
Xiuming Chen <cc at cxm.cc>
diff --git a/vendor/github.com/go-sql-driver/mysql/README.md b/vendor/github.com/go-sql-driver/mysql/README.md
index 7e7df1a3d..2e9b07eeb 100644
--- a/vendor/github.com/go-sql-driver/mysql/README.md
+++ b/vendor/github.com/go-sql-driver/mysql/README.md
@@ -40,7 +40,7 @@ A MySQL-Driver for Go's [database/sql](https://golang.org/pkg/database/sql/) pac
* Optional placeholder interpolation
## Requirements
- * Go 1.8 or higher. We aim to support the 3 latest versions of Go.
+ * Go 1.7 or higher. We aim to support the 3 latest versions of Go.
* MySQL (4.1+), MariaDB, Percona Server, Google CloudSQL or Sphinx (2.2.3+)
---------------------------------------
diff --git a/vendor/github.com/go-sql-driver/mysql/auth.go b/vendor/github.com/go-sql-driver/mysql/auth.go
index 2f61ecd4f..0b59f52ee 100644
--- a/vendor/github.com/go-sql-driver/mysql/auth.go
+++ b/vendor/github.com/go-sql-driver/mysql/auth.go
@@ -241,7 +241,7 @@ func (mc *mysqlConn) auth(authData []byte, plugin string) ([]byte, bool, error)
switch plugin {
case "caching_sha2_password":
authResp := scrambleSHA256Password(authData, mc.cfg.Passwd)
- return authResp, false, nil
+ return authResp, (authResp == nil), nil
case "mysql_old_password":
if !mc.cfg.AllowOldPasswords {
diff --git a/vendor/github.com/go-sql-driver/mysql/connection.go b/vendor/github.com/go-sql-driver/mysql/connection.go
index 911be2060..e57061412 100644
--- a/vendor/github.com/go-sql-driver/mysql/connection.go
+++ b/vendor/github.com/go-sql-driver/mysql/connection.go
@@ -9,8 +9,6 @@
package mysql
import (
- "context"
- "database/sql"
"database/sql/driver"
"io"
"net"
@@ -461,194 +459,3 @@ func (mc *mysqlConn) finish() {
case <-mc.closech:
}
}
-
-// Ping implements driver.Pinger interface
-func (mc *mysqlConn) Ping(ctx context.Context) (err error) {
- if mc.closed.IsSet() {
- errLog.Print(ErrInvalidConn)
- return driver.ErrBadConn
- }
-
- if err = mc.watchCancel(ctx); err != nil {
- return
- }
- defer mc.finish()
-
- if err = mc.writeCommandPacket(comPing); err != nil {
- return
- }
-
- return mc.readResultOK()
-}
-
-// BeginTx implements driver.ConnBeginTx interface
-func (mc *mysqlConn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) {
- if err := mc.watchCancel(ctx); err != nil {
- return nil, err
- }
- defer mc.finish()
-
- if sql.IsolationLevel(opts.Isolation) != sql.LevelDefault {
- level, err := mapIsolationLevel(opts.Isolation)
- if err != nil {
- return nil, err
- }
- err = mc.exec("SET TRANSACTION ISOLATION LEVEL " + level)
- if err != nil {
- return nil, err
- }
- }
-
- return mc.begin(opts.ReadOnly)
-}
-
-func (mc *mysqlConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {
- dargs, err := namedValueToValue(args)
- if err != nil {
- return nil, err
- }
-
- if err := mc.watchCancel(ctx); err != nil {
- return nil, err
- }
-
- rows, err := mc.query(query, dargs)
- if err != nil {
- mc.finish()
- return nil, err
- }
- rows.finish = mc.finish
- return rows, err
-}
-
-func (mc *mysqlConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) {
- dargs, err := namedValueToValue(args)
- if err != nil {
- return nil, err
- }
-
- if err := mc.watchCancel(ctx); err != nil {
- return nil, err
- }
- defer mc.finish()
-
- return mc.Exec(query, dargs)
-}
-
-func (mc *mysqlConn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) {
- if err := mc.watchCancel(ctx); err != nil {
- return nil, err
- }
-
- stmt, err := mc.Prepare(query)
- mc.finish()
- if err != nil {
- return nil, err
- }
-
- select {
- default:
- case <-ctx.Done():
- stmt.Close()
- return nil, ctx.Err()
- }
- return stmt, nil
-}
-
-func (stmt *mysqlStmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) {
- dargs, err := namedValueToValue(args)
- if err != nil {
- return nil, err
- }
-
- if err := stmt.mc.watchCancel(ctx); err != nil {
- return nil, err
- }
-
- rows, err := stmt.query(dargs)
- if err != nil {
- stmt.mc.finish()
- return nil, err
- }
- rows.finish = stmt.mc.finish
- return rows, err
-}
-
-func (stmt *mysqlStmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) {
- dargs, err := namedValueToValue(args)
- if err != nil {
- return nil, err
- }
-
- if err := stmt.mc.watchCancel(ctx); err != nil {
- return nil, err
- }
- defer stmt.mc.finish()
-
- return stmt.Exec(dargs)
-}
-
-func (mc *mysqlConn) watchCancel(ctx context.Context) error {
- if mc.watching {
- // Reach here if canceled,
- // so the connection is already invalid
- mc.cleanup()
- return nil
- }
- if ctx.Done() == nil {
- return nil
- }
-
- mc.watching = true
- select {
- default:
- case <-ctx.Done():
- return ctx.Err()
- }
- if mc.watcher == nil {
- return nil
- }
-
- mc.watcher <- ctx
-
- return nil
-}
-
-func (mc *mysqlConn) startWatcher() {
- watcher := make(chan mysqlContext, 1)
- mc.watcher = watcher
- finished := make(chan struct{})
- mc.finished = finished
- go func() {
- for {
- var ctx mysqlContext
- select {
- case ctx = <-watcher:
- case <-mc.closech:
- return
- }
-
- select {
- case <-ctx.Done():
- mc.cancel(ctx.Err())
- case <-finished:
- case <-mc.closech:
- return
- }
- }
- }()
-}
-
-func (mc *mysqlConn) CheckNamedValue(nv *driver.NamedValue) (err error) {
- nv.Value, err = converter{}.ConvertValue(nv.Value)
- return
-}
-
-// ResetSession implements driver.SessionResetter.
-// (From Go 1.10)
-func (mc *mysqlConn) ResetSession(ctx context.Context) error {
- if mc.closed.IsSet() {
- return driver.ErrBadConn
- }
- return nil
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/connection_go18.go b/vendor/github.com/go-sql-driver/mysql/connection_go18.go
new file mode 100644
index 000000000..62796bfce
--- /dev/null
+++ b/vendor/github.com/go-sql-driver/mysql/connection_go18.go
@@ -0,0 +1,208 @@
+// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
+//
+// Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this file,
+// You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// +build go1.8
+
+package mysql
+
+import (
+ "context"
+ "database/sql"
+ "database/sql/driver"
+)
+
+// Ping implements driver.Pinger interface
+func (mc *mysqlConn) Ping(ctx context.Context) (err error) {
+ if mc.closed.IsSet() {
+ errLog.Print(ErrInvalidConn)
+ return driver.ErrBadConn
+ }
+
+ if err = mc.watchCancel(ctx); err != nil {
+ return
+ }
+ defer mc.finish()
+
+ if err = mc.writeCommandPacket(comPing); err != nil {
+ return
+ }
+
+ return mc.readResultOK()
+}
+
+// BeginTx implements driver.ConnBeginTx interface
+func (mc *mysqlConn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) {
+ if err := mc.watchCancel(ctx); err != nil {
+ return nil, err
+ }
+ defer mc.finish()
+
+ if sql.IsolationLevel(opts.Isolation) != sql.LevelDefault {
+ level, err := mapIsolationLevel(opts.Isolation)
+ if err != nil {
+ return nil, err
+ }
+ err = mc.exec("SET TRANSACTION ISOLATION LEVEL " + level)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ return mc.begin(opts.ReadOnly)
+}
+
+func (mc *mysqlConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {
+ dargs, err := namedValueToValue(args)
+ if err != nil {
+ return nil, err
+ }
+
+ if err := mc.watchCancel(ctx); err != nil {
+ return nil, err
+ }
+
+ rows, err := mc.query(query, dargs)
+ if err != nil {
+ mc.finish()
+ return nil, err
+ }
+ rows.finish = mc.finish
+ return rows, err
+}
+
+func (mc *mysqlConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) {
+ dargs, err := namedValueToValue(args)
+ if err != nil {
+ return nil, err
+ }
+
+ if err := mc.watchCancel(ctx); err != nil {
+ return nil, err
+ }
+ defer mc.finish()
+
+ return mc.Exec(query, dargs)
+}
+
+func (mc *mysqlConn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) {
+ if err := mc.watchCancel(ctx); err != nil {
+ return nil, err
+ }
+
+ stmt, err := mc.Prepare(query)
+ mc.finish()
+ if err != nil {
+ return nil, err
+ }
+
+ select {
+ default:
+ case <-ctx.Done():
+ stmt.Close()
+ return nil, ctx.Err()
+ }
+ return stmt, nil
+}
+
+func (stmt *mysqlStmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) {
+ dargs, err := namedValueToValue(args)
+ if err != nil {
+ return nil, err
+ }
+
+ if err := stmt.mc.watchCancel(ctx); err != nil {
+ return nil, err
+ }
+
+ rows, err := stmt.query(dargs)
+ if err != nil {
+ stmt.mc.finish()
+ return nil, err
+ }
+ rows.finish = stmt.mc.finish
+ return rows, err
+}
+
+func (stmt *mysqlStmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) {
+ dargs, err := namedValueToValue(args)
+ if err != nil {
+ return nil, err
+ }
+
+ if err := stmt.mc.watchCancel(ctx); err != nil {
+ return nil, err
+ }
+ defer stmt.mc.finish()
+
+ return stmt.Exec(dargs)
+}
+
+func (mc *mysqlConn) watchCancel(ctx context.Context) error {
+ if mc.watching {
+ // Reach here if canceled,
+ // so the connection is already invalid
+ mc.cleanup()
+ return nil
+ }
+ if ctx.Done() == nil {
+ return nil
+ }
+
+ mc.watching = true
+ select {
+ default:
+ case <-ctx.Done():
+ return ctx.Err()
+ }
+ if mc.watcher == nil {
+ return nil
+ }
+
+ mc.watcher <- ctx
+
+ return nil
+}
+
+func (mc *mysqlConn) startWatcher() {
+ watcher := make(chan mysqlContext, 1)
+ mc.watcher = watcher
+ finished := make(chan struct{})
+ mc.finished = finished
+ go func() {
+ for {
+ var ctx mysqlContext
+ select {
+ case ctx = <-watcher:
+ case <-mc.closech:
+ return
+ }
+
+ select {
+ case <-ctx.Done():
+ mc.cancel(ctx.Err())
+ case <-finished:
+ case <-mc.closech:
+ return
+ }
+ }
+ }()
+}
+
+func (mc *mysqlConn) CheckNamedValue(nv *driver.NamedValue) (err error) {
+ nv.Value, err = converter{}.ConvertValue(nv.Value)
+ return
+}
+
+// ResetSession implements driver.SessionResetter.
+// (From Go 1.10)
+func (mc *mysqlConn) ResetSession(ctx context.Context) error {
+ if mc.closed.IsSet() {
+ return driver.ErrBadConn
+ }
+ return nil
+}
diff --git a/vendor/github.com/go-sql-driver/mysql/driver.go b/vendor/github.com/go-sql-driver/mysql/driver.go
index ba1297825..1a75a16ec 100644
--- a/vendor/github.com/go-sql-driver/mysql/driver.go
+++ b/vendor/github.com/go-sql-driver/mysql/driver.go
@@ -23,6 +23,11 @@ import (
"sync"
)
+// watcher interface is used for context support (From Go 1.8)
+type watcher interface {
+ startWatcher()
+}
+
// MySQLDriver is exported to make the driver directly accessible.
// In general the driver is used via the database/sql package.
type MySQLDriver struct{}
@@ -91,7 +96,9 @@ func (d MySQLDriver) Open(dsn string) (driver.Conn, error) {
}
// Call startWatcher for context support (From Go 1.8)
- mc.startWatcher()
+ if s, ok := interface{}(mc).(watcher); ok {
+ s.startWatcher()
+ }
mc.buf = newBuffer(mc.netConn)
@@ -105,9 +112,6 @@ func (d MySQLDriver) Open(dsn string) (driver.Conn, error) {
mc.cleanup()
return nil, err
}
- if plugin == "" {
- plugin = defaultAuthPlugin
- }
// Send Client Authentication Packet
authResp, addNUL, err := mc.auth(authData, plugin)
diff --git a/vendor/github.com/go-sql-driver/mysql/packets.go b/vendor/github.com/go-sql-driver/mysql/packets.go
index 170aaa02b..d873a97b2 100644
--- a/vendor/github.com/go-sql-driver/mysql/packets.go
+++ b/vendor/github.com/go-sql-driver/mysql/packets.go
@@ -154,15 +154,15 @@ func (mc *mysqlConn) writePacket(data []byte) error {
// Handshake Initialization Packet
// http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::Handshake
-func (mc *mysqlConn) readHandshakePacket() (data []byte, plugin string, err error) {
- data, err = mc.readPacket()
+func (mc *mysqlConn) readHandshakePacket() ([]byte, string, error) {
+ data, err := mc.readPacket()
if err != nil {
// for init we can rewrite this to ErrBadConn for sql.Driver to retry, since
// in connection initialization we don't risk retrying non-idempotent actions.
if err == ErrInvalidConn {
return nil, "", driver.ErrBadConn
}
- return
+ return nil, "", err
}
if data[0] == iERR {
@@ -198,6 +198,7 @@ func (mc *mysqlConn) readHandshakePacket() (data []byte, plugin string, err erro
}
pos += 2
+ plugin := ""
if len(data) > pos {
// character set [1 byte]
// status flags [2 bytes]
@@ -235,6 +236,8 @@ func (mc *mysqlConn) readHandshakePacket() (data []byte, plugin string, err erro
return b[:], plugin, nil
}
+ plugin = defaultAuthPlugin
+
// make a memory safe copy of the cipher slice
var b [8]byte
copy(b[:], authData)
@@ -1258,7 +1261,7 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
rows.rs.columns[i].decimals,
)
}
- dest[i], err = formatBinaryTime(data[pos:pos+int(num)], dstlen)
+ dest[i], err = formatBinaryDateTime(data[pos:pos+int(num)], dstlen, true)
case rows.mc.parseTime:
dest[i], err = parseBinaryDateTime(num, data[pos:], rows.mc.cfg.Loc)
default:
@@ -1278,7 +1281,7 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
)
}
}
- dest[i], err = formatBinaryDateTime(data[pos:pos+int(num)], dstlen)
+ dest[i], err = formatBinaryDateTime(data[pos:pos+int(num)], dstlen, false)
}
if err == nil {
diff --git a/vendor/github.com/go-sql-driver/mysql/utils.go b/vendor/github.com/go-sql-driver/mysql/utils.go
index cb3650bb9..84d595b6b 100644
--- a/vendor/github.com/go-sql-driver/mysql/utils.go
+++ b/vendor/github.com/go-sql-driver/mysql/utils.go
@@ -10,13 +10,10 @@ package mysql
import (
"crypto/tls"
- "database/sql"
"database/sql/driver"
"encoding/binary"
- "errors"
"fmt"
"io"
- "strconv"
"strings"
"sync"
"sync/atomic"
@@ -82,7 +79,7 @@ func DeregisterTLSConfig(key string) {
func getTLSConfigClone(key string) (config *tls.Config) {
tlsConfigLock.RLock()
if v, ok := tlsConfigRegistry[key]; ok {
- config = v.Clone()
+ config = cloneTLSConfig(v)
}
tlsConfigLock.RUnlock()
return
@@ -230,154 +227,139 @@ var zeroDateTime = []byte("0000-00-00 00:00:00.000000")
const digits01 = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"
const digits10 = "0000000000111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999"
-func appendMicrosecs(dst, src []byte, decimals int) []byte {
- if decimals <= 0 {
- return dst
+func formatBinaryDateTime(src []byte, length uint8, justTime bool) (driver.Value, error) {
+ // length expects the deterministic length of the zero value,
+ // negative time and 100+ hours are automatically added if needed
+ if len(src) == 0 {
+ if justTime {
+ return zeroDateTime[11 : 11+length], nil
+ }
+ return zeroDateTime[:length], nil
}
+ var dst []byte // return value
+ var pt, p1, p2, p3 byte // current digit pair
+ var zOffs byte // offset of value in zeroDateTime
+ if justTime {
+ switch length {
+ case
+ 8, // time (can be up to 10 when negative and 100+ hours)
+ 10, 11, 12, 13, 14, 15: // time with fractional seconds
+ default:
+ return nil, fmt.Errorf("illegal TIME length %d", length)
+ }
+ switch len(src) {
+ case 8, 12:
+ default:
+ return nil, fmt.Errorf("invalid TIME packet length %d", len(src))
+ }
+ // +2 to enable negative time and 100+ hours
+ dst = make([]byte, 0, length+2)
+ if src[0] == 1 {
+ dst = append(dst, '-')
+ }
+ if src[1] != 0 {
+ hour := uint16(src[1])*24 + uint16(src[5])
+ pt = byte(hour / 100)
+ p1 = byte(hour - 100*uint16(pt))
+ dst = append(dst, digits01[pt])
+ } else {
+ p1 = src[5]
+ }
+ zOffs = 11
+ src = src[6:]
+ } else {
+ switch length {
+ case 10, 19, 21, 22, 23, 24, 25, 26:
+ default:
+ t := "DATE"
+ if length > 10 {
+ t += "TIME"
+ }
+ return nil, fmt.Errorf("illegal %s length %d", t, length)
+ }
+ switch len(src) {
+ case 4, 7, 11:
+ default:
+ t := "DATE"
+ if length > 10 {
+ t += "TIME"
+ }
+ return nil, fmt.Errorf("illegal %s packet length %d", t, len(src))
+ }
+ dst = make([]byte, 0, length)
+ // start with the date
+ year := binary.LittleEndian.Uint16(src[:2])
+ pt = byte(year / 100)
+ p1 = byte(year - 100*uint16(pt))
+ p2, p3 = src[2], src[3]
+ dst = append(dst,
+ digits10[pt], digits01[pt],
+ digits10[p1], digits01[p1], '-',
+ digits10[p2], digits01[p2], '-',
+ digits10[p3], digits01[p3],
+ )
+ if length == 10 {
+ return dst, nil
+ }
+ if len(src) == 4 {
+ return append(dst, zeroDateTime[10:length]...), nil
+ }
+ dst = append(dst, ' ')
+ p1 = src[4] // hour
+ src = src[5:]
+ }
+ // p1 is 2-digit hour, src is after hour
+ p2, p3 = src[0], src[1]
+ dst = append(dst,
+ digits10[p1], digits01[p1], ':',
+ digits10[p2], digits01[p2], ':',
+ digits10[p3], digits01[p3],
+ )
+ if length <= byte(len(dst)) {
+ return dst, nil
+ }
+ src = src[2:]
if len(src) == 0 {
- return append(dst, ".000000"[:decimals+1]...)
+ return append(dst, zeroDateTime[19:zOffs+length]...), nil
}
-
microsecs := binary.LittleEndian.Uint32(src[:4])
- p1 := byte(microsecs / 10000)
+ p1 = byte(microsecs / 10000)
microsecs -= 10000 * uint32(p1)
- p2 := byte(microsecs / 100)
+ p2 = byte(microsecs / 100)
microsecs -= 100 * uint32(p2)
- p3 := byte(microsecs)
-
- switch decimals {
+ p3 = byte(microsecs)
+ switch decimals := zOffs + length - 20; decimals {
default:
return append(dst, '.',
digits10[p1], digits01[p1],
digits10[p2], digits01[p2],
digits10[p3], digits01[p3],
- )
+ ), nil
case 1:
return append(dst, '.',
digits10[p1],
- )
+ ), nil
case 2:
return append(dst, '.',
digits10[p1], digits01[p1],
- )
+ ), nil
case 3:
return append(dst, '.',
digits10[p1], digits01[p1],
digits10[p2],
- )
+ ), nil
case 4:
return append(dst, '.',
digits10[p1], digits01[p1],
digits10[p2], digits01[p2],
- )
+ ), nil
case 5:
return append(dst, '.',
digits10[p1], digits01[p1],
digits10[p2], digits01[p2],
digits10[p3],
- )
- }
-}
-
-func formatBinaryDateTime(src []byte, length uint8) (driver.Value, error) {
- // length expects the deterministic length of the zero value,
- // negative time and 100+ hours are automatically added if needed
- if len(src) == 0 {
- return zeroDateTime[:length], nil
- }
- var dst []byte // return value
- var p1, p2, p3 byte // current digit pair
-
- switch length {
- case 10, 19, 21, 22, 23, 24, 25, 26:
- default:
- t := "DATE"
- if length > 10 {
- t += "TIME"
- }
- return nil, fmt.Errorf("illegal %s length %d", t, length)
- }
- switch len(src) {
- case 4, 7, 11:
- default:
- t := "DATE"
- if length > 10 {
- t += "TIME"
- }
- return nil, fmt.Errorf("illegal %s packet length %d", t, len(src))
- }
- dst = make([]byte, 0, length)
- // start with the date
- year := binary.LittleEndian.Uint16(src[:2])
- pt := year / 100
- p1 = byte(year - 100*uint16(pt))
- p2, p3 = src[2], src[3]
- dst = append(dst,
- digits10[pt], digits01[pt],
- digits10[p1], digits01[p1], '-',
- digits10[p2], digits01[p2], '-',
- digits10[p3], digits01[p3],
- )
- if length == 10 {
- return dst, nil
- }
- if len(src) == 4 {
- return append(dst, zeroDateTime[10:length]...), nil
- }
- dst = append(dst, ' ')
- p1 = src[4] // hour
- src = src[5:]
-
- // p1 is 2-digit hour, src is after hour
- p2, p3 = src[0], src[1]
- dst = append(dst,
- digits10[p1], digits01[p1], ':',
- digits10[p2], digits01[p2], ':',
- digits10[p3], digits01[p3],
- )
- return appendMicrosecs(dst, src[2:], int(length)-20), nil
-}
-
-func formatBinaryTime(src []byte, length uint8) (driver.Value, error) {
- // length expects the deterministic length of the zero value,
- // negative time and 100+ hours are automatically added if needed
- if len(src) == 0 {
- return zeroDateTime[11 : 11+length], nil
- }
- var dst []byte // return value
-
- switch length {
- case
- 8, // time (can be up to 10 when negative and 100+ hours)
- 10, 11, 12, 13, 14, 15: // time with fractional seconds
- default:
- return nil, fmt.Errorf("illegal TIME length %d", length)
- }
- switch len(src) {
- case 8, 12:
- default:
- return nil, fmt.Errorf("invalid TIME packet length %d", len(src))
- }
- // +2 to enable negative time and 100+ hours
- dst = make([]byte, 0, length+2)
- if src[0] == 1 {
- dst = append(dst, '-')
- }
- days := binary.LittleEndian.Uint32(src[1:5])
- hours := int64(days)*24 + int64(src[5])
-
- if hours >= 100 {
- dst = strconv.AppendInt(dst, hours, 10)
- } else {
- dst = append(dst, digits10[hours], digits01[hours])
+ ), nil
}
-
- min, sec := src[6], src[7]
- dst = append(dst, ':',
- digits10[min], digits01[min], ':',
- digits10[sec], digits01[sec],
- )
- return appendMicrosecs(dst, src[8:], int(length)-9), nil
}
/******************************************************************************
@@ -726,30 +708,3 @@ func (ae *atomicError) Value() error {
}
return nil
}
-
-func namedValueToValue(named []driver.NamedValue) ([]driver.Value, error) {
- dargs := make([]driver.Value, len(named))
- for n, param := range named {
- if len(param.Name) > 0 {
- // TODO: support the use of Named Parameters #561
- return nil, errors.New("mysql: driver does not support the use of Named Parameters")
- }
- dargs[n] = param.Value
- }
- return dargs, nil
-}
-
-func mapIsolationLevel(level driver.IsolationLevel) (string, error) {
- switch sql.IsolationLevel(level) {
- case sql.LevelRepeatableRead:
- return "REPEATABLE READ", nil
- case sql.LevelReadCommitted:
- return "READ COMMITTED", nil
- case sql.LevelReadUncommitted:
- return "READ UNCOMMITTED", nil
- case sql.LevelSerializable:
- return "SERIALIZABLE", nil
- default:
- return "", fmt.Errorf("mysql: unsupported isolation level: %v", level)
- }
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/utils_go17.go b/vendor/github.com/go-sql-driver/mysql/utils_go17.go
new file mode 100644
index 000000000..f59563456
--- /dev/null
+++ b/vendor/github.com/go-sql-driver/mysql/utils_go17.go
@@ -0,0 +1,40 @@
+// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
+//
+// Copyright 2017 The Go-MySQL-Driver Authors. All rights reserved.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this file,
+// You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// +build go1.7
+// +build !go1.8
+
+package mysql
+
+import "crypto/tls"
+
+func cloneTLSConfig(c *tls.Config) *tls.Config {
+ return &tls.Config{
+ Rand: c.Rand,
+ Time: c.Time,
+ Certificates: c.Certificates,
+ NameToCertificate: c.NameToCertificate,
+ GetCertificate: c.GetCertificate,
+ RootCAs: c.RootCAs,
+ NextProtos: c.NextProtos,
+ ServerName: c.ServerName,
+ ClientAuth: c.ClientAuth,
+ ClientCAs: c.ClientCAs,
+ InsecureSkipVerify: c.InsecureSkipVerify,
+ CipherSuites: c.CipherSuites,
+ PreferServerCipherSuites: c.PreferServerCipherSuites,
+ SessionTicketsDisabled: c.SessionTicketsDisabled,
+ SessionTicketKey: c.SessionTicketKey,
+ ClientSessionCache: c.ClientSessionCache,
+ MinVersion: c.MinVersion,
+ MaxVersion: c.MaxVersion,
+ CurvePreferences: c.CurvePreferences,
+ DynamicRecordSizingDisabled: c.DynamicRecordSizingDisabled,
+ Renegotiation: c.Renegotiation,
+ }
+}
diff --git a/vendor/github.com/go-sql-driver/mysql/utils_go18.go b/vendor/github.com/go-sql-driver/mysql/utils_go18.go
new file mode 100644
index 000000000..c35c2a6aa
--- /dev/null
+++ b/vendor/github.com/go-sql-driver/mysql/utils_go18.go
@@ -0,0 +1,50 @@
+// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
+//
+// Copyright 2017 The Go-MySQL-Driver Authors. All rights reserved.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this file,
+// You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// +build go1.8
+
+package mysql
+
+import (
+ "crypto/tls"
+ "database/sql"
+ "database/sql/driver"
+ "errors"
+ "fmt"
+)
+
+func cloneTLSConfig(c *tls.Config) *tls.Config {
+ return c.Clone()
+}
+
+func namedValueToValue(named []driver.NamedValue) ([]driver.Value, error) {
+ dargs := make([]driver.Value, len(named))
+ for n, param := range named {
+ if len(param.Name) > 0 {
+ // TODO: support the use of Named Parameters #561
+ return nil, errors.New("mysql: driver does not support the use of Named Parameters")
+ }
+ dargs[n] = param.Value
+ }
+ return dargs, nil
+}
+
+func mapIsolationLevel(level driver.IsolationLevel) (string, error) {
+ switch sql.IsolationLevel(level) {
+ case sql.LevelRepeatableRead:
+ return "REPEATABLE READ", nil
+ case sql.LevelReadCommitted:
+ return "READ COMMITTED", nil
+ case sql.LevelReadUncommitted:
+ return "READ UNCOMMITTED", nil
+ case sql.LevelSerializable:
+ return "SERIALIZABLE", nil
+ default:
+ return "", fmt.Errorf("mysql: unsupported isolation level: %v", level)
+ }
+}
diff --git a/vendor/github.com/google/uuid/.travis.yml b/vendor/github.com/google/uuid/.travis.yml
new file mode 100644
index 000000000..d8156a60b
--- /dev/null
+++ b/vendor/github.com/google/uuid/.travis.yml
@@ -0,0 +1,9 @@
+language: go
+
+go:
+ - 1.4.3
+ - 1.5.3
+ - tip
+
+script:
+ - go test -v ./...
diff --git a/vendor/github.com/google/uuid/CONTRIBUTING.md b/vendor/github.com/google/uuid/CONTRIBUTING.md
new file mode 100644
index 000000000..04fdf09f1
--- /dev/null
+++ b/vendor/github.com/google/uuid/CONTRIBUTING.md
@@ -0,0 +1,10 @@
+# How to contribute
+
+We definitely welcome patches and contribution to this project!
+
+### Legal requirements
+
+In order to protect both you and ourselves, you will need to sign the
+[Contributor License Agreement](https://cla.developers.google.com/clas).
+
+You may have already signed it for other Google projects.
diff --git a/vendor/github.com/google/uuid/CONTRIBUTORS b/vendor/github.com/google/uuid/CONTRIBUTORS
new file mode 100644
index 000000000..b4bb97f6b
--- /dev/null
+++ b/vendor/github.com/google/uuid/CONTRIBUTORS
@@ -0,0 +1,9 @@
+Paul Borman <borman@google.com>
+bmatsuo
+shawnps
+theory
+jboverfelt
+dsymonds
+cd1
+wallclockbuilder
+dansouza
diff --git a/vendor/github.com/google/uuid/LICENSE b/vendor/github.com/google/uuid/LICENSE
new file mode 100644
index 000000000..5dc68268d
--- /dev/null
+++ b/vendor/github.com/google/uuid/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2009,2014 Google Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/google/uuid/README.md b/vendor/github.com/google/uuid/README.md
new file mode 100644
index 000000000..9d92c11f1
--- /dev/null
+++ b/vendor/github.com/google/uuid/README.md
@@ -0,0 +1,19 @@
+# uuid ![build status](https://travis-ci.org/google/uuid.svg?branch=master)
+The uuid package generates and inspects UUIDs based on
+[RFC 4122](http://tools.ietf.org/html/rfc4122)
+and DCE 1.1: Authentication and Security Services.
+
+This package is based on the github.com/pborman/uuid package (previously named
+code.google.com/p/go-uuid). It differs from these earlier packages in that
+a UUID is a 16 byte array rather than a byte slice. One loss due to this
+change is the ability to represent an invalid UUID (vs a NIL UUID).
+
+###### Install
+`go get github.com/google/uuid`
+
+###### Documentation
+[![GoDoc](https://godoc.org/github.com/google/uuid?status.svg)](http://godoc.org/github.com/google/uuid)
+
+Full `go doc` style documentation for the package can be viewed online without
+installing this package by using the GoDoc site here:
+http://godoc.org/github.com/google/uuid
diff --git a/vendor/github.com/google/uuid/dce.go b/vendor/github.com/google/uuid/dce.go
new file mode 100644
index 000000000..fa820b9d3
--- /dev/null
+++ b/vendor/github.com/google/uuid/dce.go
@@ -0,0 +1,80 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "encoding/binary"
+ "fmt"
+ "os"
+)
+
+// A Domain represents a Version 2 domain
+type Domain byte
+
+// Domain constants for DCE Security (Version 2) UUIDs.
+const (
+ Person = Domain(0)
+ Group = Domain(1)
+ Org = Domain(2)
+)
+
+// NewDCESecurity returns a DCE Security (Version 2) UUID.
+//
+// The domain should be one of Person, Group or Org.
+// On a POSIX system the id should be the users UID for the Person
+// domain and the users GID for the Group. The meaning of id for
+// the domain Org or on non-POSIX systems is site defined.
+//
+// For a given domain/id pair the same token may be returned for up to
+// 7 minutes and 10 seconds.
+func NewDCESecurity(domain Domain, id uint32) (UUID, error) {
+ uuid, err := NewUUID()
+ if err == nil {
+ uuid[6] = (uuid[6] & 0x0f) | 0x20 // Version 2
+ uuid[9] = byte(domain)
+ binary.BigEndian.PutUint32(uuid[0:], id)
+ }
+ return uuid, err
+}
+
+// NewDCEPerson returns a DCE Security (Version 2) UUID in the person
+// domain with the id returned by os.Getuid.
+//
+// NewDCESecurity(Person, uint32(os.Getuid()))
+func NewDCEPerson() (UUID, error) {
+ return NewDCESecurity(Person, uint32(os.Getuid()))
+}
+
+// NewDCEGroup returns a DCE Security (Version 2) UUID in the group
+// domain with the id returned by os.Getgid.
+//
+// NewDCESecurity(Group, uint32(os.Getgid()))
+func NewDCEGroup() (UUID, error) {
+ return NewDCESecurity(Group, uint32(os.Getgid()))
+}
+
+// Domain returns the domain for a Version 2 UUID. Domains are only defined
+// for Version 2 UUIDs.
+func (uuid UUID) Domain() Domain {
+ return Domain(uuid[9])
+}
+
+// ID returns the id for a Version 2 UUID. IDs are only defined for Version 2
+// UUIDs.
+func (uuid UUID) ID() uint32 {
+ return binary.BigEndian.Uint32(uuid[0:4])
+}
+
+func (d Domain) String() string {
+ switch d {
+ case Person:
+ return "Person"
+ case Group:
+ return "Group"
+ case Org:
+ return "Org"
+ }
+ return fmt.Sprintf("Domain%d", int(d))
+}
diff --git a/vendor/github.com/google/uuid/doc.go b/vendor/github.com/google/uuid/doc.go
new file mode 100644
index 000000000..5b8a4b9af
--- /dev/null
+++ b/vendor/github.com/google/uuid/doc.go
@@ -0,0 +1,12 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package uuid generates and inspects UUIDs.
+//
+// UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security
+// Services.
+//
+// A UUID is a 16 byte (128 bit) array. UUIDs may be used as keys to
+// maps or compared directly.
+package uuid
diff --git a/vendor/github.com/google/uuid/hash.go b/vendor/github.com/google/uuid/hash.go
new file mode 100644
index 000000000..b17461631
--- /dev/null
+++ b/vendor/github.com/google/uuid/hash.go
@@ -0,0 +1,53 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "crypto/md5"
+ "crypto/sha1"
+ "hash"
+)
+
+// Well known namespace IDs and UUIDs
+var (
+ NameSpaceDNS = Must(Parse("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
+ NameSpaceURL = Must(Parse("6ba7b811-9dad-11d1-80b4-00c04fd430c8"))
+ NameSpaceOID = Must(Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8"))
+ NameSpaceX500 = Must(Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8"))
+ Nil UUID // empty UUID, all zeros
+)
+
+// NewHash returns a new UUID derived from the hash of space concatenated with
+// data generated by h. The hash should be at least 16 byte in length. The
+// first 16 bytes of the hash are used to form the UUID. The version of the
+// UUID will be the lower 4 bits of version. NewHash is used to implement
+// NewMD5 and NewSHA1.
+func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID {
+ h.Reset()
+ h.Write(space[:])
+ h.Write(data)
+ s := h.Sum(nil)
+ var uuid UUID
+ copy(uuid[:], s)
+ uuid[6] = (uuid[6] & 0x0f) | uint8((version&0xf)<<4)
+ uuid[8] = (uuid[8] & 0x3f) | 0x80 // RFC 4122 variant
+ return uuid
+}
+
+// NewMD5 returns a new MD5 (Version 3) UUID based on the
+// supplied name space and data. It is the same as calling:
+//
+// NewHash(md5.New(), space, data, 3)
+func NewMD5(space UUID, data []byte) UUID {
+ return NewHash(md5.New(), space, data, 3)
+}
+
+// NewSHA1 returns a new SHA1 (Version 5) UUID based on the
+// supplied name space and data. It is the same as calling:
+//
+// NewHash(sha1.New(), space, data, 5)
+func NewSHA1(space UUID, data []byte) UUID {
+ return NewHash(sha1.New(), space, data, 5)
+}
diff --git a/vendor/github.com/google/uuid/marshal.go b/vendor/github.com/google/uuid/marshal.go
new file mode 100644
index 000000000..7f9e0c6c0
--- /dev/null
+++ b/vendor/github.com/google/uuid/marshal.go
@@ -0,0 +1,37 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import "fmt"
+
+// MarshalText implements encoding.TextMarshaler.
+func (uuid UUID) MarshalText() ([]byte, error) {
+ var js [36]byte
+ encodeHex(js[:], uuid)
+ return js[:], nil
+}
+
+// UnmarshalText implements encoding.TextUnmarshaler.
+func (uuid *UUID) UnmarshalText(data []byte) error {
+ id, err := ParseBytes(data)
+ if err == nil {
+ *uuid = id
+ }
+ return err
+}
+
+// MarshalBinary implements encoding.BinaryMarshaler.
+func (uuid UUID) MarshalBinary() ([]byte, error) {
+ return uuid[:], nil
+}
+
+// UnmarshalBinary implements encoding.BinaryUnmarshaler.
+func (uuid *UUID) UnmarshalBinary(data []byte) error {
+ if len(data) != 16 {
+ return fmt.Errorf("invalid UUID (got %d bytes)", len(data))
+ }
+ copy(uuid[:], data)
+ return nil
+}
diff --git a/vendor/github.com/google/uuid/node.go b/vendor/github.com/google/uuid/node.go
new file mode 100644
index 000000000..3e4e90dc4
--- /dev/null
+++ b/vendor/github.com/google/uuid/node.go
@@ -0,0 +1,89 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "sync"
+)
+
+var (
+ nodeMu sync.Mutex
+ ifname string // name of interface being used
+ nodeID [6]byte // hardware for version 1 UUIDs
+ zeroID [6]byte // nodeID with only 0's
+)
+
+// NodeInterface returns the name of the interface from which the NodeID was
+// derived. The interface "user" is returned if the NodeID was set by
+// SetNodeID.
+func NodeInterface() string {
+ defer nodeMu.Unlock()
+ nodeMu.Lock()
+ return ifname
+}
+
+// SetNodeInterface selects the hardware address to be used for Version 1 UUIDs.
+// If name is "" then the first usable interface found will be used or a random
+// Node ID will be generated. If a named interface cannot be found then false
+// is returned.
+//
+// SetNodeInterface never fails when name is "".
+func SetNodeInterface(name string) bool {
+ defer nodeMu.Unlock()
+ nodeMu.Lock()
+ return setNodeInterface(name)
+}
+
+func setNodeInterface(name string) bool {
+ iname, addr := getHardwareInterface(name) // null implementation for js
+ if iname != "" && addr != nil {
+ ifname = iname
+ copy(nodeID[:], addr)
+ return true
+ }
+
+ // We found no interfaces with a valid hardware address. If name
+ // does not specify a specific interface generate a random Node ID
+ // (section 4.1.6)
+ if name == "" {
+ randomBits(nodeID[:])
+ return true
+ }
+ return false
+}
+
+// NodeID returns a slice of a copy of the current Node ID, setting the Node ID
+// if not already set.
+func NodeID() []byte {
+ defer nodeMu.Unlock()
+ nodeMu.Lock()
+ if nodeID == zeroID {
+ setNodeInterface("")
+ }
+ nid := nodeID
+ return nid[:]
+}
+
+// SetNodeID sets the Node ID to be used for Version 1 UUIDs. The first 6 bytes
+// of id are used. If id is less than 6 bytes then false is returned and the
+// Node ID is not set.
+func SetNodeID(id []byte) bool {
+ if len(id) < 6 {
+ return false
+ }
+ defer nodeMu.Unlock()
+ nodeMu.Lock()
+ copy(nodeID[:], id)
+ ifname = "user"
+ return true
+}
+
+// NodeID returns the 6 byte node id encoded in uuid. It returns nil if uuid is
+// not valid. The NodeID is only well defined for version 1 and 2 UUIDs.
+func (uuid UUID) NodeID() []byte {
+ var node [6]byte
+ copy(node[:], uuid[10:])
+ return node[:]
+}
diff --git a/vendor/github.com/google/uuid/node_js.go b/vendor/github.com/google/uuid/node_js.go
new file mode 100644
index 000000000..24b78edc9
--- /dev/null
+++ b/vendor/github.com/google/uuid/node_js.go
@@ -0,0 +1,12 @@
+// Copyright 2017 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build js
+
+package uuid
+
+// getHardwareInterface returns nil values for the JS version of the code.
+// This remvoves the "net" dependency, because it is not used in the browser.
+// Using the "net" library inflates the size of the transpiled JS code by 673k bytes.
+func getHardwareInterface(name string) (string, []byte) { return "", nil }
diff --git a/vendor/github.com/google/uuid/node_net.go b/vendor/github.com/google/uuid/node_net.go
new file mode 100644
index 000000000..0cbbcddbd
--- /dev/null
+++ b/vendor/github.com/google/uuid/node_net.go
@@ -0,0 +1,33 @@
+// Copyright 2017 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !js
+
+package uuid
+
+import "net"
+
+var interfaces []net.Interface // cached list of interfaces
+
+// getHardwareInterface returns the name and hardware address of interface name.
+// If name is "" then the name and hardware address of one of the system's
+// interfaces is returned. If no interfaces are found (name does not exist or
+// there are no interfaces) then "", nil is returned.
+//
+// Only addresses of at least 6 bytes are returned.
+func getHardwareInterface(name string) (string, []byte) {
+ if interfaces == nil {
+ var err error
+ interfaces, err = net.Interfaces()
+ if err != nil {
+ return "", nil
+ }
+ }
+ for _, ifs := range interfaces {
+ if len(ifs.HardwareAddr) >= 6 && (name == "" || name == ifs.Name) {
+ return ifs.Name, ifs.HardwareAddr
+ }
+ }
+ return "", nil
+}
diff --git a/vendor/github.com/google/uuid/sql.go b/vendor/github.com/google/uuid/sql.go
new file mode 100644
index 000000000..f326b54db
--- /dev/null
+++ b/vendor/github.com/google/uuid/sql.go
@@ -0,0 +1,59 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "database/sql/driver"
+ "fmt"
+)
+
+// Scan implements sql.Scanner so UUIDs can be read from databases transparently
+// Currently, database types that map to string and []byte are supported. Please
+// consult database-specific driver documentation for matching types.
+func (uuid *UUID) Scan(src interface{}) error {
+ switch src := src.(type) {
+ case nil:
+ return nil
+
+ case string:
+ // if an empty UUID comes from a table, we return a null UUID
+ if src == "" {
+ return nil
+ }
+
+ // see Parse for required string format
+ u, err := Parse(src)
+ if err != nil {
+ return fmt.Errorf("Scan: %v", err)
+ }
+
+ *uuid = u
+
+ case []byte:
+ // if an empty UUID comes from a table, we return a null UUID
+ if len(src) == 0 {
+ return nil
+ }
+
+ // assumes a simple slice of bytes if 16 bytes
+ // otherwise attempts to parse
+ if len(src) != 16 {
+ return uuid.Scan(string(src))
+ }
+ copy((*uuid)[:], src)
+
+ default:
+ return fmt.Errorf("Scan: unable to scan type %T into UUID", src)
+ }
+
+ return nil
+}
+
+// Value implements sql.Valuer so that UUIDs can be written to databases
+// transparently. Currently, UUIDs map to strings. Please consult
+// database-specific driver documentation for matching types.
+func (uuid UUID) Value() (driver.Value, error) {
+ return uuid.String(), nil
+}
diff --git a/vendor/github.com/google/uuid/time.go b/vendor/github.com/google/uuid/time.go
new file mode 100644
index 000000000..e6ef06cdc
--- /dev/null
+++ b/vendor/github.com/google/uuid/time.go
@@ -0,0 +1,123 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "encoding/binary"
+ "sync"
+ "time"
+)
+
+// A Time represents a time as the number of 100's of nanoseconds since 15 Oct
+// 1582.
+type Time int64
+
+const (
+ lillian = 2299160 // Julian day of 15 Oct 1582
+ unix = 2440587 // Julian day of 1 Jan 1970
+ epoch = unix - lillian // Days between epochs
+ g1582 = epoch * 86400 // seconds between epochs
+ g1582ns100 = g1582 * 10000000 // 100s of a nanoseconds between epochs
+)
+
+var (
+ timeMu sync.Mutex
+ lasttime uint64 // last time we returned
+ clockSeq uint16 // clock sequence for this run
+
+ timeNow = time.Now // for testing
+)
+
+// UnixTime converts t the number of seconds and nanoseconds using the Unix
+// epoch of 1 Jan 1970.
+func (t Time) UnixTime() (sec, nsec int64) {
+ sec = int64(t - g1582ns100)
+ nsec = (sec % 10000000) * 100
+ sec /= 10000000
+ return sec, nsec
+}
+
+// GetTime returns the current Time (100s of nanoseconds since 15 Oct 1582) and
+// clock sequence as well as adjusting the clock sequence as needed. An error
+// is returned if the current time cannot be determined.
+func GetTime() (Time, uint16, error) {
+ defer timeMu.Unlock()
+ timeMu.Lock()
+ return getTime()
+}
+
+func getTime() (Time, uint16, error) {
+ t := timeNow()
+
+ // If we don't have a clock sequence already, set one.
+ if clockSeq == 0 {
+ setClockSequence(-1)
+ }
+ now := uint64(t.UnixNano()/100) + g1582ns100
+
+ // If time has gone backwards with this clock sequence then we
+ // increment the clock sequence
+ if now <= lasttime {
+ clockSeq = ((clockSeq + 1) & 0x3fff) | 0x8000
+ }
+ lasttime = now
+ return Time(now), clockSeq, nil
+}
+
+// ClockSequence returns the current clock sequence, generating one if not
+// already set. The clock sequence is only used for Version 1 UUIDs.
+//
+// The uuid package does not use global static storage for the clock sequence or
+// the last time a UUID was generated. Unless SetClockSequence is used, a new
+// random clock sequence is generated the first time a clock sequence is
+// requested by ClockSequence, GetTime, or NewUUID. (section 4.2.1.1)
+func ClockSequence() int {
+ defer timeMu.Unlock()
+ timeMu.Lock()
+ return clockSequence()
+}
+
+func clockSequence() int {
+ if clockSeq == 0 {
+ setClockSequence(-1)
+ }
+ return int(clockSeq & 0x3fff)
+}
+
+// SetClockSequence sets the clock sequence to the lower 14 bits of seq. Setting to
+// -1 causes a new sequence to be generated.
+func SetClockSequence(seq int) {
+ defer timeMu.Unlock()
+ timeMu.Lock()
+ setClockSequence(seq)
+}
+
+func setClockSequence(seq int) {
+ if seq == -1 {
+ var b [2]byte
+ randomBits(b[:]) // clock sequence
+ seq = int(b[0])<<8 | int(b[1])
+ }
+ oldSeq := clockSeq
+ clockSeq = uint16(seq&0x3fff) | 0x8000 // Set our variant
+ if oldSeq != clockSeq {
+ lasttime = 0
+ }
+}
+
+// Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in
+// uuid. The time is only defined for version 1 and 2 UUIDs.
+func (uuid UUID) Time() Time {
+ time := int64(binary.BigEndian.Uint32(uuid[0:4]))
+ time |= int64(binary.BigEndian.Uint16(uuid[4:6])) << 32
+ time |= int64(binary.BigEndian.Uint16(uuid[6:8])&0xfff) << 48
+ return Time(time)
+}
+
+// ClockSequence returns the clock sequence encoded in uuid.
+// The clock sequence is only well defined for version 1 and 2 UUIDs.
+func (uuid UUID) ClockSequence() int {
+ return int(binary.BigEndian.Uint16(uuid[8:10])) & 0x3fff
+}
diff --git a/vendor/github.com/google/uuid/util.go b/vendor/github.com/google/uuid/util.go
new file mode 100644
index 000000000..5ea6c7378
--- /dev/null
+++ b/vendor/github.com/google/uuid/util.go
@@ -0,0 +1,43 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "io"
+)
+
+// randomBits completely fills slice b with random data.
+func randomBits(b []byte) {
+ if _, err := io.ReadFull(rander, b); err != nil {
+ panic(err.Error()) // rand should never fail
+ }
+}
+
+// xvalues returns the value of a byte as a hexadecimal digit or 255.
+var xvalues = [256]byte{
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 255, 255, 255, 255, 255,
+ 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+}
+
+// xtob converts hex characters x1 and x2 into a byte.
+func xtob(x1, x2 byte) (byte, bool) {
+ b1 := xvalues[x1]
+ b2 := xvalues[x2]
+ return (b1 << 4) | b2, b1 != 255 && b2 != 255
+}
diff --git a/vendor/github.com/google/uuid/uuid.go b/vendor/github.com/google/uuid/uuid.go
new file mode 100644
index 000000000..7f3643fe9
--- /dev/null
+++ b/vendor/github.com/google/uuid/uuid.go
@@ -0,0 +1,198 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "bytes"
+ "crypto/rand"
+ "encoding/hex"
+ "errors"
+ "fmt"
+ "io"
+ "strings"
+)
+
+// A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC
+// 4122.
+type UUID [16]byte
+
+// A Version represents a UUID's version.
+type Version byte
+
+// A Variant represents a UUID's variant.
+type Variant byte
+
+// Constants returned by Variant.
+const (
+ Invalid = Variant(iota) // Invalid UUID
+ RFC4122 // The variant specified in RFC4122
+ Reserved // Reserved, NCS backward compatibility.
+ Microsoft // Reserved, Microsoft Corporation backward compatibility.
+ Future // Reserved for future definition.
+)
+
+var rander = rand.Reader // random function
+
+// Parse decodes s into a UUID or returns an error. Both the UUID form of
+// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and
+// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded.
+func Parse(s string) (UUID, error) {
+ var uuid UUID
+ if len(s) != 36 {
+ if len(s) != 36+9 {
+ return uuid, fmt.Errorf("invalid UUID length: %d", len(s))
+ }
+ if strings.ToLower(s[:9]) != "urn:uuid:" {
+ return uuid, fmt.Errorf("invalid urn prefix: %q", s[:9])
+ }
+ s = s[9:]
+ }
+ if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' {
+ return uuid, errors.New("invalid UUID format")
+ }
+ for i, x := range [16]int{
+ 0, 2, 4, 6,
+ 9, 11,
+ 14, 16,
+ 19, 21,
+ 24, 26, 28, 30, 32, 34} {
+ v, ok := xtob(s[x], s[x+1])
+ if !ok {
+ return uuid, errors.New("invalid UUID format")
+ }
+ uuid[i] = v
+ }
+ return uuid, nil
+}
+
+// ParseBytes is like Parse, except it parses a byte slice instead of a string.
+func ParseBytes(b []byte) (UUID, error) {
+ var uuid UUID
+ if len(b) != 36 {
+ if len(b) != 36+9 {
+ return uuid, fmt.Errorf("invalid UUID length: %d", len(b))
+ }
+ if !bytes.Equal(bytes.ToLower(b[:9]), []byte("urn:uuid:")) {
+ return uuid, fmt.Errorf("invalid urn prefix: %q", b[:9])
+ }
+ b = b[9:]
+ }
+ if b[8] != '-' || b[13] != '-' || b[18] != '-' || b[23] != '-' {
+ return uuid, errors.New("invalid UUID format")
+ }
+ for i, x := range [16]int{
+ 0, 2, 4, 6,
+ 9, 11,
+ 14, 16,
+ 19, 21,
+ 24, 26, 28, 30, 32, 34} {
+ v, ok := xtob(b[x], b[x+1])
+ if !ok {
+ return uuid, errors.New("invalid UUID format")
+ }
+ uuid[i] = v
+ }
+ return uuid, nil
+}
+
+// FromBytes creates a new UUID from a byte slice. Returns an error if the slice
+// does not have a length of 16. The bytes are copied from the slice.
+func FromBytes(b []byte) (uuid UUID, err error) {
+ err = uuid.UnmarshalBinary(b)
+ return uuid, err
+}
+
+// Must returns uuid if err is nil and panics otherwise.
+func Must(uuid UUID, err error) UUID {
+ if err != nil {
+ panic(err)
+ }
+ return uuid
+}
+
+// String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+// , or "" if uuid is invalid.
+func (uuid UUID) String() string {
+ var buf [36]byte
+ encodeHex(buf[:], uuid)
+ return string(buf[:])
+}
+
+// URN returns the RFC 2141 URN form of uuid,
+// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, or "" if uuid is invalid.
+func (uuid UUID) URN() string {
+ var buf [36 + 9]byte
+ copy(buf[:], "urn:uuid:")
+ encodeHex(buf[9:], uuid)
+ return string(buf[:])
+}
+
+func encodeHex(dst []byte, uuid UUID) {
+ hex.Encode(dst[:], uuid[:4])
+ dst[8] = '-'
+ hex.Encode(dst[9:13], uuid[4:6])
+ dst[13] = '-'
+ hex.Encode(dst[14:18], uuid[6:8])
+ dst[18] = '-'
+ hex.Encode(dst[19:23], uuid[8:10])
+ dst[23] = '-'
+ hex.Encode(dst[24:], uuid[10:])
+}
+
+// Variant returns the variant encoded in uuid.
+func (uuid UUID) Variant() Variant {
+ switch {
+ case (uuid[8] & 0xc0) == 0x80:
+ return RFC4122
+ case (uuid[8] & 0xe0) == 0xc0:
+ return Microsoft
+ case (uuid[8] & 0xe0) == 0xe0:
+ return Future
+ default:
+ return Reserved
+ }
+}
+
+// Version returns the version of uuid.
+func (uuid UUID) Version() Version {
+ return Version(uuid[6] >> 4)
+}
+
+func (v Version) String() string {
+ if v > 15 {
+ return fmt.Sprintf("BAD_VERSION_%d", v)
+ }
+ return fmt.Sprintf("VERSION_%d", v)
+}
+
+func (v Variant) String() string {
+ switch v {
+ case RFC4122:
+ return "RFC4122"
+ case Reserved:
+ return "Reserved"
+ case Microsoft:
+ return "Microsoft"
+ case Future:
+ return "Future"
+ case Invalid:
+ return "Invalid"
+ }
+ return fmt.Sprintf("BadVariant%d", int(v))
+}
+
+// SetRand sets the random number generator to r, which implements io.Reader.
+// If r.Read returns an error when the package requests random data then
+// a panic will be issued.
+//
+// Calling SetRand with nil sets the random number generator to the default
+// generator.
+func SetRand(r io.Reader) {
+ if r == nil {
+ rander = rand.Reader
+ return
+ }
+ rander = r
+}
diff --git a/vendor/github.com/google/uuid/version1.go b/vendor/github.com/google/uuid/version1.go
new file mode 100644
index 000000000..199a1ac65
--- /dev/null
+++ b/vendor/github.com/google/uuid/version1.go
@@ -0,0 +1,44 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "encoding/binary"
+)
+
+// NewUUID returns a Version 1 UUID based on the current NodeID and clock
+// sequence, and the current time. If the NodeID has not been set by SetNodeID
+// or SetNodeInterface then it will be set automatically. If the NodeID cannot
+// be set NewUUID returns nil. If clock sequence has not been set by
+// SetClockSequence then it will be set automatically. If GetTime fails to
+// return the current NewUUID returns nil and an error.
+//
+// In most cases, New should be used.
+func NewUUID() (UUID, error) {
+ nodeMu.Lock()
+ if nodeID == zeroID {
+ setNodeInterface("")
+ }
+ nodeMu.Unlock()
+
+ var uuid UUID
+ now, seq, err := GetTime()
+ if err != nil {
+ return uuid, err
+ }
+
+ timeLow := uint32(now & 0xffffffff)
+ timeMid := uint16((now >> 32) & 0xffff)
+ timeHi := uint16((now >> 48) & 0x0fff)
+ timeHi |= 0x1000 // Version 1
+
+ binary.BigEndian.PutUint32(uuid[0:], timeLow)
+ binary.BigEndian.PutUint16(uuid[4:], timeMid)
+ binary.BigEndian.PutUint16(uuid[6:], timeHi)
+ binary.BigEndian.PutUint16(uuid[8:], seq)
+ copy(uuid[10:], nodeID[:])
+
+ return uuid, nil
+}
diff --git a/vendor/github.com/google/uuid/version4.go b/vendor/github.com/google/uuid/version4.go
new file mode 100644
index 000000000..84af91c9f
--- /dev/null
+++ b/vendor/github.com/google/uuid/version4.go
@@ -0,0 +1,38 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import "io"
+
+// New creates a new random UUID or panics. New is equivalent to
+// the expression
+//
+// uuid.Must(uuid.NewRandom())
+func New() UUID {
+ return Must(NewRandom())
+}
+
+// NewRandom returns a Random (Version 4) UUID.
+//
+// The strength of the UUIDs is based on the strength of the crypto/rand
+// package.
+//
+// A note about uniqueness derived from the UUID Wikipedia entry:
+//
+// Randomly generated UUIDs have 122 random bits. One's annual risk of being
+// hit by a meteorite is estimated to be one chance in 17 billion, that
+// means the probability is about 0.00000000006 (6 × 10−11),
+// equivalent to the odds of creating a few tens of trillions of UUIDs in a
+// year and having one duplicate.
+func NewRandom() (UUID, error) {
+ var uuid UUID
+ _, err := io.ReadFull(rander, uuid[:])
+ if err != nil {
+ return Nil, err
+ }
+ uuid[6] = (uuid[6] & 0x0f) | 0x40 // Version 4
+ uuid[8] = (uuid[8] & 0x3f) | 0x80 // Variant is 10
+ return uuid, nil
+}
diff --git a/vendor/github.com/gorilla/websocket/.travis.yml b/vendor/github.com/gorilla/websocket/.travis.yml
index a880cd982..a49db51c4 100644
--- a/vendor/github.com/gorilla/websocket/.travis.yml
+++ b/vendor/github.com/gorilla/websocket/.travis.yml
@@ -7,6 +7,7 @@ matrix:
- go: 1.8.x
- go: 1.9.x
- go: 1.10.x
+ - go: 1.11.x
- go: tip
allow_failures:
- go: tip
diff --git a/vendor/github.com/gorilla/websocket/client.go b/vendor/github.com/gorilla/websocket/client.go
index 7a24309ce..2e32fd506 100644
--- a/vendor/github.com/gorilla/websocket/client.go
+++ b/vendor/github.com/gorilla/websocket/client.go
@@ -6,12 +6,14 @@ package websocket
import (
"bytes"
+ "context"
"crypto/tls"
"errors"
"io"
"io/ioutil"
"net"
"net/http"
+ "net/http/httptrace"
"net/url"
"strings"
"time"
@@ -51,6 +53,10 @@ type Dialer struct {
// NetDial is nil, net.Dial is used.
NetDial func(network, addr string) (net.Conn, error)
+ // NetDialContext specifies the dial function for creating TCP connections. If
+ // NetDialContext is nil, net.DialContext is used.
+ NetDialContext func(ctx context.Context, network, addr string) (net.Conn, error)
+
// Proxy specifies a function to return a proxy for a given
// Request. If the function returns a non-nil error, the
// request is aborted with the provided error.
@@ -95,6 +101,11 @@ type Dialer struct {
Jar http.CookieJar
}
+// Dial creates a new client connection by calling DialContext with a background context.
+func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Response, error) {
+ return d.DialContext(context.Background(), urlStr, requestHeader)
+}
+
var errMalformedURL = errors.New("malformed ws or wss URL")
func hostPortNoPort(u *url.URL) (hostPort, hostNoPort string) {
@@ -122,19 +133,20 @@ var DefaultDialer = &Dialer{
}
// nilDialer is dialer to use when receiver is nil.
-var nilDialer Dialer = *DefaultDialer
+var nilDialer = *DefaultDialer
-// Dial creates a new client connection. Use requestHeader to specify the
+// DialContext creates a new client connection. Use requestHeader to specify the
// origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies (Cookie).
// Use the response.Header to get the selected subprotocol
// (Sec-WebSocket-Protocol) and cookies (Set-Cookie).
//
+// The context will be used in the request and in the Dialer
+//
// If the WebSocket handshake fails, ErrBadHandshake is returned along with a
// non-nil *http.Response so that callers can handle redirects, authentication,
// etcetera. The response body may not contain the entire response and does not
// need to be closed by the application.
-func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Response, error) {
-
+func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (*Conn, *http.Response, error) {
if d == nil {
d = &nilDialer
}
@@ -172,6 +184,7 @@ func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Re
Header: make(http.Header),
Host: u.Host,
}
+ req = req.WithContext(ctx)
// Set the cookies present in the cookie jar of the dialer
if d.Jar != nil {
@@ -215,20 +228,30 @@ func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Re
req.Header["Sec-WebSocket-Extensions"] = []string{"permessage-deflate; server_no_context_takeover; client_no_context_takeover"}
}
- var deadline time.Time
if d.HandshakeTimeout != 0 {
- deadline = time.Now().Add(d.HandshakeTimeout)
+ var cancel func()
+ ctx, cancel = context.WithTimeout(ctx, d.HandshakeTimeout)
+ defer cancel()
}
// Get network dial function.
- netDial := d.NetDial
- if netDial == nil {
- netDialer := &net.Dialer{Deadline: deadline}
- netDial = netDialer.Dial
+ var netDial func(network, add string) (net.Conn, error)
+
+ if d.NetDialContext != nil {
+ netDial = func(network, addr string) (net.Conn, error) {
+ return d.NetDialContext(ctx, network, addr)
+ }
+ } else if d.NetDial != nil {
+ netDial = d.NetDial
+ } else {
+ netDialer := &net.Dialer{}
+ netDial = func(network, addr string) (net.Conn, error) {
+ return netDialer.DialContext(ctx, network, addr)
+ }
}
// If needed, wrap the dial function to set the connection deadline.
- if !deadline.Equal(time.Time{}) {
+ if deadline, ok := ctx.Deadline(); ok {
forwardDial := netDial
netDial = func(network, addr string) (net.Conn, error) {
c, err := forwardDial(network, addr)
@@ -260,7 +283,17 @@ func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Re
}
hostPort, hostNoPort := hostPortNoPort(u)
+ trace := httptrace.ContextClientTrace(ctx)
+ if trace != nil && trace.GetConn != nil {
+ trace.GetConn(hostPort)
+ }
+
netConn, err := netDial("tcp", hostPort)
+ if trace != nil && trace.GotConn != nil {
+ trace.GotConn(httptrace.GotConnInfo{
+ Conn: netConn,
+ })
+ }
if err != nil {
return nil, nil, err
}
@@ -278,13 +311,16 @@ func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Re
}
tlsConn := tls.Client(netConn, cfg)
netConn = tlsConn
- if err := tlsConn.Handshake(); err != nil {
- return nil, nil, err
+
+ var err error
+ if trace != nil {
+ err = doHandshakeWithTrace(trace, tlsConn, cfg)
+ } else {
+ err = doHandshake(tlsConn, cfg)
}
- if !cfg.InsecureSkipVerify {
- if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil {
- return nil, nil, err
- }
+
+ if err != nil {
+ return nil, nil, err
}
}
@@ -294,6 +330,12 @@ func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Re
return nil, nil, err
}
+ if trace != nil && trace.GotFirstResponseByte != nil {
+ if peek, err := conn.br.Peek(1); err == nil && len(peek) == 1 {
+ trace.GotFirstResponseByte()
+ }
+ }
+
resp, err := http.ReadResponse(conn.br, req)
if err != nil {
return nil, nil, err
@@ -339,3 +381,15 @@ func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Re
netConn = nil // to avoid close in defer.
return conn, resp, nil
}
+
+func doHandshake(tlsConn *tls.Conn, cfg *tls.Config) error {
+ if err := tlsConn.Handshake(); err != nil {
+ return err
+ }
+ if !cfg.InsecureSkipVerify {
+ if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/gorilla/websocket/prepared.go b/vendor/github.com/gorilla/websocket/prepared.go
index 1efffbd1e..74ec565d2 100644
--- a/vendor/github.com/gorilla/websocket/prepared.go
+++ b/vendor/github.com/gorilla/websocket/prepared.go
@@ -19,7 +19,6 @@ import (
type PreparedMessage struct {
messageType int
data []byte
- err error
mu sync.Mutex
frames map[prepareKey]*preparedFrame
}
diff --git a/vendor/github.com/gorilla/websocket/server.go b/vendor/github.com/gorilla/websocket/server.go
index 3bd627bc1..a761824b3 100644
--- a/vendor/github.com/gorilla/websocket/server.go
+++ b/vendor/github.com/gorilla/websocket/server.go
@@ -8,7 +8,6 @@ import (
"bufio"
"errors"
"io"
- "net"
"net/http"
"net/url"
"strings"
@@ -171,17 +170,12 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade
}
}
- var (
- netConn net.Conn
- err error
- )
-
h, ok := w.(http.Hijacker)
if !ok {
return u.returnError(w, r, http.StatusInternalServerError, "websocket: response does not implement http.Hijacker")
}
var brw *bufio.ReadWriter
- netConn, brw, err = h.Hijack()
+ netConn, brw, err := h.Hijack()
if err != nil {
return u.returnError(w, r, http.StatusInternalServerError, err.Error())
}
@@ -331,7 +325,7 @@ func IsWebSocketUpgrade(r *http.Request) bool {
tokenListContainsValue(r.Header, "Upgrade", "websocket")
}
-// bufioReader size returns the size of a bufio.Reader.
+// bufioReaderSize size returns the size of a bufio.Reader.
func bufioReaderSize(originalReader io.Reader, br *bufio.Reader) int {
// This code assumes that peek on a reset reader returns
// bufio.Reader.buf[:0].
diff --git a/vendor/github.com/gorilla/websocket/trace.go b/vendor/github.com/gorilla/websocket/trace.go
new file mode 100644
index 000000000..834f122a0
--- /dev/null
+++ b/vendor/github.com/gorilla/websocket/trace.go
@@ -0,0 +1,19 @@
+// +build go1.8
+
+package websocket
+
+import (
+ "crypto/tls"
+ "net/http/httptrace"
+)
+
+func doHandshakeWithTrace(trace *httptrace.ClientTrace, tlsConn *tls.Conn, cfg *tls.Config) error {
+ if trace.TLSHandshakeStart != nil {
+ trace.TLSHandshakeStart()
+ }
+ err := doHandshake(tlsConn, cfg)
+ if trace.TLSHandshakeDone != nil {
+ trace.TLSHandshakeDone(tlsConn.ConnectionState(), err)
+ }
+ return err
+}
diff --git a/vendor/github.com/gorilla/websocket/trace_17.go b/vendor/github.com/gorilla/websocket/trace_17.go
new file mode 100644
index 000000000..77d05a0b5
--- /dev/null
+++ b/vendor/github.com/gorilla/websocket/trace_17.go
@@ -0,0 +1,12 @@
+// +build !go1.8
+
+package websocket
+
+import (
+ "crypto/tls"
+ "net/http/httptrace"
+)
+
+func doHandshakeWithTrace(trace *httptrace.ClientTrace, tlsConn *tls.Conn, cfg *tls.Config) error {
+ return doHandshake(tlsConn, cfg)
+}
diff --git a/vendor/github.com/gorilla/websocket/util.go b/vendor/github.com/gorilla/websocket/util.go
index 385fa01be..354001e1e 100644
--- a/vendor/github.com/gorilla/websocket/util.go
+++ b/vendor/github.com/gorilla/websocket/util.go
@@ -178,7 +178,7 @@ headers:
return false
}
-// parseExtensiosn parses WebSocket extensions from a header.
+// parseExtensions parses WebSocket extensions from a header.
func parseExtensions(header http.Header) []map[string]string {
// From RFC 6455:
//
diff --git a/vendor/github.com/hashicorp/go-hclog/go.mod b/vendor/github.com/hashicorp/go-hclog/go.mod
new file mode 100644
index 000000000..0d079a654
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-hclog/go.mod
@@ -0,0 +1,7 @@
+module github.com/hashicorp/go-hclog
+
+require (
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/stretchr/testify v1.2.2
+)
diff --git a/vendor/github.com/hashicorp/go-hclog/go.sum b/vendor/github.com/hashicorp/go-hclog/go.sum
new file mode 100644
index 000000000..e03ee77d9
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-hclog/go.sum
@@ -0,0 +1,6 @@
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
diff --git a/vendor/github.com/hashicorp/go-hclog/int.go b/vendor/github.com/hashicorp/go-hclog/int.go
index 0166c3dd2..7d17d81cb 100644
--- a/vendor/github.com/hashicorp/go-hclog/int.go
+++ b/vendor/github.com/hashicorp/go-hclog/int.go
@@ -8,9 +8,11 @@ import (
"log"
"os"
"runtime"
+ "sort"
"strconv"
"strings"
"sync"
+ "sync/atomic"
"time"
)
@@ -52,11 +54,12 @@ func New(opts *LoggerOptions) Logger {
name: opts.Name,
timeFormat: TimeFormat,
w: bufio.NewWriter(output),
- level: level,
+ level: new(int32),
}
if opts.TimeFormat != "" {
ret.timeFormat = opts.TimeFormat
}
+ atomic.StoreInt32(ret.level, int32(level))
return ret
}
@@ -72,7 +75,7 @@ type intLogger struct {
// those derived loggers share the bufio.Writer as well.
m *sync.Mutex
w *bufio.Writer
- level Level
+ level *int32
implied []interface{}
}
@@ -87,7 +90,7 @@ const TimeFormat = "2006-01-02T15:04:05.000Z0700"
// Log a message and a set of key/value pairs if the given level is at
// or more severe that the threshold configured in the Logger.
func (z *intLogger) Log(level Level, msg string, args ...interface{}) {
- if level < z.level {
+ if level < Level(atomic.LoadInt32(z.level)) {
return
}
@@ -347,38 +350,66 @@ func (z *intLogger) Error(msg string, args ...interface{}) {
// Indicate that the logger would emit TRACE level logs
func (z *intLogger) IsTrace() bool {
- return z.level == Trace
+ return Level(atomic.LoadInt32(z.level)) == Trace
}
// Indicate that the logger would emit DEBUG level logs
func (z *intLogger) IsDebug() bool {
- return z.level <= Debug
+ return Level(atomic.LoadInt32(z.level)) <= Debug
}
// Indicate that the logger would emit INFO level logs
func (z *intLogger) IsInfo() bool {
- return z.level <= Info
+ return Level(atomic.LoadInt32(z.level)) <= Info
}
// Indicate that the logger would emit WARN level logs
func (z *intLogger) IsWarn() bool {
- return z.level <= Warn
+ return Level(atomic.LoadInt32(z.level)) <= Warn
}
// Indicate that the logger would emit ERROR level logs
func (z *intLogger) IsError() bool {
- return z.level <= Error
+ return Level(atomic.LoadInt32(z.level)) <= Error
}
// Return a sub-Logger for which every emitted log message will contain
// the given key/value pairs. This is used to create a context specific
// Logger.
func (z *intLogger) With(args ...interface{}) Logger {
+ if len(args)%2 != 0 {
+ panic("With() call requires paired arguments")
+ }
+
var nz intLogger = *z
+ result := make(map[string]interface{}, len(z.implied)+len(args))
+ keys := make([]string, 0, len(z.implied)+len(args))
+
+ // Read existing args, store map and key for consistent sorting
+ for i := 0; i < len(z.implied); i += 2 {
+ key := z.implied[i].(string)
+ keys = append(keys, key)
+ result[key] = z.implied[i+1]
+ }
+ // Read new args, store map and key for consistent sorting
+ for i := 0; i < len(args); i += 2 {
+ key := args[i].(string)
+ _, exists := result[key]
+ if !exists {
+ keys = append(keys, key)
+ }
+ result[key] = args[i+1]
+ }
+
+ // Sort keys to be consistent
+ sort.Strings(keys)
+
nz.implied = make([]interface{}, 0, len(z.implied)+len(args))
- nz.implied = append(nz.implied, z.implied...)
- nz.implied = append(nz.implied, args...)
+ for _, k := range keys {
+ nz.implied = append(nz.implied, k)
+ nz.implied = append(nz.implied, result[k])
+ }
return &nz
}
@@ -408,6 +439,12 @@ func (z *intLogger) ResetNamed(name string) Logger {
return &nz
}
+// Update the logging level on-the-fly. This will affect all subloggers as
+// well.
+func (z *intLogger) SetLevel(level Level) {
+ atomic.StoreInt32(z.level, int32(level))
+}
+
// Create a *log.Logger that will send it's data through this Logger. This
// allows packages that expect to be using the standard library log to actually
// use this logger.
diff --git a/vendor/github.com/hashicorp/go-hclog/log.go b/vendor/github.com/hashicorp/go-hclog/log.go
index 362924887..d98714e0a 100644
--- a/vendor/github.com/hashicorp/go-hclog/log.go
+++ b/vendor/github.com/hashicorp/go-hclog/log.go
@@ -13,7 +13,7 @@ var (
DefaultLevel = Info
)
-type Level int
+type Level int32
const (
// This is a special level used to indicate that no level has been
@@ -121,6 +121,10 @@ type Logger interface {
// the current name as well.
ResetNamed(name string) Logger
+ // Updates the level. This should affect all sub-loggers as well. If an
+ // implementation cannot update the level on the fly, it should no-op.
+ SetLevel(level Level)
+
// Return a value that conforms to the stdlib log.Logger interface
StandardLogger(opts *StandardLoggerOptions) *log.Logger
}
@@ -140,7 +144,7 @@ type LoggerOptions struct {
// The threshold for the logger. Anything less severe is supressed
Level Level
- // Where to write the logs to. Defaults to os.Stdout if nil
+ // Where to write the logs to. Defaults to os.Stderr if nil
Output io.Writer
// An optional mutex pointer in case Output is shared
diff --git a/vendor/github.com/hashicorp/go-hclog/nulllogger.go b/vendor/github.com/hashicorp/go-hclog/nulllogger.go
index c10ce6e88..0942361a5 100644
--- a/vendor/github.com/hashicorp/go-hclog/nulllogger.go
+++ b/vendor/github.com/hashicorp/go-hclog/nulllogger.go
@@ -1,8 +1,8 @@
package hclog
import (
- "log"
"io/ioutil"
+ "log"
)
// NewNullLogger instantiates a Logger for which all calls
@@ -40,6 +40,8 @@ func (l *nullLogger) Named(name string) Logger { return l }
func (l *nullLogger) ResetNamed(name string) Logger { return l }
+func (l *nullLogger) SetLevel(level Level) {}
+
func (l *nullLogger) StandardLogger(opts *StandardLoggerOptions) *log.Logger {
return log.New(ioutil.Discard, "", log.LstdFlags)
-} \ No newline at end of file
+}
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/go.mod b/vendor/github.com/hashicorp/go-immutable-radix/go.mod
new file mode 100644
index 000000000..27e7b7c95
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-immutable-radix/go.mod
@@ -0,0 +1,6 @@
+module github.com/hashicorp/go-immutable-radix
+
+require (
+ github.com/hashicorp/go-uuid v1.0.0
+ github.com/hashicorp/golang-lru v0.5.0
+)
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/go.sum b/vendor/github.com/hashicorp/go-immutable-radix/go.sum
new file mode 100644
index 000000000..7de5dfc50
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-immutable-radix/go.sum
@@ -0,0 +1,4 @@
+github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM=
+github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
+github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
+github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
diff --git a/vendor/github.com/hashicorp/go-plugin/client.go b/vendor/github.com/hashicorp/go-plugin/client.go
index fce0614f1..1528305d9 100644
--- a/vendor/github.com/hashicorp/go-plugin/client.go
+++ b/vendor/github.com/hashicorp/go-plugin/client.go
@@ -70,16 +70,23 @@ var (
//
// See NewClient and ClientConfig for using a Client.
type Client struct {
- config *ClientConfig
- exited bool
- doneLogging chan struct{}
- l sync.Mutex
- address net.Addr
- process *os.Process
- client ClientProtocol
- protocol Protocol
- logger hclog.Logger
- doneCtx context.Context
+ config *ClientConfig
+ exited bool
+ doneLogging chan struct{}
+ l sync.Mutex
+ address net.Addr
+ process *os.Process
+ client ClientProtocol
+ protocol Protocol
+ logger hclog.Logger
+ doneCtx context.Context
+ negotiatedVersion int
+}
+
+// NegotiatedVersion returns the protocol version negotiated with the server.
+// This is only valid after Start() is called.
+func (c *Client) NegotiatedVersion() int {
+ return c.negotiatedVersion
}
// ClientConfig is the configuration used to initialize a new
@@ -90,7 +97,13 @@ type ClientConfig struct {
HandshakeConfig
// Plugins are the plugins that can be consumed.
- Plugins map[string]Plugin
+ // The implied version of this PluginSet is the Handshake.ProtocolVersion.
+ Plugins PluginSet
+
+ // VersionedPlugins is a map of PluginSets for specific protocol versions.
+ // These can be used to negotiate a compatible version between client and
+ // server. If this is set, Handshake.ProtocolVersion is not required.
+ VersionedPlugins map[int]PluginSet
// One of the following must be set, but not both.
//
@@ -477,10 +490,30 @@ func (c *Client) Start() (addr net.Addr, err error) {
return c.address, nil
}
+ if c.config.VersionedPlugins == nil {
+ c.config.VersionedPlugins = make(map[int]PluginSet)
+ }
+
+ // handle all plugins as versioned, using the handshake config as the default.
+ version := int(c.config.ProtocolVersion)
+
+ // Make sure we're not overwriting a real version 0. If ProtocolVersion was
+ // non-zero, then we have to just assume the user made sure that
+ // VersionedPlugins doesn't conflict.
+ if _, ok := c.config.VersionedPlugins[version]; !ok && c.config.Plugins != nil {
+ c.config.VersionedPlugins[version] = c.config.Plugins
+ }
+
+ var versionStrings []string
+ for v := range c.config.VersionedPlugins {
+ versionStrings = append(versionStrings, strconv.Itoa(v))
+ }
+
env := []string{
fmt.Sprintf("%s=%s", c.config.MagicCookieKey, c.config.MagicCookieValue),
fmt.Sprintf("PLUGIN_MIN_PORT=%d", c.config.MinPort),
fmt.Sprintf("PLUGIN_MAX_PORT=%d", c.config.MaxPort),
+ fmt.Sprintf("PLUGIN_PROTOCOL_VERSIONS=%s", strings.Join(versionStrings, ",")),
}
stdout_r, stdout_w := io.Pipe()
@@ -622,20 +655,18 @@ func (c *Client) Start() (addr net.Addr, err error) {
}
}
- // Parse the protocol version
- var protocol int64
- protocol, err = strconv.ParseInt(parts[1], 10, 0)
+ // Test the API version
+ version, pluginSet, err := c.checkProtoVersion(parts[1])
if err != nil {
- err = fmt.Errorf("Error parsing protocol version: %s", err)
- return
+ return addr, err
}
- // Test the API version
- if uint(protocol) != c.config.ProtocolVersion {
- err = fmt.Errorf("Incompatible API version with plugin. "+
- "Plugin version: %s, Core version: %d", parts[1], c.config.ProtocolVersion)
- return
- }
+ // set the Plugins value to the compatible set, so the version
+ // doesn't need to be passed through to the ClientProtocol
+ // implementation.
+ c.config.Plugins = pluginSet
+ c.negotiatedVersion = version
+ c.logger.Debug("using plugin", "version", version)
switch parts[2] {
case "tcp":
@@ -663,7 +694,7 @@ func (c *Client) Start() (addr net.Addr, err error) {
if !found {
err = fmt.Errorf("Unsupported plugin protocol %q. Supported: %v",
c.protocol, c.config.AllowedProtocols)
- return
+ return addr, err
}
}
@@ -672,6 +703,33 @@ func (c *Client) Start() (addr net.Addr, err error) {
return
}
+// checkProtoVersion returns the negotiated version and PluginSet.
+// This returns an error if the server returned an incompatible protocol
+// version, or an invalid handshake response.
+func (c *Client) checkProtoVersion(protoVersion string) (int, PluginSet, error) {
+ serverVersion, err := strconv.Atoi(protoVersion)
+ if err != nil {
+ return 0, nil, fmt.Errorf("Error parsing protocol version %q: %s", protoVersion, err)
+ }
+
+ // record these for the error message
+ var clientVersions []int
+
+ // all versions, including the legacy ProtocolVersion have been added to
+ // the versions set
+ for version, plugins := range c.config.VersionedPlugins {
+ clientVersions = append(clientVersions, version)
+
+ if serverVersion != version {
+ continue
+ }
+ return version, plugins, nil
+ }
+
+ return 0, nil, fmt.Errorf("Incompatible API version with plugin. "+
+ "Plugin version: %d, Client versions: %d", serverVersion, clientVersions)
+}
+
// ReattachConfig returns the information that must be provided to NewClient
// to reattach to the plugin process that this client started. This is
// useful for plugins that detach from their parent process.
diff --git a/vendor/github.com/hashicorp/go-plugin/server.go b/vendor/github.com/hashicorp/go-plugin/server.go
index 1e808b99e..6de90485f 100644
--- a/vendor/github.com/hashicorp/go-plugin/server.go
+++ b/vendor/github.com/hashicorp/go-plugin/server.go
@@ -11,7 +11,9 @@ import (
"os"
"os/signal"
"runtime"
+ "sort"
"strconv"
+ "strings"
"sync/atomic"
"github.com/hashicorp/go-hclog"
@@ -36,6 +38,8 @@ type HandshakeConfig struct {
// ProtocolVersion is the version that clients must match on to
// agree they can communicate. This should match the ProtocolVersion
// set on ClientConfig when using a plugin.
+ // This field is not required if VersionedPlugins are being used in the
+ // Client or Server configurations.
ProtocolVersion uint
// MagicCookieKey and value are used as a very basic verification
@@ -46,6 +50,10 @@ type HandshakeConfig struct {
MagicCookieValue string
}
+// PluginSet is a set of plugins provided to be registered in the plugin
+// server.
+type PluginSet map[string]Plugin
+
// ServeConfig configures what sorts of plugins are served.
type ServeConfig struct {
// HandshakeConfig is the configuration that must match clients.
@@ -55,7 +63,13 @@ type ServeConfig struct {
TLSProvider func() (*tls.Config, error)
// Plugins are the plugins that are served.
- Plugins map[string]Plugin
+ // The implied version of this PluginSet is the Handshake.ProtocolVersion.
+ Plugins PluginSet
+
+ // VersionedPlugins is a map of PluginSets for specific protocol versions.
+ // These can be used to negotiate a compatible version between client and
+ // server. If this is set, Handshake.ProtocolVersion is not required.
+ VersionedPlugins map[int]PluginSet
// GRPCServer should be non-nil to enable serving the plugins over
// gRPC. This is a function to create the server when needed with the
@@ -72,14 +86,80 @@ type ServeConfig struct {
Logger hclog.Logger
}
-// Protocol returns the protocol that this server should speak.
-func (c *ServeConfig) Protocol() Protocol {
- result := ProtocolNetRPC
- if c.GRPCServer != nil {
- result = ProtocolGRPC
+// protocolVersion determines the protocol version and plugin set to be used by
+// the server. In the event that there is no suitable version, the last version
+// in the config is returned leaving the client to report the incompatibility.
+func protocolVersion(opts *ServeConfig) (int, Protocol, PluginSet) {
+ protoVersion := int(opts.ProtocolVersion)
+ pluginSet := opts.Plugins
+ protoType := ProtocolNetRPC
+ // check if the client sent a list of acceptable versions
+ var clientVersions []int
+ if vs := os.Getenv("PLUGIN_PROTOCOL_VERSIONS"); vs != "" {
+ for _, s := range strings.Split(vs, ",") {
+ v, err := strconv.Atoi(s)
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "server sent invalid plugin version %q", s)
+ continue
+ }
+ clientVersions = append(clientVersions, v)
+ }
+ }
+
+ // we want to iterate in reverse order, to ensure we match the newest
+ // compatible plugin version.
+ sort.Sort(sort.Reverse(sort.IntSlice(clientVersions)))
+
+ // set the old un-versioned fields as if they were versioned plugins
+ if opts.VersionedPlugins == nil {
+ opts.VersionedPlugins = make(map[int]PluginSet)
+ }
+
+ if pluginSet != nil {
+ opts.VersionedPlugins[protoVersion] = pluginSet
}
- return result
+ // sort the version to make sure we match the latest first
+ var versions []int
+ for v := range opts.VersionedPlugins {
+ versions = append(versions, v)
+ }
+
+ sort.Sort(sort.Reverse(sort.IntSlice(versions)))
+
+ // see if we have multiple versions of Plugins to choose from
+ for _, version := range versions {
+ // record each version, since we guarantee that this returns valid
+ // values even if they are not a protocol match.
+ protoVersion = version
+ pluginSet = opts.VersionedPlugins[version]
+
+ // all plugins in a set must use the same transport, so check the first
+ // for the protocol type
+ for _, p := range pluginSet {
+ switch p.(type) {
+ case GRPCPlugin:
+ protoType = ProtocolGRPC
+ default:
+ protoType = ProtocolNetRPC
+ }
+ break
+ }
+
+ for _, clientVersion := range clientVersions {
+ if clientVersion == protoVersion {
+ return protoVersion, protoType, pluginSet
+ }
+ }
+ }
+
+ // Return the lowest version as the fallback.
+ // Since we iterated over all the versions in reverse order above, these
+ // values are from the lowest version number plugins (which may be from
+ // a combination of the Handshake.ProtocolVersion and ServeConfig.Plugins
+ // fields). This allows serving the oldest version of our plugins to a
+ // legacy client that did not send a PLUGIN_PROTOCOL_VERSIONS list.
+ return protoVersion, protoType, pluginSet
}
// Serve serves the plugins given by ServeConfig.
@@ -107,6 +187,10 @@ func Serve(opts *ServeConfig) {
os.Exit(1)
}
+ // negotiate the version and plugins
+ // start with default version in the handshake config
+ protoVersion, protoType, pluginSet := protocolVersion(opts)
+
// Logging goes to the original stderr
log.SetOutput(os.Stderr)
@@ -160,7 +244,7 @@ func Serve(opts *ServeConfig) {
// Build the server type
var server ServerProtocol
- switch opts.Protocol() {
+ switch protoType {
case ProtocolNetRPC:
// If we have a TLS configuration then we wrap the listener
// ourselves and do it at that level.
@@ -170,7 +254,7 @@ func Serve(opts *ServeConfig) {
// Create the RPC server to dispense
server = &RPCServer{
- Plugins: opts.Plugins,
+ Plugins: pluginSet,
Stdout: stdout_r,
Stderr: stderr_r,
DoneCh: doneCh,
@@ -179,7 +263,7 @@ func Serve(opts *ServeConfig) {
case ProtocolGRPC:
// Create the gRPC server
server = &GRPCServer{
- Plugins: opts.Plugins,
+ Plugins: pluginSet,
Server: opts.GRPCServer,
TLS: tlsConfig,
Stdout: stdout_r,
@@ -188,7 +272,7 @@ func Serve(opts *ServeConfig) {
}
default:
- panic("unknown server protocol: " + opts.Protocol())
+ panic("unknown server protocol: " + protoType)
}
// Initialize the servers
@@ -208,13 +292,13 @@ func Serve(opts *ServeConfig) {
logger.Debug("plugin address", "network", listener.Addr().Network(), "address", listener.Addr().String())
- // Output the address and service name to stdout so that core can bring it up.
+ // Output the address and service name to stdout so that the client can bring it up.
fmt.Printf("%d|%d|%s|%s|%s%s\n",
CoreProtocolVersion,
- opts.ProtocolVersion,
+ protoVersion,
listener.Addr().Network(),
listener.Addr().String(),
- opts.Protocol(),
+ protoType,
extra)
os.Stdout.Sync()
diff --git a/vendor/github.com/hashicorp/golang-lru/go.mod b/vendor/github.com/hashicorp/golang-lru/go.mod
new file mode 100644
index 000000000..824cb97e8
--- /dev/null
+++ b/vendor/github.com/hashicorp/golang-lru/go.mod
@@ -0,0 +1 @@
+module github.com/hashicorp/golang-lru
diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go
index 744cac01c..74c707744 100644
--- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go
+++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go
@@ -1,37 +1,36 @@
package simplelru
-
// LRUCache is the interface for simple LRU cache.
type LRUCache interface {
- // Adds a value to the cache, returns true if an eviction occurred and
- // updates the "recently used"-ness of the key.
- Add(key, value interface{}) bool
+ // Adds a value to the cache, returns true if an eviction occurred and
+ // updates the "recently used"-ness of the key.
+ Add(key, value interface{}) bool
- // Returns key's value from the cache and
- // updates the "recently used"-ness of the key. #value, isFound
- Get(key interface{}) (value interface{}, ok bool)
+ // Returns key's value from the cache and
+ // updates the "recently used"-ness of the key. #value, isFound
+ Get(key interface{}) (value interface{}, ok bool)
- // Check if a key exsists in cache without updating the recent-ness.
- Contains(key interface{}) (ok bool)
+ // Check if a key exsists in cache without updating the recent-ness.
+ Contains(key interface{}) (ok bool)
- // Returns key's value without updating the "recently used"-ness of the key.
- Peek(key interface{}) (value interface{}, ok bool)
+ // Returns key's value without updating the "recently used"-ness of the key.
+ Peek(key interface{}) (value interface{}, ok bool)
- // Removes a key from the cache.
- Remove(key interface{}) bool
+ // Removes a key from the cache.
+ Remove(key interface{}) bool
- // Removes the oldest entry from cache.
- RemoveOldest() (interface{}, interface{}, bool)
+ // Removes the oldest entry from cache.
+ RemoveOldest() (interface{}, interface{}, bool)
- // Returns the oldest entry from the cache. #key, value, isFound
- GetOldest() (interface{}, interface{}, bool)
+ // Returns the oldest entry from the cache. #key, value, isFound
+ GetOldest() (interface{}, interface{}, bool)
- // Returns a slice of the keys in the cache, from oldest to newest.
- Keys() []interface{}
+ // Returns a slice of the keys in the cache, from oldest to newest.
+ Keys() []interface{}
- // Returns the number of items in the cache.
- Len() int
+ // Returns the number of items in the cache.
+ Len() int
- // Clear all cache entries
- Purge()
+ // Clear all cache entries
+ Purge()
}
diff --git a/vendor/github.com/hashicorp/hcl/go.mod b/vendor/github.com/hashicorp/hcl/go.mod
new file mode 100644
index 000000000..4debbbe35
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/go.mod
@@ -0,0 +1,3 @@
+module github.com/hashicorp/hcl
+
+require github.com/davecgh/go-spew v1.1.1
diff --git a/vendor/github.com/hashicorp/hcl/go.sum b/vendor/github.com/hashicorp/hcl/go.sum
new file mode 100644
index 000000000..b5e2922e8
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/go.sum
@@ -0,0 +1,2 @@
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
diff --git a/vendor/github.com/hashicorp/yamux/go.mod b/vendor/github.com/hashicorp/yamux/go.mod
new file mode 100644
index 000000000..672a0e581
--- /dev/null
+++ b/vendor/github.com/hashicorp/yamux/go.mod
@@ -0,0 +1 @@
+module github.com/hashicorp/yamux
diff --git a/vendor/github.com/hashicorp/yamux/mux.go b/vendor/github.com/hashicorp/yamux/mux.go
index 7abc7c744..18a078c8a 100644
--- a/vendor/github.com/hashicorp/yamux/mux.go
+++ b/vendor/github.com/hashicorp/yamux/mux.go
@@ -3,6 +3,7 @@ package yamux
import (
"fmt"
"io"
+ "log"
"os"
"time"
)
@@ -30,8 +31,13 @@ type Config struct {
// window size that we allow for a stream.
MaxStreamWindowSize uint32
- // LogOutput is used to control the log destination
+ // LogOutput is used to control the log destination. Either Logger or
+ // LogOutput can be set, not both.
LogOutput io.Writer
+
+ // Logger is used to pass in the logger to be used. Either Logger or
+ // LogOutput can be set, not both.
+ Logger *log.Logger
}
// DefaultConfig is used to return a default configuration
@@ -57,6 +63,11 @@ func VerifyConfig(config *Config) error {
if config.MaxStreamWindowSize < initialStreamWindow {
return fmt.Errorf("MaxStreamWindowSize must be larger than %d", initialStreamWindow)
}
+ if config.LogOutput != nil && config.Logger != nil {
+ return fmt.Errorf("both Logger and LogOutput may not be set, select one")
+ } else if config.LogOutput == nil && config.Logger == nil {
+ return fmt.Errorf("one of Logger or LogOutput must be set, select one")
+ }
return nil
}
diff --git a/vendor/github.com/hashicorp/yamux/session.go b/vendor/github.com/hashicorp/yamux/session.go
index 32ba02e02..a80ddec35 100644
--- a/vendor/github.com/hashicorp/yamux/session.go
+++ b/vendor/github.com/hashicorp/yamux/session.go
@@ -86,9 +86,14 @@ type sendReady struct {
// newSession is used to construct a new session
func newSession(config *Config, conn io.ReadWriteCloser, client bool) *Session {
+ logger := config.Logger
+ if logger == nil {
+ logger = log.New(config.LogOutput, "", log.LstdFlags)
+ }
+
s := &Session{
config: config,
- logger: log.New(config.LogOutput, "", log.LstdFlags),
+ logger: logger,
conn: conn,
bufRead: bufio.NewReader(conn),
pings: make(map[uint32]chan struct{}),
diff --git a/vendor/github.com/konsorten/go-windows-terminal-sequences/README.md b/vendor/github.com/konsorten/go-windows-terminal-sequences/README.md
new file mode 100644
index 000000000..949b77e30
--- /dev/null
+++ b/vendor/github.com/konsorten/go-windows-terminal-sequences/README.md
@@ -0,0 +1,40 @@
+# Windows Terminal Sequences
+
+This library allow for enabling Windows terminal color support for Go.
+
+See [Console Virtual Terminal Sequences](https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences) for details.
+
+## Usage
+
+```go
+import (
+ "syscall"
+
+ sequences "github.com/konsorten/go-windows-terminal-sequences"
+)
+
+func main() {
+ sequences.EnableVirtualTerminalProcessing(syscall.Stdout, true)
+}
+
+```
+
+## Authors
+
+The tool is sponsored by the [marvin + konsorten GmbH](http://www.konsorten.de).
+
+We thank all the authors who provided code to this library:
+
+* Felix Kollmann
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2018 marvin + konsorten GmbH (open-source@konsorten.de)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/konsorten/go-windows-terminal-sequences/license b/vendor/github.com/konsorten/go-windows-terminal-sequences/license
new file mode 100644
index 000000000..14127cd83
--- /dev/null
+++ b/vendor/github.com/konsorten/go-windows-terminal-sequences/license
@@ -0,0 +1,9 @@
+(The MIT License)
+
+Copyright (c) 2017 marvin + konsorten GmbH (open-source@konsorten.de)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go b/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go
new file mode 100644
index 000000000..ef18d8f97
--- /dev/null
+++ b/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go
@@ -0,0 +1,36 @@
+// +build windows
+
+package sequences
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+var (
+ kernel32Dll *syscall.LazyDLL = syscall.NewLazyDLL("Kernel32.dll")
+ setConsoleMode *syscall.LazyProc = kernel32Dll.NewProc("SetConsoleMode")
+)
+
+func EnableVirtualTerminalProcessing(stream syscall.Handle, enable bool) error {
+ const ENABLE_VIRTUAL_TERMINAL_PROCESSING uint32 = 0x4
+
+ var mode uint32
+ err := syscall.GetConsoleMode(syscall.Stdout, &mode)
+ if err != nil {
+ return err
+ }
+
+ if enable {
+ mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING
+ } else {
+ mode &^= ENABLE_VIRTUAL_TERMINAL_PROCESSING
+ }
+
+ ret, _, err := setConsoleMode.Call(uintptr(unsafe.Pointer(stream)), uintptr(mode))
+ if ret == 0 {
+ return err
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/mattermost/viper/.gitignore b/vendor/github.com/mattermost/viper/.gitignore
index 352a34a56..01b5c44b9 100644
--- a/vendor/github.com/mattermost/viper/.gitignore
+++ b/vendor/github.com/mattermost/viper/.gitignore
@@ -21,4 +21,9 @@ _testmain.go
*.exe
*.test
-*.bench \ No newline at end of file
+*.bench
+
+.vscode
+
+# exclude dependencies in the `/vendor` folder
+vendor
diff --git a/vendor/github.com/mattermost/viper/.travis.yml b/vendor/github.com/mattermost/viper/.travis.yml
index 55960d11b..22a8a00e2 100644
--- a/vendor/github.com/mattermost/viper/.travis.yml
+++ b/vendor/github.com/mattermost/viper/.travis.yml
@@ -2,9 +2,8 @@ go_import_path: github.com/spf13/viper
language: go
go:
- - 1.7.x
- - 1.8.x
- - 1.9.x
+ - 1.10.x
+ - 1.11.x
- tip
os:
diff --git a/vendor/github.com/mattermost/viper/README.md b/vendor/github.com/mattermost/viper/README.md
index 64bf47435..87bbc8b44 100644
--- a/vendor/github.com/mattermost/viper/README.md
+++ b/vendor/github.com/mattermost/viper/README.md
@@ -191,7 +191,7 @@ _When working with ENV variables, it’s important to recognize that Viper
treats ENV variables as case sensitive._
Viper provides a mechanism to try to ensure that ENV variables are unique. By
-using `SetEnvPrefix`, you can tell Viper to use add a prefix while reading from
+using `SetEnvPrefix`, you can tell Viper to use a prefix while reading from
the environment variables. Both `BindEnv` and `AutomaticEnv` will use this
prefix.
@@ -373,12 +373,33 @@ how to use Consul.
### Remote Key/Value Store Example - Unencrypted
+#### etcd
```go
viper.AddRemoteProvider("etcd", "http://127.0.0.1:4001","/config/hugo.json")
viper.SetConfigType("json") // because there is no file extension in a stream of bytes, supported extensions are "json", "toml", "yaml", "yml", "properties", "props", "prop"
err := viper.ReadRemoteConfig()
```
+#### Consul
+You need to set a key to Consul key/value storage with JSON value containing your desired config.
+For example, create a Consul key/value store key `MY_CONSUL_KEY` with value:
+
+```json
+{
+ "port": 8080,
+ "hostname": "myhostname.com"
+}
+```
+
+```go
+viper.AddRemoteProvider("consul", "localhost:8500", "MY_CONSUL_KEY")
+viper.SetConfigType("json") // Need to explicitly set this to json
+err := viper.ReadRemoteConfig()
+
+fmt.Println(viper.Get("port")) // 8080
+fmt.Println(viper.Get("hostname")) // myhostname.com
+```
+
### Remote Key/Value Store Example - Encrypted
```go
@@ -437,6 +458,7 @@ The following functions and methods exist:
* `GetTime(key string) : time.Time`
* `GetDuration(key string) : time.Duration`
* `IsSet(key string) : bool`
+ * `AllSettings() : map[string]interface{}`
One important thing to recognize is that each Get function will return a zero
value if it’s not found. To check if a given key exists, the `IsSet()` method
@@ -590,6 +612,27 @@ if err != nil {
}
```
+### Marshalling to string
+
+You may need to marhsal all the settings held in viper into a string rather than write them to a file.
+You can use your favorite format's marshaller with the config returned by `AllSettings()`.
+
+```go
+import (
+ yaml "gopkg.in/yaml.v2"
+ // ...
+)
+
+func yamlStringSettings() string {
+ c := viper.AllSettings()
+ bs, err := yaml.Marshal(c)
+ if err != nil {
+ t.Fatalf("unable to marshal config to YAML: %v", err)
+ }
+ return string(bs)
+}
+```
+
## Viper or Vipers?
Viper comes ready to use out of the box. There is no configuration or
diff --git a/vendor/github.com/mattermost/viper/go.mod b/vendor/github.com/mattermost/viper/go.mod
new file mode 100644
index 000000000..3f4e1c227
--- /dev/null
+++ b/vendor/github.com/mattermost/viper/go.mod
@@ -0,0 +1,16 @@
+module github.com/spf13/viper
+
+require (
+ github.com/fsnotify/fsnotify v1.4.7
+ github.com/hashicorp/hcl v1.0.0
+ github.com/magiconair/properties v1.8.0
+ github.com/mitchellh/mapstructure v1.0.0
+ github.com/pelletier/go-toml v1.2.0
+ github.com/spf13/afero v1.1.2
+ github.com/spf13/cast v1.2.0
+ github.com/spf13/jwalterweatherman v1.0.0
+ github.com/spf13/pflag v1.0.2
+ golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992 // indirect
+ golang.org/x/text v0.3.0 // indirect
+ gopkg.in/yaml.v2 v2.2.1
+)
diff --git a/vendor/github.com/mattermost/viper/go.sum b/vendor/github.com/mattermost/viper/go.sum
new file mode 100644
index 000000000..3e3b874bc
--- /dev/null
+++ b/vendor/github.com/mattermost/viper/go.sum
@@ -0,0 +1,26 @@
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
+github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
+github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=
+github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
+github.com/mitchellh/mapstructure v1.0.0 h1:vVpGvMXJPqSDh2VYHF7gsfQj8Ncx+Xw5Y1KHeTRY+7I=
+github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
+github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
+github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
+github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
+github.com/spf13/cast v1.2.0 h1:HHl1DSRbEQN2i8tJmtS6ViPyHx35+p51amrdsiTCrkg=
+github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg=
+github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
+github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
+github.com/spf13/pflag v1.0.2 h1:Fy0orTDgHdbnzHcsOgfCN4LtHf0ec3wwtiwJqwvf3Gc=
+github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992 h1:BH3eQWeGbwRU2+wxxuuPOdFBmaiBH81O8BugSjHeTFg=
+golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/mattermost/viper/viper.go b/vendor/github.com/mattermost/viper/viper.go
index bb605594b..f936bc6ed 100644
--- a/vendor/github.com/mattermost/viper/viper.go
+++ b/vendor/github.com/mattermost/viper/viper.go
@@ -30,6 +30,7 @@ import (
"path/filepath"
"reflect"
"strings"
+ "sync"
"time"
yaml "gopkg.in/yaml.v2"
@@ -113,6 +114,23 @@ func (fnfe ConfigFileNotFoundError) Error() string {
return fmt.Sprintf("Config File %q Not Found in %q", fnfe.name, fnfe.locations)
}
+// A DecoderConfigOption can be passed to viper.Unmarshal to configure
+// mapstructure.DecoderConfig options
+type DecoderConfigOption func(*mapstructure.DecoderConfig)
+
+// DecodeHook returns a DecoderConfigOption which overrides the default
+// DecoderConfig.DecodeHook value, the default is:
+//
+// mapstructure.ComposeDecodeHookFunc(
+// mapstructure.StringToTimeDurationHookFunc(),
+// mapstructure.StringToSliceHookFunc(","),
+// )
+func DecodeHook(hook mapstructure.DecodeHookFunc) DecoderConfigOption {
+ return func(c *mapstructure.DecoderConfig) {
+ c.DecodeHook = hook
+ }
+}
+
// Viper is a prioritized configuration registry. It
// maintains a set of configuration sources, fetches
// values to populate those, and provides them according
@@ -259,48 +277,73 @@ func (v *Viper) OnConfigChange(run func(in fsnotify.Event)) {
}
func WatchConfig() { v.WatchConfig() }
+
func (v *Viper) WatchConfig() {
+ initWG := sync.WaitGroup{}
+ initWG.Add(1)
go func() {
watcher, err := fsnotify.NewWatcher()
if err != nil {
log.Fatal(err)
}
defer watcher.Close()
-
// we have to watch the entire directory to pick up renames/atomic saves in a cross-platform way
filename, err := v.getConfigFile()
if err != nil {
- log.Println("error:", err)
+ log.Printf("error: %v\n", err)
return
}
configFile := filepath.Clean(filename)
configDir, _ := filepath.Split(configFile)
+ realConfigFile, _ := filepath.EvalSymlinks(filename)
- done := make(chan bool)
+ eventsWG := sync.WaitGroup{}
+ eventsWG.Add(1)
go func() {
for {
select {
- case event := <-watcher.Events:
- // we only care about the config file
- if filepath.Clean(event.Name) == configFile {
- if event.Op&fsnotify.Write == fsnotify.Write || event.Op&fsnotify.Create == fsnotify.Create {
- err := v.ReadInConfig()
- if err != nil {
- log.Println("error:", err)
- }
+ case event, ok := <-watcher.Events:
+ if !ok { // 'Events' channel is closed
+ eventsWG.Done()
+ return
+ }
+ currentConfigFile, _ := filepath.EvalSymlinks(filename)
+ // we only care about the config file with the following cases:
+ // 1 - if the config file was modified or created
+ // 2 - if the real path to the config file changed (eg: k8s ConfigMap replacement)
+ const writeOrCreateMask = fsnotify.Write | fsnotify.Create
+ if (filepath.Clean(event.Name) == configFile &&
+ event.Op&writeOrCreateMask != 0) ||
+ (currentConfigFile != "" && currentConfigFile != realConfigFile) {
+ realConfigFile = currentConfigFile
+ err := v.ReadInConfig()
+ if err != nil {
+ log.Printf("error reading config file: %v\n", err)
+ }
+ if v.onConfigChange != nil {
v.onConfigChange(event)
}
+ } else if filepath.Clean(event.Name) == configFile &&
+ event.Op&fsnotify.Remove&fsnotify.Remove != 0 {
+ eventsWG.Done()
+ return
}
- case err := <-watcher.Errors:
- log.Println("error:", err)
+
+ case err, ok := <-watcher.Errors:
+ if ok { // 'Errors' channel is not closed
+ log.Printf("watcher error: %v\n", err)
+ }
+ eventsWG.Done()
+ return
}
}
}()
-
watcher.Add(configDir)
- <-done
+ initWG.Done() // done initalizing the watch in this go routine, so the parent routine can move on...
+ eventsWG.Wait() // now, wait for event loop to end in this go-routine...
}()
+ initWG.Wait() // make sure that the go routine above fully ended before returning
}
// SetConfigFile explicitly defines the path, name and extension of the config file.
@@ -631,8 +674,10 @@ func (v *Viper) Get(key string) interface{} {
return cast.ToBool(val)
case string:
return cast.ToString(val)
- case int64, int32, int16, int8, int:
+ case int32, int16, int8, int:
return cast.ToInt(val)
+ case int64:
+ return cast.ToInt64(val)
case float64, float32:
return cast.ToFloat64(val)
case time.Time:
@@ -682,6 +727,12 @@ func (v *Viper) GetInt(key string) int {
return cast.ToInt(v.Get(key))
}
+// GetInt32 returns the value associated with the key as an integer.
+func GetInt32(key string) int32 { return v.GetInt32(key) }
+func (v *Viper) GetInt32(key string) int32 {
+ return cast.ToInt32(v.Get(key))
+}
+
// GetInt64 returns the value associated with the key as an integer.
func GetInt64(key string) int64 { return v.GetInt64(key) }
func (v *Viper) GetInt64(key string) int64 {
@@ -739,9 +790,11 @@ func (v *Viper) GetSizeInBytes(key string) uint {
}
// UnmarshalKey takes a single key and unmarshals it into a Struct.
-func UnmarshalKey(key string, rawVal interface{}) error { return v.UnmarshalKey(key, rawVal) }
-func (v *Viper) UnmarshalKey(key string, rawVal interface{}) error {
- err := decode(v.Get(key), defaultDecoderConfig(rawVal))
+func UnmarshalKey(key string, rawVal interface{}, opts ...DecoderConfigOption) error {
+ return v.UnmarshalKey(key, rawVal, opts...)
+}
+func (v *Viper) UnmarshalKey(key string, rawVal interface{}, opts ...DecoderConfigOption) error {
+ err := decode(v.Get(key), defaultDecoderConfig(rawVal, opts...))
if err != nil {
return err
@@ -754,9 +807,11 @@ func (v *Viper) UnmarshalKey(key string, rawVal interface{}) error {
// Unmarshal unmarshals the config into a Struct. Make sure that the tags
// on the fields of the structure are properly set.
-func Unmarshal(rawVal interface{}) error { return v.Unmarshal(rawVal) }
-func (v *Viper) Unmarshal(rawVal interface{}) error {
- err := decode(v.AllSettings(), defaultDecoderConfig(rawVal))
+func Unmarshal(rawVal interface{}, opts ...DecoderConfigOption) error {
+ return v.Unmarshal(rawVal, opts...)
+}
+func (v *Viper) Unmarshal(rawVal interface{}, opts ...DecoderConfigOption) error {
+ err := decode(v.AllSettings(), defaultDecoderConfig(rawVal, opts...))
if err != nil {
return err
@@ -769,8 +824,8 @@ func (v *Viper) Unmarshal(rawVal interface{}) error {
// defaultDecoderConfig returns default mapsstructure.DecoderConfig with suppot
// of time.Duration values & string slices
-func defaultDecoderConfig(output interface{}) *mapstructure.DecoderConfig {
- return &mapstructure.DecoderConfig{
+func defaultDecoderConfig(output interface{}, opts ...DecoderConfigOption) *mapstructure.DecoderConfig {
+ c := &mapstructure.DecoderConfig{
Metadata: nil,
Result: output,
WeaklyTypedInput: true,
@@ -779,6 +834,10 @@ func defaultDecoderConfig(output interface{}) *mapstructure.DecoderConfig {
mapstructure.StringToSliceHookFunc(","),
),
}
+ for _, opt := range opts {
+ opt(c)
+ }
+ return c
}
// A wrapper around mapstructure.Decode that mimics the WeakDecode functionality
@@ -1108,7 +1167,7 @@ func (v *Viper) SetDefault(key string, value interface{}) {
deepestMap[lastKey] = value
}
-// Set sets the value for the key in the override regiser.
+// Set sets the value for the key in the override register.
// Set is case-insensitive for a key.
// Will be used instead of values obtained via
// flags, config file, ENV, default, or key/value store.
@@ -1682,8 +1741,8 @@ func (v *Viper) EnvSettings() map[string]interface{} {
m := map[string]interface{}{}
// start from the list of keys, and construct the map one value at a time
for _, k := range v.AllKeys() {
- _, ok := v.getEnv(v.mergeWithEnvPrefix(k))
- if !ok {
+ _, set := v.getEnv(v.mergeWithEnvPrefix(k))
+ if !set {
continue
}
path := strings.Split(k, v.keyDelim)
diff --git a/vendor/github.com/miekg/dns/.travis.yml b/vendor/github.com/miekg/dns/.travis.yml
index 542dd68c0..13e312b4f 100644
--- a/vendor/github.com/miekg/dns/.travis.yml
+++ b/vendor/github.com/miekg/dns/.travis.yml
@@ -1,7 +1,8 @@
language: go
sudo: false
go:
- - 1.9.x
+ - 1.10.x
+ - 1.11.x
- tip
env:
diff --git a/vendor/github.com/miekg/dns/Gopkg.lock b/vendor/github.com/miekg/dns/Gopkg.lock
index 0c73a6444..4455c9836 100644
--- a/vendor/github.com/miekg/dns/Gopkg.lock
+++ b/vendor/github.com/miekg/dns/Gopkg.lock
@@ -5,13 +5,13 @@
branch = "master"
name = "golang.org/x/crypto"
packages = ["ed25519","ed25519/internal/edwards25519"]
- revision = "b080dc9a8c480b08e698fb1219160d598526310f"
+ revision = "b47b1587369238182299fe4dad77d05b8b461e06"
[[projects]]
branch = "master"
name = "golang.org/x/net"
packages = ["bpf","internal/iana","internal/socket","ipv4","ipv6"]
- revision = "894f8ed5849b15b810ae41e9590a0d05395bba27"
+ revision = "1e491301e022f8f977054da4c2d852decd59571f"
[solve-meta]
analyzer-name = "dep"
diff --git a/vendor/github.com/miekg/dns/README.md b/vendor/github.com/miekg/dns/README.md
index 1ad23c751..77874642b 100644
--- a/vendor/github.com/miekg/dns/README.md
+++ b/vendor/github.com/miekg/dns/README.md
@@ -64,6 +64,9 @@ A not-so-up-to-date-list-that-may-be-actually-current:
* https://github.com/oif/apex
* https://github.com/jedisct1/dnscrypt-proxy
* https://github.com/jedisct1/rpdns
+* https://github.com/xor-gate/sshfp
+* https://github.com/rs/dnstrace
+* https://blitiri.com.ar/p/dnss ([github mirror](https://github.com/albertito/dnss))
Send pull request if you want to be listed here.
diff --git a/vendor/github.com/miekg/dns/client.go b/vendor/github.com/miekg/dns/client.go
index dd6b512af..7a319b02c 100644
--- a/vendor/github.com/miekg/dns/client.go
+++ b/vendor/github.com/miekg/dns/client.go
@@ -89,32 +89,22 @@ func (c *Client) Dial(address string) (conn *Conn, err error) {
// create a new dialer with the appropriate timeout
var d net.Dialer
if c.Dialer == nil {
- d = net.Dialer{Timeout:c.getTimeoutForRequest(c.dialTimeout())}
+ d = net.Dialer{Timeout: c.getTimeoutForRequest(c.dialTimeout())}
} else {
- d = net.Dialer(*c.Dialer)
- }
-
- network := "udp"
- useTLS := false
-
- switch c.Net {
- case "tcp-tls":
- network = "tcp"
- useTLS = true
- case "tcp4-tls":
- network = "tcp4"
- useTLS = true
- case "tcp6-tls":
- network = "tcp6"
- useTLS = true
- default:
- if c.Net != "" {
- network = c.Net
- }
+ d = *c.Dialer
+ }
+
+ network := c.Net
+ if network == "" {
+ network = "udp"
}
+ useTLS := strings.HasPrefix(network, "tcp") && strings.HasSuffix(network, "-tls")
+
conn = new(Conn)
if useTLS {
+ network = strings.TrimSuffix(network, "-tls")
+
conn.Conn, err = tls.DialWithDialer(&d, network, address, c.TLSConfig)
} else {
conn.Conn, err = d.Dial(network, address)
@@ -122,6 +112,7 @@ func (c *Client) Dial(address string) (conn *Conn, err error) {
if err != nil {
return nil, err
}
+
return conn, nil
}
diff --git a/vendor/github.com/miekg/dns/dnssec.go b/vendor/github.com/miekg/dns/dnssec.go
index 7e6bac428..26b512e7d 100644
--- a/vendor/github.com/miekg/dns/dnssec.go
+++ b/vendor/github.com/miekg/dns/dnssec.go
@@ -173,7 +173,7 @@ func (k *DNSKEY) KeyTag() uint16 {
keytag += int(v) << 8
}
}
- keytag += (keytag >> 16) & 0xFFFF
+ keytag += keytag >> 16 & 0xFFFF
keytag &= 0xFFFF
}
return uint16(keytag)
@@ -512,8 +512,8 @@ func (rr *RRSIG) ValidityPeriod(t time.Time) bool {
}
modi := (int64(rr.Inception) - utc) / year68
mode := (int64(rr.Expiration) - utc) / year68
- ti := int64(rr.Inception) + (modi * year68)
- te := int64(rr.Expiration) + (mode * year68)
+ ti := int64(rr.Inception) + modi*year68
+ te := int64(rr.Expiration) + mode*year68
return ti <= utc && utc <= te
}
@@ -533,6 +533,11 @@ func (k *DNSKEY) publicKeyRSA() *rsa.PublicKey {
return nil
}
+ if len(keybuf) < 1+1+64 {
+ // Exponent must be at least 1 byte and modulus at least 64
+ return nil
+ }
+
// RFC 2537/3110, section 2. RSA Public KEY Resource Records
// Length is in the 0th byte, unless its zero, then it
// it in bytes 1 and 2 and its a 16 bit number
@@ -542,13 +547,22 @@ func (k *DNSKEY) publicKeyRSA() *rsa.PublicKey {
explen = uint16(keybuf[1])<<8 | uint16(keybuf[2])
keyoff = 3
}
- if explen > 4 {
- // Larger exponent than supported by the crypto package.
+
+ if explen > 4 || explen == 0 || keybuf[keyoff] == 0 {
+ // Exponent larger than supported by the crypto package,
+ // empty, or contains prohibited leading zero.
+ return nil
+ }
+
+ modoff := keyoff + int(explen)
+ modlen := len(keybuf) - modoff
+ if modlen < 64 || modlen > 512 || keybuf[modoff] == 0 {
+ // Modulus is too small, large, or contains prohibited leading zero.
return nil
}
+
pubkey := new(rsa.PublicKey)
- pubkey.N = big.NewInt(0)
expo := uint64(0)
for i := 0; i < int(explen); i++ {
expo <<= 8
@@ -560,7 +574,9 @@ func (k *DNSKEY) publicKeyRSA() *rsa.PublicKey {
}
pubkey.E = int(expo)
- pubkey.N.SetBytes(keybuf[keyoff+int(explen):])
+ pubkey.N = big.NewInt(0)
+ pubkey.N.SetBytes(keybuf[modoff:])
+
return pubkey
}
diff --git a/vendor/github.com/miekg/dns/dnssec_keyscan.go b/vendor/github.com/miekg/dns/dnssec_keyscan.go
index e2d9d8f92..719198659 100644
--- a/vendor/github.com/miekg/dns/dnssec_keyscan.go
+++ b/vendor/github.com/miekg/dns/dnssec_keyscan.go
@@ -1,7 +1,6 @@
package dns
import (
- "bytes"
"crypto"
"crypto/dsa"
"crypto/ecdsa"
@@ -181,22 +180,10 @@ func readPrivateKeyED25519(m map[string]string) (ed25519.PrivateKey, error) {
if err != nil {
return nil, err
}
- if len(p1) != 32 {
+ if len(p1) != ed25519.SeedSize {
return nil, ErrPrivKey
}
- // RFC 8080 and Golang's x/crypto/ed25519 differ as to how the
- // private keys are represented. RFC 8080 specifies that private
- // keys be stored solely as the seed value (p1 above) while the
- // ed25519 package represents them as the seed value concatenated
- // to the public key, which is derived from the seed value.
- //
- // ed25519.GenerateKey reads exactly 32 bytes from the passed in
- // io.Reader and uses them as the seed. It also derives the
- // public key and produces a compatible private key.
- _, p, err = ed25519.GenerateKey(bytes.NewReader(p1))
- if err != nil {
- return nil, err
- }
+ p = ed25519.NewKeyFromSeed(p1)
case "created", "publish", "activate":
/* not used in Go (yet) */
}
diff --git a/vendor/github.com/miekg/dns/dnssec_privkey.go b/vendor/github.com/miekg/dns/dnssec_privkey.go
index 46f3215c8..0c65be17b 100644
--- a/vendor/github.com/miekg/dns/dnssec_privkey.go
+++ b/vendor/github.com/miekg/dns/dnssec_privkey.go
@@ -82,7 +82,7 @@ func (r *DNSKEY) PrivateKeyString(p crypto.PrivateKey) string {
"Public_value(y): " + pub + "\n"
case ed25519.PrivateKey:
- private := toBase64(p[:32])
+ private := toBase64(p.Seed())
return format +
"Algorithm: " + algorithm + "\n" +
"PrivateKey: " + private + "\n"
diff --git a/vendor/github.com/miekg/dns/duplicate.go b/vendor/github.com/miekg/dns/duplicate.go
new file mode 100644
index 000000000..6372e8a19
--- /dev/null
+++ b/vendor/github.com/miekg/dns/duplicate.go
@@ -0,0 +1,25 @@
+package dns
+
+//go:generate go run duplicate_generate.go
+
+// IsDuplicate checks of r1 and r2 are duplicates of each other, excluding the TTL.
+// So this means the header data is equal *and* the RDATA is the same. Return true
+// 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 {
+ return false
+ }
+ if r1.Header().Rrtype != r2.Header().Rrtype {
+ return false
+ }
+ if !isDulicateName(r1.Header().Name, r2.Header().Name) {
+ return false
+ }
+ // ignore TTL
+
+ return isDuplicateRdata(r1, r2)
+}
+
+// isDulicateName checks if the domain names s1 and s2 are equal.
+func isDulicateName(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
new file mode 100644
index 000000000..83ac1cf77
--- /dev/null
+++ b/vendor/github.com/miekg/dns/duplicate_generate.go
@@ -0,0 +1,158 @@
+//+build ignore
+
+// types_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 generate conversion tables (TypeToRR and TypeToString) and banal
+// methods (len, Header, copy) based on the struct tags. The generated source is
+// written to ztypes.go, and is meant to be checked into git.
+package main
+
+import (
+ "bytes"
+ "fmt"
+ "go/format"
+ "go/importer"
+ "go/types"
+ "log"
+ "os"
+)
+
+var packageHdr = `
+// Code generated by "go run duplicate_generate.go"; DO NOT EDIT.
+
+package dns
+
+`
+
+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()
+
+ // Collect actual types (*X)
+ var namedTypes []string
+ for _, name := range scope.Names() {
+ o := scope.Lookup(name)
+ if o == nil || !o.Exported() {
+ continue
+ }
+
+ if st, _ := getTypeStruct(o.Type(), scope); st == nil {
+ continue
+ }
+
+ if name == "PrivateRR" || name == "RFC3597" {
+ continue
+ }
+ if name == "OPT" || name == "ANY" || name == "IXFR" || name == "AXFR" {
+ continue
+ }
+
+ namedTypes = append(namedTypes, o.Name())
+ }
+
+ 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 {
+
+ o := scope.Lookup(name)
+ st, isEmbedded := getTypeStruct(o.Type(), scope)
+ if isEmbedded {
+ continue
+ }
+ fmt.Fprintf(b, "func isDuplicate%s(r1, r2 *%s) bool {\n", name, name)
+ for i := 1; i < st.NumFields(); i++ {
+ field := st.Field(i).Name()
+ o2 := func(s string) { fmt.Fprintf(b, s+"\n", field, field) }
+ o3 := func(s string) { fmt.Fprintf(b, s+"\n", field, field, field) }
+
+ // 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"` {
+ 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]) {
+ return false
+ }
+ }`)
+
+ continue
+ }
+
+ o3(`for i := 0; i < len(r1.%s); i++ {
+ if r1.%s[i] != r2.%s[i] {
+ return false
+ }
+ }`)
+
+ continue
+ }
+
+ switch st.Tag(i) {
+ case `dns:"-"`:
+ // ignored
+ case `dns:"cdomain-name"`, `dns:"domain-name"`:
+ o2("if !isDulicateName(r1.%s, r2.%s) {\nreturn false\n}")
+ default:
+ o2("if r1.%s != r2.%s {\nreturn false\n}")
+ }
+ }
+ fmt.Fprintf(b, "return true\n}\n\n")
+ }
+
+ // gofmt
+ res, err := format.Source(b.Bytes())
+ if err != nil {
+ b.WriteTo(os.Stderr)
+ log.Fatal(err)
+ }
+
+ // write result
+ f, err := os.Create("zduplicate.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/edns.go b/vendor/github.com/miekg/dns/edns.go
index 55059eb14..18d054139 100644
--- a/vendor/github.com/miekg/dns/edns.go
+++ b/vendor/github.com/miekg/dns/edns.go
@@ -92,17 +92,17 @@ func (rr *OPT) len() int {
// Version returns the EDNS version used. Only zero is defined.
func (rr *OPT) Version() uint8 {
- return uint8((rr.Hdr.Ttl & 0x00FF0000) >> 16)
+ return uint8(rr.Hdr.Ttl & 0x00FF0000 >> 16)
}
// SetVersion sets the version of EDNS. This is usually zero.
func (rr *OPT) SetVersion(v uint8) {
- rr.Hdr.Ttl = rr.Hdr.Ttl&0xFF00FFFF | (uint32(v) << 16)
+ rr.Hdr.Ttl = rr.Hdr.Ttl&0xFF00FFFF | uint32(v)<<16
}
// 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) + 15
}
// SetExtendedRcode sets the EDNS extended RCODE field.
@@ -110,7 +110,7 @@ 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)
+ rr.Hdr.Ttl = rr.Hdr.Ttl&0x00FFFFFF | uint32(v-15)<<24
}
// UDPSize returns the UDP buffer size.
diff --git a/vendor/github.com/miekg/dns/generate.go b/vendor/github.com/miekg/dns/generate.go
index e4481a4b0..3a559793f 100644
--- a/vendor/github.com/miekg/dns/generate.go
+++ b/vendor/github.com/miekg/dns/generate.go
@@ -133,10 +133,20 @@ BuildRR:
// Convert a $GENERATE modifier 0,0,d to something Printf can deal with.
func modToPrintf(s string) (string, int, error) {
- xs := strings.SplitN(s, ",", 3)
- if len(xs) != 3 {
+ xs := strings.Split(s, ",")
+
+ // Modifier is { offset [ ,width [ ,base ] ] } - provide default
+ // values for optional width and type, if necessary.
+ switch len(xs) {
+ case 1:
+ xs = append(xs, "0", "d")
+ case 2:
+ xs = append(xs, "d")
+ case 3:
+ default:
return "", 0, errors.New("bad modifier in $GENERATE")
}
+
// xs[0] is offset, xs[1] is width, xs[2] is base
if xs[2] != "o" && xs[2] != "d" && xs[2] != "x" && xs[2] != "X" {
return "", 0, errors.New("bad base in $GENERATE")
diff --git a/vendor/github.com/miekg/dns/labels.go b/vendor/github.com/miekg/dns/labels.go
index 760b89e71..577fc59d2 100644
--- a/vendor/github.com/miekg/dns/labels.go
+++ b/vendor/github.com/miekg/dns/labels.go
@@ -178,10 +178,10 @@ func equal(a, b string) bool {
ai := a[i]
bi := b[i]
if ai >= 'A' && ai <= 'Z' {
- ai |= ('a' - 'A')
+ ai |= 'a' - 'A'
}
if bi >= 'A' && bi <= 'Z' {
- bi |= ('a' - 'A')
+ bi |= 'a' - 'A'
}
if ai != bi {
return false
diff --git a/vendor/github.com/miekg/dns/listen_go111.go b/vendor/github.com/miekg/dns/listen_go111.go
new file mode 100644
index 000000000..bd024c893
--- /dev/null
+++ b/vendor/github.com/miekg/dns/listen_go111.go
@@ -0,0 +1,43 @@
+// +build go1.11,!windows
+
+package dns
+
+import (
+ "context"
+ "net"
+ "syscall"
+
+ "golang.org/x/sys/unix"
+)
+
+const supportsReusePort = true
+
+func reuseportControl(network, address string, c syscall.RawConn) error {
+ var opErr error
+ err := c.Control(func(fd uintptr) {
+ opErr = unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_REUSEPORT, 1)
+ })
+ if err != nil {
+ return err
+ }
+
+ return opErr
+}
+
+func listenTCP(network, addr string, reuseport bool) (net.Listener, error) {
+ var lc net.ListenConfig
+ if reuseport {
+ lc.Control = reuseportControl
+ }
+
+ return lc.Listen(context.Background(), network, addr)
+}
+
+func listenUDP(network, addr string, reuseport bool) (net.PacketConn, error) {
+ var lc net.ListenConfig
+ if reuseport {
+ lc.Control = reuseportControl
+ }
+
+ return lc.ListenPacket(context.Background(), network, addr)
+}
diff --git a/vendor/github.com/miekg/dns/listen_go_not111.go b/vendor/github.com/miekg/dns/listen_go_not111.go
new file mode 100644
index 000000000..f1fc652c4
--- /dev/null
+++ b/vendor/github.com/miekg/dns/listen_go_not111.go
@@ -0,0 +1,23 @@
+// +build !go1.11 windows
+
+package dns
+
+import "net"
+
+const supportsReusePort = false
+
+func listenTCP(network, addr string, reuseport bool) (net.Listener, error) {
+ if reuseport {
+ // TODO(tmthrgd): return an error?
+ }
+
+ return net.Listen(network, addr)
+}
+
+func listenUDP(network, addr string, reuseport bool) (net.PacketConn, error) {
+ if reuseport {
+ // TODO(tmthrgd): return an error?
+ }
+
+ return net.ListenPacket(network, addr)
+}
diff --git a/vendor/github.com/miekg/dns/msg.go b/vendor/github.com/miekg/dns/msg.go
index dcd3b6a5e..f8b847650 100644
--- a/vendor/github.com/miekg/dns/msg.go
+++ b/vendor/github.com/miekg/dns/msg.go
@@ -808,15 +808,15 @@ func (dns *Msg) Unpack(msg []byte) (err error) {
}
dns.Id = dh.Id
- dns.Response = (dh.Bits & _QR) != 0
+ 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.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)
// If we are at the end of the message we should return *just* the
diff --git a/vendor/github.com/miekg/dns/msg_helpers.go b/vendor/github.com/miekg/dns/msg_helpers.go
index 4a6e878de..ec8cd9a85 100644
--- a/vendor/github.com/miekg/dns/msg_helpers.go
+++ b/vendor/github.com/miekg/dns/msg_helpers.go
@@ -223,8 +223,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(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
}
@@ -363,7 +363,7 @@ func packStringHex(s string, msg []byte, off int) (int, error) {
if err != nil {
return len(msg), err
}
- if off+(len(h)) > len(msg) {
+ if off+len(h) > len(msg) {
return len(msg), &Error{err: "overflow packing hex"}
}
copy(msg[off:off+len(h)], h)
@@ -603,7 +603,7 @@ func packDataNsec(bitmap []uint16, msg []byte, off int) (int, error) {
// Setting the octets length
msg[off+1] = byte(length)
// Setting the bit value for the type in the right octet
- msg[off+1+int(length)] |= byte(1 << (7 - (t % 8)))
+ msg[off+1+int(length)] |= byte(1 << (7 - t%8))
lastwindow, lastlength = window, length
}
off += int(lastlength) + 2
diff --git a/vendor/github.com/miekg/dns/sanitize.go b/vendor/github.com/miekg/dns/sanitize.go
index c415bdd6c..cac15787a 100644
--- a/vendor/github.com/miekg/dns/sanitize.go
+++ b/vendor/github.com/miekg/dns/sanitize.go
@@ -5,6 +5,7 @@ package dns
// rrs.
// m is used to store the RRs temporary. If it is nil a new map will be allocated.
func Dedup(rrs []RR, m map[string]RR) []RR {
+
if m == nil {
m = make(map[string]RR)
}
diff --git a/vendor/github.com/miekg/dns/scan_rr.go b/vendor/github.com/miekg/dns/scan_rr.go
index fb6f95d1d..67f884b0d 100644
--- a/vendor/github.com/miekg/dns/scan_rr.go
+++ b/vendor/github.com/miekg/dns/scan_rr.go
@@ -893,19 +893,19 @@ Altitude:
if !ok {
return nil, &ParseError{f, "bad LOC Size", l}, ""
}
- rr.Size = (e & 0x0f) | (m << 4 & 0xf0)
+ 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}, ""
}
- rr.HorizPre = (e & 0x0f) | (m << 4 & 0xf0)
+ 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}, ""
}
- rr.VertPre = (e & 0x0f) | (m << 4 & 0xf0)
+ rr.VertPre = e&0x0f | m<<4&0xf0
}
count++
case zBlank:
@@ -1665,9 +1665,9 @@ func setTA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
return nil, &ParseError{f, "bad TA DigestType", l}, ""
}
rr.DigestType = uint8(i)
- s, e, c1 := endingToString(c, "bad TA Digest", f)
- if e != nil {
- return nil, e.(*ParseError), c1
+ s, err, c1 := endingToString(c, "bad TA Digest", f)
+ if err != nil {
+ return nil, err, c1
}
rr.Digest = s
return rr, nil, c1
diff --git a/vendor/github.com/miekg/dns/server.go b/vendor/github.com/miekg/dns/server.go
index 2d98f1488..2901f8724 100644
--- a/vendor/github.com/miekg/dns/server.go
+++ b/vendor/github.com/miekg/dns/server.go
@@ -4,10 +4,13 @@ package dns
import (
"bytes"
+ "context"
"crypto/tls"
"encoding/binary"
+ "errors"
"io"
"net"
+ "strings"
"sync"
"sync/atomic"
"time"
@@ -16,11 +19,22 @@ import (
// Default maximum number of TCP queries before we close the socket.
const maxTCPQueries = 128
-// Interval for stop worker if no load
+// 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
-// Maximum number of workers
-const maxWorkersCount = 10000
+// aLongTimeAgo is a non-zero time, far in the past, used for
+// immediate cancelation of network operations.
+var aLongTimeAgo = time.Unix(1, 0)
// Handler is implemented by any value that implements ServeDNS.
type Handler interface {
@@ -49,6 +63,12 @@ type ResponseWriter interface {
Hijack()
}
+// A ConnectionStater interface is used by a DNS Handler to access TLS connection state
+// when available.
+type ConnectionStater interface {
+ ConnectionState() *tls.ConnectionState
+}
+
type response struct {
msg []byte
hijacked bool // connection has been hijacked by handler
@@ -60,6 +80,7 @@ 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
}
// ServeMux is an DNS request multiplexer. It matches the
@@ -151,7 +172,7 @@ func (mux *ServeMux) match(q string, t uint16) Handler {
for i := 0; i < l; i++ {
b[i] = q[off+i]
if b[i] >= 'A' && b[i] <= 'Z' {
- b[i] |= ('a' - 'A')
+ b[i] |= 'a' - 'A'
}
}
if h, ok := mux.z[string(b[:l])]; ok { // causes garbage, might want to change the map key
@@ -305,14 +326,30 @@ type Server struct {
DecorateWriter DecorateWriter
// Maximum number of TCP queries before we close the socket. Default is maxTCPQueries (unlimited if -1).
MaxTCPQueries int
+ // 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
+
// Shutdown handling
- lock sync.RWMutex
- started bool
+ lock sync.RWMutex
+ started bool
+ shutdown chan struct{}
+ conns map[net.Conn]struct{}
+
+ // A pool for UDP message buffers.
+ udpPool sync.Pool
+}
+
+func (srv *Server) isStarted() bool {
+ srv.lock.RLock()
+ started := srv.started
+ srv.lock.RUnlock()
+ return started
}
func (srv *Server) worker(w *response) {
@@ -320,7 +357,7 @@ func (srv *Server) worker(w *response) {
for {
count := atomic.LoadInt32(&srv.workersCount)
- if count > maxWorkersCount {
+ if count > maxIdleWorkersCount {
return
}
if atomic.CompareAndSwapInt32(&srv.workersCount, count, count+1) {
@@ -360,10 +397,36 @@ func (srv *Server) spawnWorker(w *response) {
}
}
+func makeUDPBuffer(size int) func() interface{} {
+ return func() interface{} {
+ return make([]byte, size)
+ }
+}
+
+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
+ }
+
+ srv.udpPool.New = makeUDPBuffer(srv.UDPSize)
+}
+
+func unlockOnce(l sync.Locker) func() {
+ var once sync.Once
+ return func() { once.Do(l.Unlock) }
+}
+
// ListenAndServe starts a nameserver on the configured address in *Server.
func (srv *Server) ListenAndServe() error {
+ unlock := unlockOnce(&srv.lock)
srv.lock.Lock()
- defer srv.lock.Unlock()
+ defer unlock()
+
if srv.started {
return &Error{err: "server already started"}
}
@@ -372,63 +435,47 @@ func (srv *Server) ListenAndServe() error {
if addr == "" {
addr = ":domain"
}
- if srv.UDPSize == 0 {
- srv.UDPSize = MinMsgSize
- }
- srv.queue = make(chan *response)
+
+ srv.init()
defer close(srv.queue)
+
switch srv.Net {
case "tcp", "tcp4", "tcp6":
- a, err := net.ResolveTCPAddr(srv.Net, addr)
- if err != nil {
- return err
- }
- l, err := net.ListenTCP(srv.Net, a)
+ l, err := listenTCP(srv.Net, addr, srv.ReusePort)
if err != nil {
return err
}
srv.Listener = l
srv.started = true
- srv.lock.Unlock()
- err = srv.serveTCP(l)
- srv.lock.Lock() // to satisfy the defer at the top
- return err
+ unlock()
+ return srv.serveTCP(l)
case "tcp-tls", "tcp4-tls", "tcp6-tls":
- network := "tcp"
- if srv.Net == "tcp4-tls" {
- network = "tcp4"
- } else if srv.Net == "tcp6-tls" {
- network = "tcp6"
+ if srv.TLSConfig == nil || (len(srv.TLSConfig.Certificates) == 0 && srv.TLSConfig.GetCertificate == nil) {
+ return errors.New("dns: neither Certificates nor GetCertificate set in Config")
}
-
- l, err := tls.Listen(network, addr, srv.TLSConfig)
+ network := strings.TrimSuffix(srv.Net, "-tls")
+ l, err := listenTCP(network, addr, srv.ReusePort)
if err != nil {
return err
}
+ l = tls.NewListener(l, srv.TLSConfig)
srv.Listener = l
srv.started = true
- srv.lock.Unlock()
- err = srv.serveTCP(l)
- srv.lock.Lock() // to satisfy the defer at the top
- return err
+ unlock()
+ return srv.serveTCP(l)
case "udp", "udp4", "udp6":
- a, err := net.ResolveUDPAddr(srv.Net, addr)
- if err != nil {
- return err
- }
- l, err := net.ListenUDP(srv.Net, a)
+ l, err := listenUDP(srv.Net, addr, srv.ReusePort)
if err != nil {
return err
}
- if e := setUDPSocketOptions(l); e != nil {
+ u := l.(*net.UDPConn)
+ if e := setUDPSocketOptions(u); e != nil {
return e
}
srv.PacketConn = l
srv.started = true
- srv.lock.Unlock()
- err = srv.serveUDP(l)
- srv.lock.Lock() // to satisfy the defer at the top
- return err
+ unlock()
+ return srv.serveUDP(u)
}
return &Error{err: "bad network"}
}
@@ -436,20 +483,20 @@ func (srv *Server) ListenAndServe() error {
// ActivateAndServe starts a nameserver with the PacketConn or Listener
// configured in *Server. Its main use is to start a server from systemd.
func (srv *Server) ActivateAndServe() error {
+ unlock := unlockOnce(&srv.lock)
srv.lock.Lock()
- defer srv.lock.Unlock()
+ defer unlock()
+
if srv.started {
return &Error{err: "server already started"}
}
+ srv.init()
+ defer close(srv.queue)
+
pConn := srv.PacketConn
l := srv.Listener
- srv.queue = make(chan *response)
- defer close(srv.queue)
if pConn != nil {
- if srv.UDPSize == 0 {
- srv.UDPSize = MinMsgSize
- }
// Check PacketConn interface's type is valid and value
// is not nil
if t, ok := pConn.(*net.UDPConn); ok && t != nil {
@@ -457,18 +504,14 @@ func (srv *Server) ActivateAndServe() error {
return e
}
srv.started = true
- srv.lock.Unlock()
- e := srv.serveUDP(t)
- srv.lock.Lock() // to satisfy the defer at the top
- return e
+ unlock()
+ return srv.serveUDP(t)
}
}
if l != nil {
srv.started = true
- srv.lock.Unlock()
- e := srv.serveTCP(l)
- srv.lock.Lock() // to satisfy the defer at the top
- return e
+ unlock()
+ return srv.serveTCP(l)
}
return &Error{err: "bad listeners"}
}
@@ -476,23 +519,58 @@ func (srv *Server) ActivateAndServe() error {
// Shutdown shuts down a server. After a call to Shutdown, ListenAndServe and
// ActivateAndServe will return.
func (srv *Server) Shutdown() error {
+ return srv.ShutdownContext(context.Background())
+}
+
+// ShutdownContext shuts down a server. After a call to ShutdownContext,
+// ListenAndServe and ActivateAndServe will return.
+//
+// A context.Context may be passed to limit how long to wait for connections
+// to terminate.
+func (srv *Server) ShutdownContext(ctx context.Context) error {
srv.lock.Lock()
- if !srv.started {
- srv.lock.Unlock()
- return &Error{err: "server not started"}
- }
+ started := srv.started
srv.started = false
srv.lock.Unlock()
+ if !started {
+ return &Error{err: "server not started"}
+ }
+
if srv.PacketConn != nil {
- srv.PacketConn.Close()
+ srv.PacketConn.SetReadDeadline(aLongTimeAgo) // Unblock reads
}
+
if srv.Listener != nil {
srv.Listener.Close()
}
- return nil
+
+ srv.lock.Lock()
+ for rw := range srv.conns {
+ rw.SetReadDeadline(aLongTimeAgo) // Unblock reads
+ }
+ srv.lock.Unlock()
+
+ if testShutdownNotify != nil {
+ testShutdownNotify.Broadcast()
+ }
+
+ var ctxErr error
+ select {
+ case <-srv.shutdown:
+ case <-ctx.Done():
+ ctxErr = ctx.Err()
+ }
+
+ if srv.PacketConn != nil {
+ srv.PacketConn.Close()
+ }
+
+ return ctxErr
}
+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
@@ -510,22 +588,36 @@ func (srv *Server) serveTCP(l net.Listener) error {
srv.NotifyStartedFunc()
}
- for {
+ var wg sync.WaitGroup
+ defer func() {
+ wg.Wait()
+ close(srv.shutdown)
+ }()
+
+ for srv.isStarted() {
rw, err := l.Accept()
- srv.lock.RLock()
- if !srv.started {
- srv.lock.RUnlock()
- return nil
- }
- srv.lock.RUnlock()
if err != nil {
+ if !srv.isStarted() {
+ return nil
+ }
if neterr, ok := err.(net.Error); ok && neterr.Temporary() {
continue
}
return err
}
- srv.spawnWorker(&response{tsigSecret: srv.TsigSecret, tcp: rw})
+ srv.lock.Lock()
+ // Track the connection to allow unblocking reads on shutdown.
+ srv.conns[rw] = struct{}{}
+ srv.lock.Unlock()
+ wg.Add(1)
+ srv.spawnWorker(&response{
+ tsigSecret: srv.TsigSecret,
+ tcp: rw,
+ wg: &wg,
+ })
}
+
+ return nil
}
// serveUDP starts a UDP listener for the server.
@@ -541,27 +633,42 @@ func (srv *Server) serveUDP(l *net.UDPConn) error {
reader = srv.DecorateReader(reader)
}
+ var wg sync.WaitGroup
+ defer func() {
+ wg.Wait()
+ close(srv.shutdown)
+ }()
+
rtimeout := srv.getReadTimeout()
// deadline is not used here
- for {
+ for srv.isStarted() {
m, s, err := reader.ReadUDP(l, rtimeout)
- srv.lock.RLock()
- if !srv.started {
- srv.lock.RUnlock()
- return nil
- }
- srv.lock.RUnlock()
if err != nil {
+ if !srv.isStarted() {
+ return nil
+ }
if netErr, ok := err.(net.Error); ok && netErr.Temporary() {
continue
}
return err
}
if len(m) < headerSize {
+ if cap(m) == srv.UDPSize {
+ srv.udpPool.Put(m[:srv.UDPSize])
+ }
continue
}
- srv.spawnWorker(&response{msg: m, tsigSecret: srv.TsigSecret, udp: l, udpSession: s})
+ wg.Add(1)
+ srv.spawnWorker(&response{
+ msg: m,
+ tsigSecret: srv.TsigSecret,
+ udp: l,
+ udpSession: s,
+ wg: &wg,
+ })
}
+
+ return nil
}
func (srv *Server) serve(w *response) {
@@ -574,20 +681,28 @@ func (srv *Server) serve(w *response) {
if w.udp != nil {
// serve UDP
srv.serveDNS(w)
- return
- }
- reader := Reader(&defaultReader{srv})
- if srv.DecorateReader != nil {
- reader = srv.DecorateReader(reader)
+ 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})
+ if srv.DecorateReader != nil {
+ reader = srv.DecorateReader(reader)
+ }
+
idleTimeout := tcpIdleTimeout
if srv.IdleTimeout != nil {
idleTimeout = srv.IdleTimeout()
@@ -600,7 +715,7 @@ func (srv *Server) serve(w *response) {
limit = maxTCPQueries
}
- for q := 0; q < limit || limit == -1; q++ {
+ for q := 0; (q < limit || limit == -1) && srv.isStarted(); q++ {
var err error
w.msg, err = reader.ReadTCP(w.tcp, timeout)
if err != nil {
@@ -623,6 +738,10 @@ func (srv *Server) serve(w *response) {
func (srv *Server) serveDNS(w *response) {
req := new(Msg)
err := req.Unpack(w.msg)
+ if w.udp != nil && cap(w.msg) == srv.UDPSize {
+ srv.udpPool.Put(w.msg[:srv.UDPSize])
+ }
+ w.msg = nil
if err != nil { // Send a FormatError back
x := new(Msg)
x.SetRcodeFormatError(req)
@@ -691,9 +810,10 @@ func (srv *Server) readTCP(conn net.Conn, timeout time.Duration) ([]byte, error)
func (srv *Server) readUDP(conn *net.UDPConn, timeout time.Duration) ([]byte, *SessionUDP, error) {
conn.SetReadDeadline(time.Now().Add(timeout))
- m := make([]byte, srv.UDPSize)
+ m := srv.udpPool.Get().([]byte)
n, s, err := ReadFromSessionUDP(conn, m)
if err != nil {
+ srv.udpPool.Put(m)
return nil, nil, err
}
m = m[:n]
@@ -780,3 +900,15 @@ func (w *response) Close() error {
}
return nil
}
+
+// ConnectionState() implements the ConnectionStater.ConnectionState() interface.
+func (w *response) ConnectionState() *tls.ConnectionState {
+ type tlsConnectionStater interface {
+ ConnectionState() tls.ConnectionState
+ }
+ if v, ok := w.tcp.(tlsConnectionStater); ok {
+ t := v.ConnectionState()
+ return &t
+ }
+ return nil
+}
diff --git a/vendor/github.com/miekg/dns/types.go b/vendor/github.com/miekg/dns/types.go
index a779ca8ab..a64f4d7d8 100644
--- a/vendor/github.com/miekg/dns/types.go
+++ b/vendor/github.com/miekg/dns/types.go
@@ -330,7 +330,7 @@ func (rr *MX) String() string {
type AFSDB struct {
Hdr RR_Header
Subtype uint16
- Hostname string `dns:"cdomain-name"`
+ Hostname string `dns:"domain-name"`
}
func (rr *AFSDB) String() string {
@@ -728,7 +728,7 @@ func (rr *LOC) String() string {
lat = lat % LOC_DEGREES
m := lat / LOC_HOURS
lat = lat % LOC_HOURS
- s += fmt.Sprintf("%02d %02d %0.3f %s ", h, m, (float64(lat) / 1000), ns)
+ s += fmt.Sprintf("%02d %02d %0.3f %s ", h, m, float64(lat)/1000, ns)
lon := rr.Longitude
ew := "E"
@@ -742,7 +742,7 @@ func (rr *LOC) String() string {
lon = lon % LOC_DEGREES
m = lon / LOC_HOURS
lon = lon % LOC_HOURS
- s += fmt.Sprintf("%02d %02d %0.3f %s ", h, m, (float64(lon) / 1000), ew)
+ s += fmt.Sprintf("%02d %02d %0.3f %s ", h, m, float64(lon)/1000, ew)
var alt = float64(rr.Altitude) / 100
alt -= LOC_ALTITUDEBASE
@@ -752,9 +752,9 @@ func (rr *LOC) String() string {
s += fmt.Sprintf("%.0fm ", alt)
}
- s += cmToM((rr.Size&0xf0)>>4, rr.Size&0x0f) + "m "
- s += cmToM((rr.HorizPre&0xf0)>>4, rr.HorizPre&0x0f) + "m "
- s += cmToM((rr.VertPre&0xf0)>>4, rr.VertPre&0x0f) + "m"
+ s += cmToM(rr.Size&0xf0>>4, rr.Size&0x0f) + "m "
+ s += cmToM(rr.HorizPre&0xf0>>4, rr.HorizPre&0x0f) + "m "
+ s += cmToM(rr.VertPre&0xf0>>4, rr.VertPre&0x0f) + "m"
return s
}
@@ -1306,11 +1306,11 @@ func (rr *CSYNC) len() int {
// string representation used when printing the record.
// It takes serial arithmetic (RFC 1982) into account.
func TimeToString(t uint32) string {
- mod := ((int64(t) - time.Now().Unix()) / year68) - 1
+ mod := (int64(t)-time.Now().Unix())/year68 - 1
if mod < 0 {
mod = 0
}
- ti := time.Unix(int64(t)-(mod*year68), 0).UTC()
+ ti := time.Unix(int64(t)-mod*year68, 0).UTC()
return ti.Format("20060102150405")
}
@@ -1322,11 +1322,11 @@ func StringToTime(s string) (uint32, error) {
if err != nil {
return 0, err
}
- mod := (t.Unix() / year68) - 1
+ mod := t.Unix()/year68 - 1
if mod < 0 {
mod = 0
}
- return uint32(t.Unix() - (mod * year68)), nil
+ return uint32(t.Unix() - mod*year68), nil
}
// saltToString converts a NSECX salt to uppercase and returns "-" when it is empty.
diff --git a/vendor/github.com/miekg/dns/udp.go b/vendor/github.com/miekg/dns/udp.go
index a4826ee2f..82ead6939 100644
--- a/vendor/github.com/miekg/dns/udp.go
+++ b/vendor/github.com/miekg/dns/udp.go
@@ -1,5 +1,3 @@
-// +build !windows
-
package dns
import (
diff --git a/vendor/github.com/miekg/dns/udp_windows.go b/vendor/github.com/miekg/dns/udp_windows.go
deleted file mode 100644
index 6778c3c6c..000000000
--- a/vendor/github.com/miekg/dns/udp_windows.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// +build windows
-
-package dns
-
-import "net"
-
-// SessionUDP holds the remote address
-type SessionUDP struct {
- raddr *net.UDPAddr
-}
-
-// RemoteAddr returns the remote network address.
-func (s *SessionUDP) RemoteAddr() net.Addr { return s.raddr }
-
-// ReadFromSessionUDP acts just like net.UDPConn.ReadFrom(), but returns a session object instead of a
-// net.UDPAddr.
-// TODO(fastest963): Once go1.10 is released, use ReadMsgUDP.
-func ReadFromSessionUDP(conn *net.UDPConn, b []byte) (int, *SessionUDP, error) {
- n, raddr, err := conn.ReadFrom(b)
- if err != nil {
- return n, nil, err
- }
- session := &SessionUDP{raddr.(*net.UDPAddr)}
- return n, session, 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
-}
-
-// TODO(fastest963): Once go1.10 is released and we can use *MsgUDP methods
-// use the standard method in udp.go for these.
-func setUDPSocketOptions(*net.UDPConn) error { return nil }
-func parseDstFromOOB([]byte, net.IP) net.IP { return nil }
diff --git a/vendor/github.com/miekg/dns/version.go b/vendor/github.com/miekg/dns/version.go
index dcc84e4a7..ade7586dc 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, 8}
+var Version = V{1, 0, 10}
// V holds the version of this library.
type V struct {
diff --git a/vendor/github.com/miekg/dns/zcompress.go b/vendor/github.com/miekg/dns/zcompress.go
index a2c09dd48..6391a3501 100644
--- a/vendor/github.com/miekg/dns/zcompress.go
+++ b/vendor/github.com/miekg/dns/zcompress.go
@@ -109,9 +109,6 @@ func compressionLenHelperType(c map[string]int, r RR, initLen int) int {
func compressionLenSearchType(c map[string]int, r RR) (int, bool, int) {
switch x := r.(type) {
- case *AFSDB:
- k1, ok1, sz1 := compressionLenSearch(c, x.Hostname)
- return k1, ok1, sz1
case *CNAME:
k1, ok1, sz1 := compressionLenSearch(c, x.Target)
return k1, ok1, sz1
diff --git a/vendor/github.com/miekg/dns/zduplicate.go b/vendor/github.com/miekg/dns/zduplicate.go
new file mode 100644
index 000000000..ba9863b23
--- /dev/null
+++ b/vendor/github.com/miekg/dns/zduplicate.go
@@ -0,0 +1,943 @@
+// Code generated by "go run duplicate_generate.go"; DO NOT EDIT.
+
+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) {
+ return false
+ }
+ for i := 0; i < len(r1.A); i++ {
+ if r1.A[i] != r2.A[i] {
+ return false
+ }
+ }
+ return true
+}
+
+func isDuplicateAAAA(r1, r2 *AAAA) bool {
+ if len(r1.AAAA) != len(r2.AAAA) {
+ return false
+ }
+ for i := 0; i < len(r1.AAAA); i++ {
+ if r1.AAAA[i] != r2.AAAA[i] {
+ return false
+ }
+ }
+ return true
+}
+
+func isDuplicateAFSDB(r1, r2 *AFSDB) bool {
+ if r1.Subtype != r2.Subtype {
+ return false
+ }
+ if !isDulicateName(r1.Hostname, r2.Hostname) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateAVC(r1, r2 *AVC) bool {
+ if len(r1.Txt) != len(r2.Txt) {
+ return false
+ }
+ for i := 0; i < len(r1.Txt); i++ {
+ if r1.Txt[i] != r2.Txt[i] {
+ return false
+ }
+ }
+ return true
+}
+
+func isDuplicateCAA(r1, r2 *CAA) bool {
+ if r1.Flag != r2.Flag {
+ return false
+ }
+ if r1.Tag != r2.Tag {
+ return false
+ }
+ if r1.Value != r2.Value {
+ return false
+ }
+ return true
+}
+
+func isDuplicateCERT(r1, r2 *CERT) bool {
+ if r1.Type != r2.Type {
+ return false
+ }
+ if r1.KeyTag != r2.KeyTag {
+ return false
+ }
+ if r1.Algorithm != r2.Algorithm {
+ return false
+ }
+ if r1.Certificate != r2.Certificate {
+ return false
+ }
+ return true
+}
+
+func isDuplicateCNAME(r1, r2 *CNAME) bool {
+ if !isDulicateName(r1.Target, r2.Target) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateCSYNC(r1, r2 *CSYNC) bool {
+ if r1.Serial != r2.Serial {
+ return false
+ }
+ if r1.Flags != r2.Flags {
+ return false
+ }
+ if len(r1.TypeBitMap) != len(r2.TypeBitMap) {
+ return false
+ }
+ for i := 0; i < len(r1.TypeBitMap); i++ {
+ if r1.TypeBitMap[i] != r2.TypeBitMap[i] {
+ return false
+ }
+ }
+ return true
+}
+
+func isDuplicateDHCID(r1, r2 *DHCID) bool {
+ if r1.Digest != r2.Digest {
+ return false
+ }
+ return true
+}
+
+func isDuplicateDNAME(r1, r2 *DNAME) bool {
+ if !isDulicateName(r1.Target, r2.Target) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateDNSKEY(r1, r2 *DNSKEY) bool {
+ if r1.Flags != r2.Flags {
+ return false
+ }
+ if r1.Protocol != r2.Protocol {
+ return false
+ }
+ if r1.Algorithm != r2.Algorithm {
+ return false
+ }
+ if r1.PublicKey != r2.PublicKey {
+ return false
+ }
+ return true
+}
+
+func isDuplicateDS(r1, r2 *DS) bool {
+ if r1.KeyTag != r2.KeyTag {
+ return false
+ }
+ if r1.Algorithm != r2.Algorithm {
+ return false
+ }
+ if r1.DigestType != r2.DigestType {
+ return false
+ }
+ if r1.Digest != r2.Digest {
+ return false
+ }
+ return true
+}
+
+func isDuplicateEID(r1, r2 *EID) bool {
+ if r1.Endpoint != r2.Endpoint {
+ return false
+ }
+ return true
+}
+
+func isDuplicateEUI48(r1, r2 *EUI48) bool {
+ if r1.Address != r2.Address {
+ return false
+ }
+ return true
+}
+
+func isDuplicateEUI64(r1, r2 *EUI64) bool {
+ if r1.Address != r2.Address {
+ return false
+ }
+ return true
+}
+
+func isDuplicateGID(r1, r2 *GID) bool {
+ if r1.Gid != r2.Gid {
+ return false
+ }
+ return true
+}
+
+func isDuplicateGPOS(r1, r2 *GPOS) bool {
+ if r1.Longitude != r2.Longitude {
+ return false
+ }
+ if r1.Latitude != r2.Latitude {
+ return false
+ }
+ if r1.Altitude != r2.Altitude {
+ return false
+ }
+ return true
+}
+
+func isDuplicateHINFO(r1, r2 *HINFO) bool {
+ if r1.Cpu != r2.Cpu {
+ return false
+ }
+ if r1.Os != r2.Os {
+ return false
+ }
+ return true
+}
+
+func isDuplicateHIP(r1, r2 *HIP) bool {
+ if r1.HitLength != r2.HitLength {
+ return false
+ }
+ if r1.PublicKeyAlgorithm != r2.PublicKeyAlgorithm {
+ return false
+ }
+ if r1.PublicKeyLength != r2.PublicKeyLength {
+ return false
+ }
+ if r1.Hit != r2.Hit {
+ return false
+ }
+ if r1.PublicKey != r2.PublicKey {
+ return false
+ }
+ if len(r1.RendezvousServers) != len(r2.RendezvousServers) {
+ return false
+ }
+ for i := 0; i < len(r1.RendezvousServers); i++ {
+ if !isDulicateName(r1.RendezvousServers[i], r2.RendezvousServers[i]) {
+ return false
+ }
+ }
+ return true
+}
+
+func isDuplicateKX(r1, r2 *KX) bool {
+ if r1.Preference != r2.Preference {
+ return false
+ }
+ if !isDulicateName(r1.Exchanger, r2.Exchanger) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateL32(r1, r2 *L32) bool {
+ if r1.Preference != r2.Preference {
+ return false
+ }
+ if len(r1.Locator32) != len(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 {
+ if r1.Preference != r2.Preference {
+ return false
+ }
+ if r1.Locator64 != r2.Locator64 {
+ return false
+ }
+ return true
+}
+
+func isDuplicateLOC(r1, r2 *LOC) bool {
+ if r1.Version != r2.Version {
+ return false
+ }
+ if r1.Size != r2.Size {
+ return false
+ }
+ if r1.HorizPre != r2.HorizPre {
+ return false
+ }
+ if r1.VertPre != r2.VertPre {
+ return false
+ }
+ if r1.Latitude != r2.Latitude {
+ return false
+ }
+ if r1.Longitude != r2.Longitude {
+ return false
+ }
+ if r1.Altitude != r2.Altitude {
+ return false
+ }
+ return true
+}
+
+func isDuplicateLP(r1, r2 *LP) bool {
+ if r1.Preference != r2.Preference {
+ return false
+ }
+ if !isDulicateName(r1.Fqdn, r2.Fqdn) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateMB(r1, r2 *MB) bool {
+ if !isDulicateName(r1.Mb, r2.Mb) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateMD(r1, r2 *MD) bool {
+ if !isDulicateName(r1.Md, r2.Md) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateMF(r1, r2 *MF) bool {
+ if !isDulicateName(r1.Mf, r2.Mf) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateMG(r1, r2 *MG) bool {
+ if !isDulicateName(r1.Mg, r2.Mg) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateMINFO(r1, r2 *MINFO) bool {
+ if !isDulicateName(r1.Rmail, r2.Rmail) {
+ return false
+ }
+ if !isDulicateName(r1.Email, r2.Email) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateMR(r1, r2 *MR) bool {
+ if !isDulicateName(r1.Mr, r2.Mr) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateMX(r1, r2 *MX) bool {
+ if r1.Preference != r2.Preference {
+ return false
+ }
+ if !isDulicateName(r1.Mx, r2.Mx) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateNAPTR(r1, r2 *NAPTR) bool {
+ if r1.Order != r2.Order {
+ return false
+ }
+ if r1.Preference != r2.Preference {
+ return false
+ }
+ if r1.Flags != r2.Flags {
+ return false
+ }
+ if r1.Service != r2.Service {
+ return false
+ }
+ if r1.Regexp != r2.Regexp {
+ return false
+ }
+ if !isDulicateName(r1.Replacement, r2.Replacement) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateNID(r1, r2 *NID) bool {
+ if r1.Preference != r2.Preference {
+ return false
+ }
+ if r1.NodeID != r2.NodeID {
+ return false
+ }
+ return true
+}
+
+func isDuplicateNIMLOC(r1, r2 *NIMLOC) bool {
+ if r1.Locator != r2.Locator {
+ return false
+ }
+ return true
+}
+
+func isDuplicateNINFO(r1, r2 *NINFO) bool {
+ if len(r1.ZSData) != len(r2.ZSData) {
+ return false
+ }
+ for i := 0; i < len(r1.ZSData); i++ {
+ if r1.ZSData[i] != r2.ZSData[i] {
+ return false
+ }
+ }
+ return true
+}
+
+func isDuplicateNS(r1, r2 *NS) bool {
+ if !isDulicateName(r1.Ns, r2.Ns) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateNSAPPTR(r1, r2 *NSAPPTR) bool {
+ if !isDulicateName(r1.Ptr, r2.Ptr) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateNSEC(r1, r2 *NSEC) bool {
+ if !isDulicateName(r1.NextDomain, r2.NextDomain) {
+ return false
+ }
+ if len(r1.TypeBitMap) != len(r2.TypeBitMap) {
+ return false
+ }
+ for i := 0; i < len(r1.TypeBitMap); i++ {
+ if r1.TypeBitMap[i] != r2.TypeBitMap[i] {
+ return false
+ }
+ }
+ return true
+}
+
+func isDuplicateNSEC3(r1, r2 *NSEC3) bool {
+ if r1.Hash != r2.Hash {
+ return false
+ }
+ if r1.Flags != r2.Flags {
+ return false
+ }
+ if r1.Iterations != r2.Iterations {
+ return false
+ }
+ if r1.SaltLength != r2.SaltLength {
+ return false
+ }
+ if r1.Salt != r2.Salt {
+ return false
+ }
+ if r1.HashLength != r2.HashLength {
+ return false
+ }
+ if r1.NextDomain != r2.NextDomain {
+ return false
+ }
+ if len(r1.TypeBitMap) != len(r2.TypeBitMap) {
+ return false
+ }
+ for i := 0; i < len(r1.TypeBitMap); i++ {
+ if r1.TypeBitMap[i] != r2.TypeBitMap[i] {
+ return false
+ }
+ }
+ return true
+}
+
+func isDuplicateNSEC3PARAM(r1, r2 *NSEC3PARAM) bool {
+ if r1.Hash != r2.Hash {
+ return false
+ }
+ if r1.Flags != r2.Flags {
+ return false
+ }
+ if r1.Iterations != r2.Iterations {
+ return false
+ }
+ if r1.SaltLength != r2.SaltLength {
+ return false
+ }
+ if r1.Salt != r2.Salt {
+ return false
+ }
+ return true
+}
+
+func isDuplicateOPENPGPKEY(r1, r2 *OPENPGPKEY) bool {
+ if r1.PublicKey != r2.PublicKey {
+ return false
+ }
+ return true
+}
+
+func isDuplicatePTR(r1, r2 *PTR) bool {
+ if !isDulicateName(r1.Ptr, r2.Ptr) {
+ return false
+ }
+ return true
+}
+
+func isDuplicatePX(r1, r2 *PX) bool {
+ if r1.Preference != r2.Preference {
+ return false
+ }
+ if !isDulicateName(r1.Map822, r2.Map822) {
+ return false
+ }
+ if !isDulicateName(r1.Mapx400, r2.Mapx400) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateRKEY(r1, r2 *RKEY) bool {
+ if r1.Flags != r2.Flags {
+ return false
+ }
+ if r1.Protocol != r2.Protocol {
+ return false
+ }
+ if r1.Algorithm != r2.Algorithm {
+ return false
+ }
+ if r1.PublicKey != r2.PublicKey {
+ return false
+ }
+ return true
+}
+
+func isDuplicateRP(r1, r2 *RP) bool {
+ if !isDulicateName(r1.Mbox, r2.Mbox) {
+ return false
+ }
+ if !isDulicateName(r1.Txt, r2.Txt) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateRRSIG(r1, r2 *RRSIG) bool {
+ if r1.TypeCovered != r2.TypeCovered {
+ return false
+ }
+ if r1.Algorithm != r2.Algorithm {
+ return false
+ }
+ if r1.Labels != r2.Labels {
+ return false
+ }
+ if r1.OrigTtl != r2.OrigTtl {
+ return false
+ }
+ if r1.Expiration != r2.Expiration {
+ return false
+ }
+ if r1.Inception != r2.Inception {
+ return false
+ }
+ if r1.KeyTag != r2.KeyTag {
+ return false
+ }
+ if !isDulicateName(r1.SignerName, r2.SignerName) {
+ return false
+ }
+ if r1.Signature != r2.Signature {
+ return false
+ }
+ return true
+}
+
+func isDuplicateRT(r1, r2 *RT) bool {
+ if r1.Preference != r2.Preference {
+ return false
+ }
+ if !isDulicateName(r1.Host, r2.Host) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateSMIMEA(r1, r2 *SMIMEA) bool {
+ if r1.Usage != r2.Usage {
+ return false
+ }
+ if r1.Selector != r2.Selector {
+ return false
+ }
+ if r1.MatchingType != r2.MatchingType {
+ return false
+ }
+ if r1.Certificate != r2.Certificate {
+ return false
+ }
+ return true
+}
+
+func isDuplicateSOA(r1, r2 *SOA) bool {
+ if !isDulicateName(r1.Ns, r2.Ns) {
+ return false
+ }
+ if !isDulicateName(r1.Mbox, r2.Mbox) {
+ return false
+ }
+ if r1.Serial != r2.Serial {
+ return false
+ }
+ if r1.Refresh != r2.Refresh {
+ return false
+ }
+ if r1.Retry != r2.Retry {
+ return false
+ }
+ if r1.Expire != r2.Expire {
+ return false
+ }
+ if r1.Minttl != r2.Minttl {
+ return false
+ }
+ return true
+}
+
+func isDuplicateSPF(r1, r2 *SPF) bool {
+ if len(r1.Txt) != len(r2.Txt) {
+ return false
+ }
+ for i := 0; i < len(r1.Txt); i++ {
+ if r1.Txt[i] != r2.Txt[i] {
+ return false
+ }
+ }
+ return true
+}
+
+func isDuplicateSRV(r1, r2 *SRV) bool {
+ if r1.Priority != r2.Priority {
+ return false
+ }
+ if r1.Weight != r2.Weight {
+ return false
+ }
+ if r1.Port != r2.Port {
+ return false
+ }
+ if !isDulicateName(r1.Target, r2.Target) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateSSHFP(r1, r2 *SSHFP) bool {
+ if r1.Algorithm != r2.Algorithm {
+ return false
+ }
+ if r1.Type != r2.Type {
+ return false
+ }
+ if r1.FingerPrint != r2.FingerPrint {
+ return false
+ }
+ return true
+}
+
+func isDuplicateTA(r1, r2 *TA) bool {
+ if r1.KeyTag != r2.KeyTag {
+ return false
+ }
+ if r1.Algorithm != r2.Algorithm {
+ return false
+ }
+ if r1.DigestType != r2.DigestType {
+ return false
+ }
+ if r1.Digest != r2.Digest {
+ return false
+ }
+ return true
+}
+
+func isDuplicateTALINK(r1, r2 *TALINK) bool {
+ if !isDulicateName(r1.PreviousName, r2.PreviousName) {
+ return false
+ }
+ if !isDulicateName(r1.NextName, r2.NextName) {
+ return false
+ }
+ return true
+}
+
+func isDuplicateTKEY(r1, r2 *TKEY) bool {
+ if !isDulicateName(r1.Algorithm, r2.Algorithm) {
+ return false
+ }
+ if r1.Inception != r2.Inception {
+ return false
+ }
+ if r1.Expiration != r2.Expiration {
+ return false
+ }
+ if r1.Mode != r2.Mode {
+ return false
+ }
+ if r1.Error != r2.Error {
+ return false
+ }
+ if r1.KeySize != r2.KeySize {
+ return false
+ }
+ if r1.Key != r2.Key {
+ return false
+ }
+ if r1.OtherLen != r2.OtherLen {
+ return false
+ }
+ if r1.OtherData != r2.OtherData {
+ return false
+ }
+ return true
+}
+
+func isDuplicateTLSA(r1, r2 *TLSA) bool {
+ if r1.Usage != r2.Usage {
+ return false
+ }
+ if r1.Selector != r2.Selector {
+ return false
+ }
+ if r1.MatchingType != r2.MatchingType {
+ return false
+ }
+ if r1.Certificate != r2.Certificate {
+ return false
+ }
+ return true
+}
+
+func isDuplicateTSIG(r1, r2 *TSIG) bool {
+ if !isDulicateName(r1.Algorithm, r2.Algorithm) {
+ return false
+ }
+ if r1.TimeSigned != r2.TimeSigned {
+ return false
+ }
+ if r1.Fudge != r2.Fudge {
+ return false
+ }
+ if r1.MACSize != r2.MACSize {
+ return false
+ }
+ if r1.MAC != r2.MAC {
+ return false
+ }
+ if r1.OrigId != r2.OrigId {
+ return false
+ }
+ if r1.Error != r2.Error {
+ return false
+ }
+ if r1.OtherLen != r2.OtherLen {
+ return false
+ }
+ if r1.OtherData != r2.OtherData {
+ return false
+ }
+ return true
+}
+
+func isDuplicateTXT(r1, r2 *TXT) bool {
+ if len(r1.Txt) != len(r2.Txt) {
+ return false
+ }
+ for i := 0; i < len(r1.Txt); i++ {
+ if r1.Txt[i] != r2.Txt[i] {
+ return false
+ }
+ }
+ return true
+}
+
+func isDuplicateUID(r1, r2 *UID) bool {
+ if r1.Uid != r2.Uid {
+ return false
+ }
+ return true
+}
+
+func isDuplicateUINFO(r1, r2 *UINFO) bool {
+ if r1.Uinfo != r2.Uinfo {
+ return false
+ }
+ return true
+}
+
+func isDuplicateURI(r1, r2 *URI) bool {
+ if r1.Priority != r2.Priority {
+ return false
+ }
+ if r1.Weight != r2.Weight {
+ return false
+ }
+ if r1.Target != r2.Target {
+ return false
+ }
+ return true
+}
+
+func isDuplicateX25(r1, r2 *X25) bool {
+ if r1.PSDNAddress != r2.PSDNAddress {
+ return false
+ }
+ return true
+}
diff --git a/vendor/github.com/miekg/dns/zmsg.go b/vendor/github.com/miekg/dns/zmsg.go
index 0d1f6f4da..1a68f74da 100644
--- a/vendor/github.com/miekg/dns/zmsg.go
+++ b/vendor/github.com/miekg/dns/zmsg.go
@@ -42,7 +42,7 @@ func (rr *AFSDB) pack(msg []byte, off int, compression map[string]int, compress
if err != nil {
return off, err
}
- off, err = PackDomainName(rr.Hostname, msg, off, compression, compress)
+ off, err = PackDomainName(rr.Hostname, msg, off, compression, false)
if err != nil {
return off, err
}
diff --git a/vendor/github.com/minio/minio-go/README.md b/vendor/github.com/minio/minio-go/README.md
index e004a4b05..9ac8ca424 100644
--- a/vendor/github.com/minio/minio-go/README.md
+++ b/vendor/github.com/minio/minio-go/README.md
@@ -14,9 +14,9 @@ go get -u github.com/minio/minio-go
## Initialize Minio Client
Minio client requires the following four parameters specified to connect to an Amazon S3 compatible object storage.
-| Parameter | Description|
+| Parameter | Description|
| :--- | :--- |
-| endpoint | URL to object storage service. |
+| endpoint | URL to object storage service. |
| accessKeyID | Access key is the user ID that uniquely identifies your account. |
| secretAccessKey | Secret key is the password to your account. |
| secure | Set this value to 'true' to enable secure (HTTPS) access. |
@@ -106,7 +106,7 @@ func main() {
### Run FileUploader
```sh
go run file-uploader.go
-2016/08/13 17:03:28 Successfully created mymusic
+2016/08/13 17:03:28 Successfully created mymusic
2016/08/13 17:03:40 Successfully uploaded golden-oldies.zip of size 16253413
mc ls play/mymusic/
@@ -114,7 +114,7 @@ mc ls play/mymusic/
```
## API Reference
-The full API Reference is available here.
+The full API Reference is available here.
* [Complete API Reference](https://docs.minio.io/docs/golang-client-api-reference)
@@ -154,6 +154,8 @@ The full API Reference is available here.
* [`RemoveObject`](https://docs.minio.io/docs/golang-client-api-reference#RemoveObject)
* [`RemoveObjects`](https://docs.minio.io/docs/golang-client-api-reference#RemoveObjects)
* [`RemoveIncompleteUpload`](https://docs.minio.io/docs/golang-client-api-reference#RemoveIncompleteUpload)
+* [`SelectObjectContent`](https://docs.minio.io/docs/golang-client-api-reference#SelectObjectContent)
+
### API Reference : Presigned Operations
* [`PresignedGetObject`](https://docs.minio.io/docs/golang-client-api-reference#PresignedGetObject)
@@ -182,7 +184,11 @@ The full API Reference is available here.
* [setbucketpolicy.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketpolicy.go)
* [getbucketpolicy.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketpolicy.go)
* [listbucketpolicies.go](https://github.com/minio/minio-go/blob/master/examples/s3/listbucketpolicies.go)
-
+
+### Full Examples : Bucket lifecycle Operations
+* [setbucketlifecycle.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketlifecycle.go)
+* [getbucketlifecycle.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketlifecycle.go)
+
### Full Examples : Bucket notification Operations
* [setbucketnotification.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketnotification.go)
* [getbucketnotification.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketnotification.go)
@@ -219,7 +225,7 @@ The full API Reference is available here.
## Explore Further
* [Complete Documentation](https://docs.minio.io)
-* [Minio Go Client SDK API Reference](https://docs.minio.io/docs/golang-client-api-reference)
+* [Minio Go Client SDK API Reference](https://docs.minio.io/docs/golang-client-api-reference)
* [Go Music Player App Full Application Example](https://docs.minio.io/docs/go-music-player-app)
## Contribute
diff --git a/vendor/github.com/minio/minio-go/api-compose-object.go b/vendor/github.com/minio/minio-go/api-compose-object.go
index 5d3ede70d..a69122e40 100644
--- a/vendor/github.com/minio/minio-go/api-compose-object.go
+++ b/vendor/github.com/minio/minio-go/api-compose-object.go
@@ -101,7 +101,11 @@ func (d *DestinationInfo) getUserMetaHeadersMap(withCopyDirectiveHeader bool) ma
r["x-amz-metadata-directive"] = "REPLACE"
}
for k, v := range d.userMetadata {
- r["x-amz-meta-"+k] = v
+ if isAmzHeader(k) || isStandardHeader(k) || isStorageClassHeader(k) {
+ r[k] = v
+ } else {
+ r["x-amz-meta-"+k] = v
+ }
}
return r
}
@@ -373,15 +377,6 @@ func (c Client) ComposeObjectWithProgress(dst DestinationInfo, srcs []SourceInfo
fmt.Sprintf("Client side encryption is used in source object %s/%s", src.bucket, src.object))
}
- // Since we did a HEAD to get size, we use the ETag
- // value to make sure the object has not changed by
- // the time we perform the copy. This is done, only if
- // the user has not set their own ETag match
- // condition.
- if src.Headers.Get("x-amz-copy-source-if-match") == "" {
- src.SetMatchETagCond(etag)
- }
-
// Check if a segment is specified, and if so, is the
// segment within object bounds?
if src.start != -1 {
@@ -429,7 +424,15 @@ func (c Client) ComposeObjectWithProgress(dst DestinationInfo, srcs []SourceInfo
// Now, handle multipart-copy cases.
- // 1. Initiate a new multipart upload.
+ // 1. Ensure that the object has not been changed while
+ // we are copying data.
+ for _, src := range srcs {
+ if src.Headers.Get("x-amz-copy-source-if-match") == "" {
+ src.SetMatchETagCond(etag)
+ }
+ }
+
+ // 2. Initiate a new multipart upload.
// Set user-metadata on the destination object. If no
// user-metadata is specified, and there is only one source,
@@ -449,13 +452,13 @@ func (c Client) ComposeObjectWithProgress(dst DestinationInfo, srcs []SourceInfo
return err
}
- // 2. Perform copy part uploads
+ // 3. Perform copy part uploads
objParts := []CompletePart{}
partIndex := 1
for i, src := range srcs {
h := src.Headers
if src.encryption != nil {
- src.encryption.Marshal(h)
+ encrypt.SSECopy(src.encryption).Marshal(h)
}
// Add destination encryption headers
if dst.encryption != nil {
@@ -480,14 +483,14 @@ func (c Client) ComposeObjectWithProgress(dst DestinationInfo, srcs []SourceInfo
return err
}
if progress != nil {
- io.CopyN(ioutil.Discard, progress, start+end-1)
+ io.CopyN(ioutil.Discard, progress, end-start+1)
}
objParts = append(objParts, complPart)
partIndex++
}
}
- // 3. Make final complete-multipart request.
+ // 4. Make final complete-multipart request.
_, err = c.completeMultipartUpload(ctx, dst.bucket, dst.object, uploadID,
completeMultipartUpload{Parts: objParts})
if err != nil {
diff --git a/vendor/github.com/minio/minio-go/api-get-lifecycle.go b/vendor/github.com/minio/minio-go/api-get-lifecycle.go
new file mode 100644
index 000000000..8097bfc02
--- /dev/null
+++ b/vendor/github.com/minio/minio-go/api-get-lifecycle.go
@@ -0,0 +1,77 @@
+/*
+ * Minio Go Library for Amazon S3 Compatible Cloud Storage
+ * Copyright 2015-2017 Minio, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package minio
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+
+ "github.com/minio/minio-go/pkg/s3utils"
+)
+
+// GetBucketLifecycle - get bucket lifecycle.
+func (c Client) GetBucketLifecycle(bucketName string) (string, error) {
+ // Input validation.
+ if err := s3utils.CheckValidBucketName(bucketName); err != nil {
+ return "", err
+ }
+ bucketLifecycle, err := c.getBucketLifecycle(bucketName)
+ if err != nil {
+ errResponse := ToErrorResponse(err)
+ if errResponse.Code == "NoSuchLifecycleConfiguration" {
+ return "", nil
+ }
+ return "", err
+ }
+ return bucketLifecycle, nil
+}
+
+// Request server for current bucket lifecycle.
+func (c Client) getBucketLifecycle(bucketName string) (string, error) {
+ // Get resources properly escaped and lined up before
+ // using them in http request.
+ urlValues := make(url.Values)
+ urlValues.Set("lifecycle", "")
+
+ // Execute GET on bucket to get lifecycle.
+ resp, err := c.executeMethod(context.Background(), "GET", requestMetadata{
+ bucketName: bucketName,
+ queryValues: urlValues,
+ })
+
+ defer closeResponse(resp)
+ if err != nil {
+ return "", err
+ }
+
+ if resp != nil {
+ if resp.StatusCode != http.StatusOK {
+ return "", httpRespToErrorResponse(resp, bucketName, "")
+ }
+ }
+
+ bucketLifecycleBuf, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return "", err
+ }
+
+ lifecycle := string(bucketLifecycleBuf)
+ return lifecycle, err
+}
diff --git a/vendor/github.com/minio/minio-go/api-get-object-acl.go b/vendor/github.com/minio/minio-go/api-get-object-acl.go
new file mode 100644
index 000000000..af5544da3
--- /dev/null
+++ b/vendor/github.com/minio/minio-go/api-get-object-acl.go
@@ -0,0 +1,136 @@
+/*
+ * Minio Go Library for Amazon S3 Compatible Cloud Storage
+ * Copyright 2018 Minio, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package minio
+
+import (
+ "context"
+ "net/http"
+ "net/url"
+)
+
+type accessControlPolicy struct {
+ Owner struct {
+ ID string `xml:"ID"`
+ DisplayName string `xml:"DisplayName"`
+ } `xml:"Owner"`
+ AccessControlList struct {
+ Grant []struct {
+ Grantee struct {
+ ID string `xml:"ID"`
+ DisplayName string `xml:"DisplayName"`
+ URI string `xml:"URI"`
+ } `xml:"Grantee"`
+ Permission string `xml:"Permission"`
+ } `xml:"Grant"`
+ } `xml:"AccessControlList"`
+}
+
+//GetObjectACL get object ACLs
+func (c Client) GetObjectACL(bucketName, objectName string) (*ObjectInfo, error) {
+
+ resp, err := c.executeMethod(context.Background(), "GET", requestMetadata{
+ bucketName: bucketName,
+ objectName: objectName,
+ queryValues: url.Values{
+ "acl": []string{""},
+ },
+ })
+ if err != nil {
+ return nil, err
+ }
+ defer closeResponse(resp)
+
+ if resp.StatusCode != http.StatusOK {
+ return nil, httpRespToErrorResponse(resp, bucketName, objectName)
+ }
+
+ res := &accessControlPolicy{}
+
+ if err := xmlDecoder(resp.Body, res); err != nil {
+ return nil, err
+ }
+
+ objInfo, err := c.statObject(context.Background(), bucketName, objectName, StatObjectOptions{})
+ if err != nil {
+ return nil, err
+ }
+
+ cannedACL := getCannedACL(res)
+ if cannedACL != "" {
+ objInfo.Metadata.Add("X-Amz-Acl", cannedACL)
+ return &objInfo, nil
+ }
+
+ grantACL := getAmzGrantACL(res)
+ for k, v := range grantACL {
+ objInfo.Metadata[k] = v
+ }
+
+ return &objInfo, nil
+}
+
+func getCannedACL(aCPolicy *accessControlPolicy) string {
+ grants := aCPolicy.AccessControlList.Grant
+
+ switch {
+ case len(grants) == 1:
+ if grants[0].Grantee.URI == "" && grants[0].Permission == "FULL_CONTROL" {
+ return "private"
+ }
+ case len(grants) == 2:
+ for _, g := range grants {
+ if g.Grantee.URI == "http://acs.amazonaws.com/groups/global/AuthenticatedUsers" && g.Permission == "READ" {
+ return "authenticated-read"
+ }
+ if g.Grantee.URI == "http://acs.amazonaws.com/groups/global/AllUsers" && g.Permission == "READ" {
+ return "public-read"
+ }
+ if g.Permission == "READ" && g.Grantee.ID == aCPolicy.Owner.ID {
+ return "bucket-owner-read"
+ }
+ }
+ case len(grants) == 3:
+ for _, g := range grants {
+ if g.Grantee.URI == "http://acs.amazonaws.com/groups/global/AllUsers" && g.Permission == "WRITE" {
+ return "public-read-write"
+ }
+ }
+ }
+ return ""
+}
+
+func getAmzGrantACL(aCPolicy *accessControlPolicy) map[string][]string {
+ grants := aCPolicy.AccessControlList.Grant
+ res := map[string][]string{}
+
+ for _, g := range grants {
+ switch {
+ case g.Permission == "READ":
+ res["X-Amz-Grant-Read"] = append(res["X-Amz-Grant-Read"], "id="+g.Grantee.ID)
+ case g.Permission == "WRITE":
+ res["X-Amz-Grant-Write"] = append(res["X-Amz-Grant-Write"], "id="+g.Grantee.ID)
+ case g.Permission == "READ_ACP":
+ res["X-Amz-Grant-Read-Acp"] = append(res["X-Amz-Grant-Read-Acp"], "id="+g.Grantee.ID)
+ case g.Permission == "WRITE_ACP":
+ res["X-Amz-Grant-Write-Acp"] = append(res["X-Amz-Grant-Write-Acp"], "id="+g.Grantee.ID)
+ case g.Permission == "FULL_CONTROL":
+ res["X-Amz-Grant-Full-Control"] = append(res["X-Amz-Grant-Full-Control"], "id="+g.Grantee.ID)
+ }
+ }
+ return res
+}
diff --git a/vendor/github.com/minio/minio-go/api-get-options.go b/vendor/github.com/minio/minio-go/api-get-options.go
index a5a87526f..dbf062d61 100644
--- a/vendor/github.com/minio/minio-go/api-get-options.go
+++ b/vendor/github.com/minio/minio-go/api-get-options.go
@@ -44,7 +44,7 @@ func (o GetObjectOptions) Header() http.Header {
for k, v := range o.headers {
headers.Set(k, v)
}
- if o.ServerSideEncryption != nil && o.ServerSideEncryption.Type() != encrypt.S3 {
+ if o.ServerSideEncryption != nil && o.ServerSideEncryption.Type() == encrypt.SSEC {
o.ServerSideEncryption.Marshal(headers)
}
return headers
diff --git a/vendor/github.com/minio/minio-go/api-put-bucket.go b/vendor/github.com/minio/minio-go/api-put-bucket.go
index cb9d8f27a..33dc0cf3d 100644
--- a/vendor/github.com/minio/minio-go/api-put-bucket.go
+++ b/vendor/github.com/minio/minio-go/api-put-bucket.go
@@ -178,6 +178,87 @@ func (c Client) removeBucketPolicy(bucketName string) error {
return nil
}
+// SetBucketLifecycle set the lifecycle on an existing bucket.
+func (c Client) SetBucketLifecycle(bucketName, lifecycle string) error {
+ // Input validation.
+ if err := s3utils.CheckValidBucketName(bucketName); err != nil {
+ return err
+ }
+
+ // If lifecycle is empty then delete it.
+ if lifecycle == "" {
+ return c.removeBucketLifecycle(bucketName)
+ }
+
+ // Save the updated lifecycle.
+ return c.putBucketLifecycle(bucketName, lifecycle)
+}
+
+// Saves a new bucket lifecycle.
+func (c Client) putBucketLifecycle(bucketName, lifecycle string) error {
+ // Input validation.
+ if err := s3utils.CheckValidBucketName(bucketName); err != nil {
+ return err
+ }
+
+ // Get resources properly escaped and lined up before
+ // using them in http request.
+ urlValues := make(url.Values)
+ urlValues.Set("lifecycle", "")
+
+ // Content-length is mandatory for put lifecycle request
+ lifecycleReader := strings.NewReader(lifecycle)
+ b, err := ioutil.ReadAll(lifecycleReader)
+ if err != nil {
+ return err
+ }
+
+ reqMetadata := requestMetadata{
+ bucketName: bucketName,
+ queryValues: urlValues,
+ contentBody: lifecycleReader,
+ contentLength: int64(len(b)),
+ contentMD5Base64: sumMD5Base64(b),
+ }
+
+ // Execute PUT to upload a new bucket lifecycle.
+ resp, err := c.executeMethod(context.Background(), "PUT", reqMetadata)
+ defer closeResponse(resp)
+ if err != nil {
+ return err
+ }
+ if resp != nil {
+ if resp.StatusCode != http.StatusOK {
+ return httpRespToErrorResponse(resp, bucketName, "")
+ }
+ }
+ return nil
+}
+
+// Remove lifecycle from a bucket.
+func (c Client) removeBucketLifecycle(bucketName string) error {
+ // Input validation.
+ if err := s3utils.CheckValidBucketName(bucketName); err != nil {
+ return err
+ }
+ // Get resources properly escaped and lined up before
+ // using them in http request.
+ urlValues := make(url.Values)
+ urlValues.Set("lifecycle", "")
+
+ // Execute DELETE on objectName.
+ resp, err := c.executeMethod(context.Background(), "DELETE", requestMetadata{
+ bucketName: bucketName,
+ queryValues: urlValues,
+ contentSHA256Hex: emptySHA256Hex,
+ })
+ defer closeResponse(resp)
+ if err != nil {
+ return err
+ }
+ return nil
+}
+
// SetBucketNotification saves a new bucket notification.
func (c Client) SetBucketNotification(bucketName string, bucketNotification BucketNotification) error {
// Input validation.
diff --git a/vendor/github.com/minio/minio-go/api-put-object-multipart.go b/vendor/github.com/minio/minio-go/api-put-object-multipart.go
index 52dc069d0..db92520e8 100644
--- a/vendor/github.com/minio/minio-go/api-put-object-multipart.go
+++ b/vendor/github.com/minio/minio-go/api-put-object-multipart.go
@@ -259,7 +259,11 @@ func (c Client) uploadPart(ctx context.Context, bucketName, objectName, uploadID
// Set encryption headers, if any.
customHeader := make(http.Header)
- if sse != nil && sse.Type() != encrypt.S3 && sse.Type() != encrypt.KMS {
+ // https://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPart.html
+ // Server-side encryption is supported by the S3 Multipart Upload actions.
+ // Unless you are using a customer-provided encryption key, you don't need
+ // to specify the encryption parameters in each UploadPart request.
+ if sse != nil && sse.Type() == encrypt.SSEC {
sse.Marshal(customHeader)
}
diff --git a/vendor/github.com/minio/minio-go/api-select.go b/vendor/github.com/minio/minio-go/api-select.go
new file mode 100644
index 000000000..a9b6f17ca
--- /dev/null
+++ b/vendor/github.com/minio/minio-go/api-select.go
@@ -0,0 +1,520 @@
+/*
+ * Minio Go Library for Amazon S3 Compatible Cloud Storage
+ * (C) 2018 Minio, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package minio
+
+import (
+ "bytes"
+ "context"
+ "encoding/binary"
+ "encoding/xml"
+ "errors"
+ "fmt"
+ "hash"
+ "hash/crc32"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+
+ "github.com/minio/minio-go/pkg/encrypt"
+ "github.com/minio/minio-go/pkg/s3utils"
+)
+
+// CSVFileHeaderInfo - is the parameter for whether to utilize headers.
+type CSVFileHeaderInfo string
+
+// Constants for file header info.
+const (
+ CSVFileHeaderInfoNone CSVFileHeaderInfo = "NONE"
+ CSVFileHeaderInfoIgnore = "IGNORE"
+ CSVFileHeaderInfoUse = "USE"
+)
+
+// SelectCompressionType - is the parameter for what type of compression is
+// present
+type SelectCompressionType string
+
+// Constants for compression types under select API.
+const (
+ SelectCompressionNONE SelectCompressionType = "NONE"
+ SelectCompressionGZIP = "GZIP"
+ SelectCompressionBZIP = "BZIP2"
+)
+
+// CSVQuoteFields - is the parameter for how CSV fields are quoted.
+type CSVQuoteFields string
+
+// Constants for csv quote styles.
+const (
+ CSVQuoteFieldsAlways CSVQuoteFields = "Always"
+ CSVQuoteFieldsAsNeeded = "AsNeeded"
+)
+
+// QueryExpressionType - is of what syntax the expression is, this should only
+// be SQL
+type QueryExpressionType string
+
+// Constants for expression type.
+const (
+ QueryExpressionTypeSQL QueryExpressionType = "SQL"
+)
+
+// JSONType determines json input serialization type.
+type JSONType string
+
+// Constants for JSONTypes.
+const (
+ JSONDocumentType JSONType = "DOCUMENT"
+ JSONLinesType = "LINES"
+)
+
+// ParquetInputOptions parquet input specific options
+type ParquetInputOptions struct{}
+
+// CSVInputOptions csv input specific options
+type CSVInputOptions struct {
+ FileHeaderInfo CSVFileHeaderInfo
+ RecordDelimiter string
+ FieldDelimiter string
+ QuoteCharacter string
+ QuoteEscapeCharacter string
+ Comments string
+}
+
+// CSVOutputOptions csv output specific options
+type CSVOutputOptions struct {
+ QuoteFields CSVQuoteFields
+ RecordDelimiter string
+ FieldDelimiter string
+ QuoteCharacter string
+ QuoteEscapeCharacter string
+}
+
+// JSONInputOptions json input specific options
+type JSONInputOptions struct {
+ Type JSONType
+}
+
+// JSONOutputOptions - json output specific options
+type JSONOutputOptions struct {
+ RecordDelimiter string
+}
+
+// SelectObjectInputSerialization - input serialization parameters
+type SelectObjectInputSerialization struct {
+ CompressionType SelectCompressionType
+ Parquet *ParquetInputOptions `xml:"Parquet,omitempty"`
+ CSV *CSVInputOptions `xml:"CSV,omitempty"`
+ JSON *JSONInputOptions `xml:"JSON,omitempty"`
+}
+
+// SelectObjectOutputSerialization - output serialization parameters.
+type SelectObjectOutputSerialization struct {
+ CSV *CSVOutputOptions `xml:"CSV,omitempty"`
+ JSON *JSONOutputOptions `xml:"JSON,omitempty"`
+}
+
+// SelectObjectOptions - represents the input select body
+type SelectObjectOptions struct {
+ XMLName xml.Name `xml:"SelectObjectContentRequest" json:"-"`
+ ServerSideEncryption encrypt.ServerSide `xml:"-"`
+ Expression string
+ ExpressionType QueryExpressionType
+ InputSerialization SelectObjectInputSerialization
+ OutputSerialization SelectObjectOutputSerialization
+ RequestProgress struct {
+ Enabled bool
+ }
+}
+
+// Header returns the http.Header representation of the SelectObject options.
+func (o SelectObjectOptions) Header() http.Header {
+ headers := make(http.Header)
+ if o.ServerSideEncryption != nil && o.ServerSideEncryption.Type() == encrypt.SSEC {
+ o.ServerSideEncryption.Marshal(headers)
+ }
+ return headers
+}
+
+// SelectObjectType - is the parameter which defines what type of object the
+// operation is being performed on.
+type SelectObjectType string
+
+// Constants for input data types.
+const (
+ SelectObjectTypeCSV SelectObjectType = "CSV"
+ SelectObjectTypeJSON = "JSON"
+ SelectObjectTypeParquet = "Parquet"
+)
+
+// preludeInfo is used for keeping track of necessary information from the
+// prelude.
+type preludeInfo struct {
+ totalLen uint32
+ headerLen uint32
+}
+
+// SelectResults is used for the streaming responses from the server.
+type SelectResults struct {
+ pipeReader *io.PipeReader
+ resp *http.Response
+ stats *StatsMessage
+ progress *ProgressMessage
+}
+
+// ProgressMessage is a struct for progress xml message.
+type ProgressMessage struct {
+ XMLName xml.Name `xml:"Progress" json:"-"`
+ StatsMessage
+}
+
+// StatsMessage is a struct for stat xml message.
+type StatsMessage struct {
+ XMLName xml.Name `xml:"Stats" json:"-"`
+ BytesScanned int64
+ BytesProcessed int64
+ BytesReturned int64
+}
+
+// eventType represents the type of event.
+type eventType string
+
+// list of event-types returned by Select API.
+const (
+ endEvent eventType = "End"
+ errorEvent = "Error"
+ recordsEvent = "Records"
+ progressEvent = "Progress"
+ statsEvent = "Stats"
+)
+
+// contentType represents content type of event.
+type contentType string
+
+const (
+ xmlContent contentType = "text/xml"
+)
+
+// SelectObjectContent is a implementation of http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html AWS S3 API.
+func (c Client) SelectObjectContent(ctx context.Context, bucketName, objectName string, opts SelectObjectOptions) (*SelectResults, error) {
+ // Input validation.
+ if err := s3utils.CheckValidBucketName(bucketName); err != nil {
+ return nil, err
+ }
+ if err := s3utils.CheckValidObjectName(objectName); err != nil {
+ return nil, err
+ }
+
+ selectReqBytes, err := xml.Marshal(opts)
+ if err != nil {
+ return nil, err
+ }
+
+ urlValues := make(url.Values)
+ urlValues.Set("select", "")
+ urlValues.Set("select-type", "2")
+
+ // Execute POST on bucket/object.
+ resp, err := c.executeMethod(ctx, "POST", requestMetadata{
+ bucketName: bucketName,
+ objectName: objectName,
+ queryValues: urlValues,
+ customHeader: opts.Header(),
+ contentMD5Base64: sumMD5Base64(selectReqBytes),
+ contentSHA256Hex: sum256Hex(selectReqBytes),
+ contentBody: bytes.NewReader(selectReqBytes),
+ contentLength: int64(len(selectReqBytes)),
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ if resp.StatusCode != http.StatusOK {
+ return nil, httpRespToErrorResponse(resp, bucketName, "")
+ }
+
+ pipeReader, pipeWriter := io.Pipe()
+ streamer := &SelectResults{
+ resp: resp,
+ stats: &StatsMessage{},
+ progress: &ProgressMessage{},
+ pipeReader: pipeReader,
+ }
+ streamer.start(pipeWriter)
+ return streamer, nil
+}
+
+// Close - closes the underlying response body and the stream reader.
+func (s *SelectResults) Close() error {
+ defer closeResponse(s.resp)
+ return s.pipeReader.Close()
+}
+
+// Read - is a reader compatible implementation for SelectObjectContent records.
+func (s *SelectResults) Read(b []byte) (n int, err error) {
+ return s.pipeReader.Read(b)
+}
+
+// Stats - information about a request's stats when processing is complete.
+func (s *SelectResults) Stats() *StatsMessage {
+ return s.stats
+}
+
+// Progress - information about the progress of a request.
+func (s *SelectResults) Progress() *ProgressMessage {
+ return s.progress
+}
+
+// start is the main function that decodes the large byte array into
+// several events that are sent through the eventstream.
+func (s *SelectResults) start(pipeWriter *io.PipeWriter) {
+ go func() {
+ for {
+ var prelude preludeInfo
+ var headers = make(http.Header)
+ var err error
+
+ // Create CRC code
+ crc := crc32.New(crc32.IEEETable)
+ crcReader := io.TeeReader(s.resp.Body, crc)
+
+ // Extract the prelude(12 bytes) into a struct to extract relevant information.
+ prelude, err = processPrelude(crcReader, crc)
+ if err != nil {
+ pipeWriter.CloseWithError(err)
+ closeResponse(s.resp)
+ return
+ }
+
+ // Extract the headers(variable bytes) into a struct to extract relevant information
+ if prelude.headerLen > 0 {
+ if err = extractHeader(io.LimitReader(crcReader, int64(prelude.headerLen)), headers); err != nil {
+ pipeWriter.CloseWithError(err)
+ closeResponse(s.resp)
+ return
+ }
+ }
+
+ // Get the actual payload length so that the appropriate amount of
+ // bytes can be read or parsed.
+ payloadLen := prelude.PayloadLen()
+
+ // Get content-type of the payload.
+ c := contentType(headers.Get("content-type"))
+
+ // Get event type of the payload.
+ e := eventType(headers.Get("event-type"))
+
+ // Handle all supported events.
+ switch e {
+ case endEvent:
+ pipeWriter.Close()
+ closeResponse(s.resp)
+ return
+ case errorEvent:
+ pipeWriter.CloseWithError(errors.New("Error Type of " + headers.Get("error-type") + " " + headers.Get("error-message")))
+ closeResponse(s.resp)
+ return
+ case recordsEvent:
+ if _, err = io.Copy(pipeWriter, io.LimitReader(crcReader, payloadLen)); err != nil {
+ pipeWriter.CloseWithError(err)
+ closeResponse(s.resp)
+ return
+ }
+ case progressEvent:
+ switch c {
+ case xmlContent:
+ if err = xmlDecoder(io.LimitReader(crcReader, payloadLen), s.progress); err != nil {
+ pipeWriter.CloseWithError(err)
+ closeResponse(s.resp)
+ return
+ }
+ default:
+ pipeWriter.CloseWithError(fmt.Errorf("Unexpected content-type %s sent for event-type %s", c, progressEvent))
+ closeResponse(s.resp)
+ return
+ }
+ case statsEvent:
+ switch c {
+ case xmlContent:
+ if err = xmlDecoder(io.LimitReader(crcReader, payloadLen), s.stats); err != nil {
+ pipeWriter.CloseWithError(err)
+ closeResponse(s.resp)
+ return
+ }
+ default:
+ pipeWriter.CloseWithError(fmt.Errorf("Unexpected content-type %s sent for event-type %s", c, statsEvent))
+ closeResponse(s.resp)
+ return
+ }
+ }
+
+ // Ensures that the full message's CRC is correct and
+ // that the message is not corrupted
+ if err := checkCRC(s.resp.Body, crc.Sum32()); err != nil {
+ pipeWriter.CloseWithError(err)
+ closeResponse(s.resp)
+ return
+ }
+
+ }
+ }()
+}
+
+// PayloadLen is a function that calculates the length of the payload.
+func (p preludeInfo) PayloadLen() int64 {
+ return int64(p.totalLen - p.headerLen - 16)
+}
+
+// processPrelude is the function that reads the 12 bytes of the prelude and
+// ensures the CRC is correct while also extracting relevant information into
+// the struct,
+func processPrelude(prelude io.Reader, crc hash.Hash32) (preludeInfo, error) {
+ var err error
+ var pInfo = preludeInfo{}
+
+ // reads total length of the message (first 4 bytes)
+ pInfo.totalLen, err = extractUint32(prelude)
+ if err != nil {
+ return pInfo, err
+ }
+
+ // reads total header length of the message (2nd 4 bytes)
+ pInfo.headerLen, err = extractUint32(prelude)
+ if err != nil {
+ return pInfo, err
+ }
+
+ // checks that the CRC is correct (3rd 4 bytes)
+ preCRC := crc.Sum32()
+ if err := checkCRC(prelude, preCRC); err != nil {
+ return pInfo, err
+ }
+
+ return pInfo, nil
+}
+
+// extracts the relevant information from the Headers.
+func extractHeader(body io.Reader, myHeaders http.Header) error {
+ for {
+ // extracts the first part of the header,
+ headerTypeName, err := extractHeaderType(body)
+ if err != nil {
+ // Since end of file, we have read all of our headers
+ if err == io.EOF {
+ break
+ }
+ return err
+ }
+
+ // reads the 7 present in the header and ignores it.
+ extractUint8(body)
+
+ headerValueName, err := extractHeaderValue(body)
+ if err != nil {
+ return err
+ }
+
+ myHeaders.Set(headerTypeName, headerValueName)
+
+ }
+ return nil
+}
+
+// extractHeaderType extracts the first half of the header message, the header type.
+func extractHeaderType(body io.Reader) (string, error) {
+ // extracts 2 bit integer
+ headerNameLen, err := extractUint8(body)
+ if err != nil {
+ return "", err
+ }
+ // extracts the string with the appropriate number of bytes
+ headerName, err := extractString(body, int(headerNameLen))
+ if err != nil {
+ return "", err
+ }
+ return strings.TrimPrefix(headerName, ":"), nil
+}
+
+// extractsHeaderValue extracts the second half of the header message, the
+// header value
+func extractHeaderValue(body io.Reader) (string, error) {
+ bodyLen, err := extractUint16(body)
+ if err != nil {
+ return "", err
+ }
+ bodyName, err := extractString(body, int(bodyLen))
+ if err != nil {
+ return "", err
+ }
+ return bodyName, nil
+}
+
+// extracts a string from byte array of a particular number of bytes.
+func extractString(source io.Reader, lenBytes int) (string, error) {
+ myVal := make([]byte, lenBytes)
+ _, err := source.Read(myVal)
+ if err != nil {
+ return "", err
+ }
+ return string(myVal), nil
+}
+
+// extractUint32 extracts a 4 byte integer from the byte array.
+func extractUint32(r io.Reader) (uint32, error) {
+ buf := make([]byte, 4)
+ _, err := io.ReadFull(r, buf)
+ if err != nil {
+ return 0, err
+ }
+ return binary.BigEndian.Uint32(buf), nil
+}
+
+// extractUint16 extracts a 2 byte integer from the byte array.
+func extractUint16(r io.Reader) (uint16, error) {
+ buf := make([]byte, 2)
+ _, err := io.ReadFull(r, buf)
+ if err != nil {
+ return 0, err
+ }
+ return binary.BigEndian.Uint16(buf), nil
+}
+
+// extractUint8 extracts a 1 byte integer from the byte array.
+func extractUint8(r io.Reader) (uint8, error) {
+ buf := make([]byte, 1)
+ _, err := io.ReadFull(r, buf)
+ if err != nil {
+ return 0, err
+ }
+ return buf[0], nil
+}
+
+// checkCRC ensures that the CRC matches with the one from the reader.
+func checkCRC(r io.Reader, expect uint32) error {
+ msgCRC, err := extractUint32(r)
+ if err != nil {
+ return err
+ }
+
+ if msgCRC != expect {
+ return fmt.Errorf("Checksum Mismatch, MessageCRC of 0x%X does not equal expected CRC of 0x%X", msgCRC, expect)
+
+ }
+ return nil
+}
diff --git a/vendor/github.com/minio/minio-go/api.go b/vendor/github.com/minio/minio-go/api.go
index 5856ed2b1..9b218c773 100644
--- a/vendor/github.com/minio/minio-go/api.go
+++ b/vendor/github.com/minio/minio-go/api.go
@@ -99,7 +99,7 @@ type Options struct {
// Global constants.
const (
libraryName = "minio-go"
- libraryVersion = "v6.0.5"
+ libraryVersion = "v6.0.7"
)
// User Agent should always following the below style.
@@ -455,22 +455,9 @@ func (c Client) dumpHTTP(req *http.Request, resp *http.Response) error {
return err
}
} else {
- // WORKAROUND for https://github.com/golang/go/issues/13942.
- // httputil.DumpResponse does not print response headers for
- // all successful calls which have response ContentLength set
- // to zero. Keep this workaround until the above bug is fixed.
- if resp.ContentLength == 0 {
- var buffer bytes.Buffer
- if err = resp.Header.Write(&buffer); err != nil {
- return err
- }
- respTrace = buffer.Bytes()
- respTrace = append(respTrace, []byte("\r\n")...)
- } else {
- respTrace, err = httputil.DumpResponse(resp, false)
- if err != nil {
- return err
- }
+ respTrace, err = httputil.DumpResponse(resp, false)
+ if err != nil {
+ return err
}
}
@@ -599,8 +586,8 @@ func (c Client) executeMethod(ctx context.Context, method string, metadata reque
// Initiate the request.
res, err = c.do(req)
if err != nil {
- // For supported network errors verify.
- if isNetErrorRetryable(err) {
+ // For supported http requests errors verify.
+ if isHTTPReqErrorRetryable(err) {
continue // Retry.
}
// For other errors, return here no need to retry.
diff --git a/vendor/github.com/minio/minio-go/core.go b/vendor/github.com/minio/minio-go/core.go
index a5017d868..0c651d600 100644
--- a/vendor/github.com/minio/minio-go/core.go
+++ b/vendor/github.com/minio/minio-go/core.go
@@ -21,6 +21,8 @@ import (
"context"
"io"
"strings"
+
+ "github.com/minio/minio-go/pkg/encrypt"
)
// Core - Inherits Client and adds new methods to expose the low level S3 APIs.
@@ -68,7 +70,7 @@ func (c Core) CopyObjectPart(srcBucket, srcObject, destBucket, destObject string
}
// PutObject - Upload object. Uploads using single PUT call.
-func (c Core) PutObject(bucket, object string, data io.Reader, size int64, md5Base64, sha256Hex string, metadata map[string]string) (ObjectInfo, error) {
+func (c Core) PutObject(bucket, object string, data io.Reader, size int64, md5Base64, sha256Hex string, metadata map[string]string, sse encrypt.ServerSide) (ObjectInfo, error) {
opts := PutObjectOptions{}
m := make(map[string]string)
for k, v := range metadata {
@@ -89,6 +91,7 @@ func (c Core) PutObject(bucket, object string, data io.Reader, size int64, md5Ba
}
}
opts.UserMetadata = m
+ opts.ServerSideEncryption = sse
return c.putObjectDo(context.Background(), bucket, object, data, md5Base64, sha256Hex, size, opts)
}
@@ -104,8 +107,8 @@ func (c Core) ListMultipartUploads(bucket, prefix, keyMarker, uploadIDMarker, de
}
// PutObjectPart - Upload an object part.
-func (c Core) PutObjectPart(bucket, object, uploadID string, partID int, data io.Reader, size int64, md5Base64, sha256Hex string) (ObjectPart, error) {
- return c.uploadPart(context.Background(), bucket, object, uploadID, data, partID, md5Base64, sha256Hex, size, nil)
+func (c Core) PutObjectPart(bucket, object, uploadID string, partID int, data io.Reader, size int64, md5Base64, sha256Hex string, sse encrypt.ServerSide) (ObjectPart, error) {
+ return c.uploadPart(context.Background(), bucket, object, uploadID, data, partID, md5Base64, sha256Hex, size, sse)
}
// ListObjectParts - List uploaded parts of an incomplete upload.x
diff --git a/vendor/github.com/minio/minio-go/functional_tests.go b/vendor/github.com/minio/minio-go/functional_tests.go
index 207cbd03c..af8dbec3b 100644
--- a/vendor/github.com/minio/minio-go/functional_tests.go
+++ b/vendor/github.com/minio/minio-go/functional_tests.go
@@ -2271,7 +2271,8 @@ func testPresignedPostPolicy() {
defer reader.Close()
objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "")
- metadataKey := randString(60, rand.NewSource(time.Now().UnixNano()), "")
+ // Azure requires the key to not start with a number
+ metadataKey := randString(60, rand.NewSource(time.Now().UnixNano()), "user")
metadataValue := randString(60, rand.NewSource(time.Now().UnixNano()), "")
buf, err := ioutil.ReadAll(reader)
@@ -7023,6 +7024,167 @@ func testFGetObjectWithContext() {
}
+// Test get object ACLs with GetObjectACL
+func testGetObjectACL() {
+ // initialize logging params
+ startTime := time.Now()
+ testName := getFuncName()
+ function := "GetObjectACL(bucketName, objectName)"
+ args := map[string]interface{}{
+ "bucketName": "",
+ "objectName": "",
+ }
+ // Seed random based on current time.
+ rand.Seed(time.Now().Unix())
+
+ // skipping region functional tests for non s3 runs
+ if os.Getenv(serverEndpoint) != "s3.amazonaws.com" {
+ ignoredLog(testName, function, args, startTime, "Skipped region functional tests for non s3 runs").Info()
+ return
+ }
+
+ // Instantiate new minio client object.
+ c, err := minio.NewV4(
+ os.Getenv(serverEndpoint),
+ os.Getenv(accessKey),
+ os.Getenv(secretKey),
+ mustParseBool(os.Getenv(enableHTTPS)),
+ )
+ if err != nil {
+ logError(testName, function, args, startTime, "", "Minio client v4 object creation failed", err)
+ return
+ }
+
+ // Enable tracing, write to stderr.
+ // c.TraceOn(os.Stderr)
+
+ // Set user agent.
+ c.SetAppInfo("Minio-go-FunctionalTest", "0.1.0")
+
+ // Generate a new random bucket name.
+ bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-")
+ args["bucketName"] = bucketName
+
+ // Make a new bucket.
+ err = c.MakeBucket(bucketName, "us-east-1")
+ if err != nil {
+ logError(testName, function, args, startTime, "", "MakeBucket failed", err)
+ return
+ }
+
+ bufSize := dataFileMap["datafile-1-MB"]
+ var reader = getDataReader("datafile-1-MB")
+ defer reader.Close()
+ // Save the data
+ objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "")
+ args["objectName"] = objectName
+
+ // Add meta data to add a canned acl
+ metaData := map[string]string{
+ "X-Amz-Acl": "public-read-write",
+ }
+
+ _, err = c.PutObject(bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream", UserMetadata: metaData})
+ if err != nil {
+ logError(testName, function, args, startTime, "", "PutObject failed", err)
+ return
+ }
+
+ // Read the data back
+ objectInfo, getObjectACLErr := c.GetObjectACL(bucketName, objectName)
+ if getObjectACLErr == nil {
+ logError(testName, function, args, startTime, "", "GetObjectACL fail", getObjectACLErr)
+ return
+ }
+
+ s, ok := objectInfo.Metadata["X-Amz-Acl"]
+ if !ok {
+ logError(testName, function, args, startTime, "", "GetObjectACL fail unable to find \"X-Amz-Acl\"", nil)
+ return
+ }
+
+ if len(s) != 1 {
+ logError(testName, function, args, startTime, "", "GetObjectACL fail \"X-Amz-Acl\" canned acl expected \"1\" got "+fmt.Sprintf(`"%d"`, len(s)), nil)
+ return
+ }
+
+ if s[0] != "public-read-write" {
+ logError(testName, function, args, startTime, "", "GetObjectACL fail \"X-Amz-Acl\" expected \"public-read-write\" but got"+fmt.Sprintf("%q", s[0]), nil)
+ return
+ }
+
+ bufSize = dataFileMap["datafile-1-MB"]
+ var reader2 = getDataReader("datafile-1-MB")
+ defer reader2.Close()
+ // Save the data
+ objectName = randString(60, rand.NewSource(time.Now().UnixNano()), "")
+ args["objectName"] = objectName
+
+ // Add meta data to add a canned acl
+ metaData = map[string]string{
+ "X-Amz-Grant-Read": "id=fooread@minio.go",
+ "X-Amz-Grant-Write": "id=foowrite@minio.go",
+ }
+
+ _, err = c.PutObject(bucketName, objectName, reader2, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream", UserMetadata: metaData})
+ if err != nil {
+ logError(testName, function, args, startTime, "", "PutObject failed", err)
+ return
+ }
+
+ // Read the data back
+ objectInfo, getObjectACLErr = c.GetObjectACL(bucketName, objectName)
+ if getObjectACLErr == nil {
+ logError(testName, function, args, startTime, "", "GetObjectACL fail", getObjectACLErr)
+ return
+ }
+
+ if len(objectInfo.Metadata) != 3 {
+ logError(testName, function, args, startTime, "", "GetObjectACL fail expected \"3\" ACLs but got "+fmt.Sprintf(`"%d"`, len(objectInfo.Metadata)), nil)
+ return
+ }
+
+ s, ok = objectInfo.Metadata["X-Amz-Grant-Read"]
+ if !ok {
+ logError(testName, function, args, startTime, "", "GetObjectACL fail unable to find \"X-Amz-Grant-Read\"", nil)
+ return
+ }
+
+ if len(s) != 1 {
+ logError(testName, function, args, startTime, "", "GetObjectACL fail \"X-Amz-Grant-Read\" acl expected \"1\" got "+fmt.Sprintf(`"%d"`, len(s)), nil)
+ return
+ }
+
+ if s[0] != "fooread@minio.go" {
+ logError(testName, function, args, startTime, "", "GetObjectACL fail \"X-Amz-Grant-Read\" acl expected \"fooread@minio.go\" got "+fmt.Sprintf("%q", s), nil)
+ return
+ }
+
+ s, ok = objectInfo.Metadata["X-Amz-Grant-Write"]
+ if !ok {
+ logError(testName, function, args, startTime, "", "GetObjectACL fail unable to find \"X-Amz-Grant-Write\"", nil)
+ return
+ }
+
+ if len(s) != 1 {
+ logError(testName, function, args, startTime, "", "GetObjectACL fail \"X-Amz-Grant-Write\" acl expected \"1\" got "+fmt.Sprintf(`"%d"`, len(s)), nil)
+ return
+ }
+
+ if s[0] != "foowrite@minio.go" {
+ logError(testName, function, args, startTime, "", "GetObjectACL fail \"X-Amz-Grant-Write\" acl expected \"foowrite@minio.go\" got "+fmt.Sprintf("%q", s), nil)
+ return
+ }
+
+ // Delete all objects and buckets
+ if err = cleanupBucket(bucketName, c); err != nil {
+ logError(testName, function, args, startTime, "", "Cleanup failed", err)
+ return
+ }
+
+ successLogger(testName, function, args, startTime).Info()
+}
+
// Test validates putObject with context to see if request cancellation is honored for V2.
func testPutObjectWithContextV2() {
// initialize logging params
@@ -7481,6 +7643,7 @@ func main() {
testGetObjectWithContext()
testFPutObjectWithContext()
testFGetObjectWithContext()
+ testGetObjectACL()
testPutObjectWithContext()
testStorageClassMetadataPutObject()
testStorageClassInvalidMetadataPutObject()
diff --git a/vendor/github.com/minio/minio-go/pkg/credentials/file_minio_client.go b/vendor/github.com/minio/minio-go/pkg/credentials/file_minio_client.go
index c282c2a2c..6a6827e37 100644
--- a/vendor/github.com/minio/minio-go/pkg/credentials/file_minio_client.go
+++ b/vendor/github.com/minio/minio-go/pkg/credentials/file_minio_client.go
@@ -62,13 +62,17 @@ func NewFileMinioClient(filename string, alias string) *Credentials {
// users home directory.
func (p *FileMinioClient) Retrieve() (Value, error) {
if p.filename == "" {
- homeDir, err := homedir.Dir()
- if err != nil {
- return Value{}, err
- }
- p.filename = filepath.Join(homeDir, ".mc", "config.json")
- if runtime.GOOS == "windows" {
- p.filename = filepath.Join(homeDir, "mc", "config.json")
+ if value, ok := os.LookupEnv("MINIO_SHARED_CREDENTIALS_FILE"); ok {
+ p.filename = value
+ } else {
+ homeDir, err := homedir.Dir()
+ if err != nil {
+ return Value{}, err
+ }
+ p.filename = filepath.Join(homeDir, ".mc", "config.json")
+ if runtime.GOOS == "windows" {
+ p.filename = filepath.Join(homeDir, "mc", "config.json")
+ }
}
}
diff --git a/vendor/github.com/minio/minio-go/retry.go b/vendor/github.com/minio/minio-go/retry.go
index 22c94347e..2a7670786 100644
--- a/vendor/github.com/minio/minio-go/retry.go
+++ b/vendor/github.com/minio/minio-go/retry.go
@@ -85,36 +85,32 @@ func (c Client) newRetryTimer(maxRetry int, unit time.Duration, cap time.Duratio
return attemptCh
}
-// isNetErrorRetryable - is network error retryable.
-func isNetErrorRetryable(err error) bool {
+// isHTTPReqErrorRetryable - is http requests error retryable, such
+// as i/o timeout, connection broken etc..
+func isHTTPReqErrorRetryable(err error) bool {
if err == nil {
return false
}
- switch err.(type) {
- case net.Error:
- switch err.(type) {
+ switch e := err.(type) {
+ case *url.Error:
+ switch e.Err.(type) {
case *net.DNSError, *net.OpError, net.UnknownNetworkError:
return true
- case *url.Error:
- // For a URL error, where it replies back "connection closed"
- // retry again.
- if strings.Contains(err.Error(), "Connection closed by foreign host") {
- return true
- }
- default:
- if strings.Contains(err.Error(), "net/http: TLS handshake timeout") {
- // If error is - tlsHandshakeTimeoutError, retry.
- return true
- } else if strings.Contains(err.Error(), "i/o timeout") {
- // If error is - tcp timeoutError, retry.
- return true
- } else if strings.Contains(err.Error(), "connection timed out") {
- // If err is a net.Dial timeout, retry.
- return true
- } else if strings.Contains(err.Error(), "net/http: HTTP/1.x transport connection broken") {
- // If error is transport connection broken, retry.
- return true
- }
+ }
+ if strings.Contains(err.Error(), "Connection closed by foreign host") {
+ return true
+ } else if strings.Contains(err.Error(), "net/http: TLS handshake timeout") {
+ // If error is - tlsHandshakeTimeoutError, retry.
+ return true
+ } else if strings.Contains(err.Error(), "i/o timeout") {
+ // If error is - tcp timeoutError, retry.
+ return true
+ } else if strings.Contains(err.Error(), "connection timed out") {
+ // If err is a net.Dial timeout, retry.
+ return true
+ } else if strings.Contains(err.Error(), "net/http: HTTP/1.x transport connection broken") {
+ // If error is transport connection broken, retry.
+ return true
}
}
return false
diff --git a/vendor/github.com/minio/minio-go/utils.go b/vendor/github.com/minio/minio-go/utils.go
index f80e25c41..8483f3834 100644
--- a/vendor/github.com/minio/minio-go/utils.go
+++ b/vendor/github.com/minio/minio-go/utils.go
@@ -223,6 +223,7 @@ var supportedHeaders = []string{
"content-disposition",
"content-language",
"x-amz-website-redirect-location",
+ "expires",
// Add more supported headers here.
}
@@ -267,5 +268,5 @@ func isSSEHeader(headerKey string) bool {
func isAmzHeader(headerKey string) bool {
key := strings.ToLower(headerKey)
- return strings.HasPrefix(key, "x-amz-meta-") || key == "x-amz-acl"
+ return strings.HasPrefix(key, "x-amz-meta-") || strings.HasPrefix(key, "x-amz-grant-") || key == "x-amz-acl" || isSSEHeader(headerKey)
}
diff --git a/vendor/github.com/mitchellh/go-testing-interface/go.mod b/vendor/github.com/mitchellh/go-testing-interface/go.mod
new file mode 100644
index 000000000..062796de7
--- /dev/null
+++ b/vendor/github.com/mitchellh/go-testing-interface/go.mod
@@ -0,0 +1 @@
+module github.com/mitchellh/go-testing-interface
diff --git a/vendor/github.com/olekukonko/tablewriter/.travis.yml b/vendor/github.com/olekukonko/tablewriter/.travis.yml
index f156b3b87..9c64270e2 100644
--- a/vendor/github.com/olekukonko/tablewriter/.travis.yml
+++ b/vendor/github.com/olekukonko/tablewriter/.travis.yml
@@ -9,4 +9,6 @@ go:
- 1.6
- 1.7
- 1.8
+ - 1.9
+ - "1.10"
- tip
diff --git a/vendor/github.com/olekukonko/tablewriter/README.md b/vendor/github.com/olekukonko/tablewriter/README.md
index 59cb86c01..d44d31aa8 100644
--- a/vendor/github.com/olekukonko/tablewriter/README.md
+++ b/vendor/github.com/olekukonko/tablewriter/README.md
@@ -115,7 +115,7 @@ table.SetRowLine(true) // Enable row line
// Change table lines
table.SetCenterSeparator("*")
-table.SetColumnSeparator("‡")
+table.SetColumnSeparator("╪")
table.SetRowSeparator("-")
table.SetAlignment(tablewriter.ALIGN_LEFT)
diff --git a/vendor/github.com/pborman/uuid/.travis.yml b/vendor/github.com/pborman/uuid/.travis.yml
index d8156a60b..3deb4a124 100644
--- a/vendor/github.com/pborman/uuid/.travis.yml
+++ b/vendor/github.com/pborman/uuid/.travis.yml
@@ -1,8 +1,9 @@
language: go
go:
- - 1.4.3
- - 1.5.3
+ - "1.9"
+ - "1.10"
+ - "1.11"
- tip
script:
diff --git a/vendor/github.com/pborman/uuid/README.md b/vendor/github.com/pborman/uuid/README.md
index b0396b274..810ad40dc 100644
--- a/vendor/github.com/pborman/uuid/README.md
+++ b/vendor/github.com/pborman/uuid/README.md
@@ -3,6 +3,8 @@ This project was automatically exported from code.google.com/p/go-uuid
# uuid ![build status](https://travis-ci.org/pborman/uuid.svg?branch=master)
The uuid package generates and inspects UUIDs based on [RFC 4122](http://tools.ietf.org/html/rfc4122) and DCE 1.1: Authentication and Security Services.
+This package now leverages the github.com/google/uuid package (which is based off an earlier version of this package).
+
###### Install
`go get github.com/pborman/uuid`
diff --git a/vendor/github.com/pborman/uuid/doc.go b/vendor/github.com/pborman/uuid/doc.go
index d8bd013e6..727d76167 100644
--- a/vendor/github.com/pborman/uuid/doc.go
+++ b/vendor/github.com/pborman/uuid/doc.go
@@ -4,5 +4,10 @@
// The uuid package generates and inspects UUIDs.
//
-// UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security Services.
+// UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security
+// Services.
+//
+// This package is a partial wrapper around the github.com/google/uuid package.
+// This package represents a UUID as []byte while github.com/google/uuid
+// represents a UUID as [16]byte.
package uuid
diff --git a/vendor/github.com/pborman/uuid/marshal.go b/vendor/github.com/pborman/uuid/marshal.go
index 6621dd54b..35b89352a 100644
--- a/vendor/github.com/pborman/uuid/marshal.go
+++ b/vendor/github.com/pborman/uuid/marshal.go
@@ -7,6 +7,8 @@ package uuid
import (
"errors"
"fmt"
+
+ guuid "github.com/google/uuid"
)
// MarshalText implements encoding.TextMarshaler.
@@ -60,11 +62,11 @@ func (u Array) MarshalText() ([]byte, error) {
// UnmarshalText implements encoding.TextUnmarshaler.
func (u *Array) UnmarshalText(data []byte) error {
- id := Parse(string(data))
- if id == nil {
- return errors.New("invalid UUID")
+ id, err := guuid.ParseBytes(data)
+ if err != nil {
+ return err
}
- *u = id.Array()
+ *u = Array(id)
return nil
}
diff --git a/vendor/github.com/pborman/uuid/node.go b/vendor/github.com/pborman/uuid/node.go
index 42d60da8f..e524e0101 100644
--- a/vendor/github.com/pborman/uuid/node.go
+++ b/vendor/github.com/pborman/uuid/node.go
@@ -5,24 +5,14 @@
package uuid
import (
- "net"
- "sync"
-)
-
-var (
- nodeMu sync.Mutex
- interfaces []net.Interface // cached list of interfaces
- ifname string // name of interface being used
- nodeID []byte // hardware for version 1 UUIDs
+ guuid "github.com/google/uuid"
)
// NodeInterface returns the name of the interface from which the NodeID was
// derived. The interface "user" is returned if the NodeID was set by
// SetNodeID.
func NodeInterface() string {
- defer nodeMu.Unlock()
- nodeMu.Lock()
- return ifname
+ return guuid.NodeInterface()
}
// SetNodeInterface selects the hardware address to be used for Version 1 UUIDs.
@@ -32,77 +22,20 @@ func NodeInterface() string {
//
// SetNodeInterface never fails when name is "".
func SetNodeInterface(name string) bool {
- defer nodeMu.Unlock()
- nodeMu.Lock()
- return setNodeInterface(name)
-}
-
-func setNodeInterface(name string) bool {
- if interfaces == nil {
- var err error
- interfaces, err = net.Interfaces()
- if err != nil && name != "" {
- return false
- }
- }
-
- for _, ifs := range interfaces {
- if len(ifs.HardwareAddr) >= 6 && (name == "" || name == ifs.Name) {
- if setNodeID(ifs.HardwareAddr) {
- ifname = ifs.Name
- return true
- }
- }
- }
-
- // We found no interfaces with a valid hardware address. If name
- // does not specify a specific interface generate a random Node ID
- // (section 4.1.6)
- if name == "" {
- if nodeID == nil {
- nodeID = make([]byte, 6)
- }
- randomBits(nodeID)
- return true
- }
- return false
+ return guuid.SetNodeInterface(name)
}
// NodeID returns a slice of a copy of the current Node ID, setting the Node ID
// if not already set.
func NodeID() []byte {
- defer nodeMu.Unlock()
- nodeMu.Lock()
- if nodeID == nil {
- setNodeInterface("")
- }
- nid := make([]byte, 6)
- copy(nid, nodeID)
- return nid
+ return guuid.NodeID()
}
// SetNodeID sets the Node ID to be used for Version 1 UUIDs. The first 6 bytes
// of id are used. If id is less than 6 bytes then false is returned and the
// Node ID is not set.
func SetNodeID(id []byte) bool {
- defer nodeMu.Unlock()
- nodeMu.Lock()
- if setNodeID(id) {
- ifname = "user"
- return true
- }
- return false
-}
-
-func setNodeID(id []byte) bool {
- if len(id) < 6 {
- return false
- }
- if nodeID == nil {
- nodeID = make([]byte, 6)
- }
- copy(nodeID, id)
- return true
+ return guuid.SetNodeID(id)
}
// NodeID returns the 6 byte node id encoded in uuid. It returns nil if uuid is
diff --git a/vendor/github.com/pborman/uuid/sql.go b/vendor/github.com/pborman/uuid/sql.go
index d015bfd13..929c3847e 100644
--- a/vendor/github.com/pborman/uuid/sql.go
+++ b/vendor/github.com/pborman/uuid/sql.go
@@ -40,7 +40,9 @@ func (uuid *UUID) Scan(src interface{}) error {
// assumes a simple slice of bytes if 16 bytes
// otherwise attempts to parse
if len(b) == 16 {
- *uuid = UUID(b)
+ parsed := make([]byte, 16)
+ copy(parsed, b)
+ *uuid = UUID(parsed)
} else {
u := Parse(string(b))
diff --git a/vendor/github.com/pborman/uuid/time.go b/vendor/github.com/pborman/uuid/time.go
index eedf24219..5c0960d87 100644
--- a/vendor/github.com/pborman/uuid/time.go
+++ b/vendor/github.com/pborman/uuid/time.go
@@ -6,65 +6,18 @@ package uuid
import (
"encoding/binary"
- "sync"
- "time"
+
+ guuid "github.com/google/uuid"
)
// A Time represents a time as the number of 100's of nanoseconds since 15 Oct
// 1582.
-type Time int64
-
-const (
- lillian = 2299160 // Julian day of 15 Oct 1582
- unix = 2440587 // Julian day of 1 Jan 1970
- epoch = unix - lillian // Days between epochs
- g1582 = epoch * 86400 // seconds between epochs
- g1582ns100 = g1582 * 10000000 // 100s of a nanoseconds between epochs
-)
-
-var (
- timeMu sync.Mutex
- lasttime uint64 // last time we returned
- clock_seq uint16 // clock sequence for this run
-
- timeNow = time.Now // for testing
-)
-
-// UnixTime converts t the number of seconds and nanoseconds using the Unix
-// epoch of 1 Jan 1970.
-func (t Time) UnixTime() (sec, nsec int64) {
- sec = int64(t - g1582ns100)
- nsec = (sec % 10000000) * 100
- sec /= 10000000
- return sec, nsec
-}
+type Time = guuid.Time
// GetTime returns the current Time (100s of nanoseconds since 15 Oct 1582) and
// clock sequence as well as adjusting the clock sequence as needed. An error
// is returned if the current time cannot be determined.
-func GetTime() (Time, uint16, error) {
- defer timeMu.Unlock()
- timeMu.Lock()
- return getTime()
-}
-
-func getTime() (Time, uint16, error) {
- t := timeNow()
-
- // If we don't have a clock sequence already, set one.
- if clock_seq == 0 {
- setClockSequence(-1)
- }
- now := uint64(t.UnixNano()/100) + g1582ns100
-
- // If time has gone backwards with this clock sequence then we
- // increment the clock sequence
- if now <= lasttime {
- clock_seq = ((clock_seq + 1) & 0x3fff) | 0x8000
- }
- lasttime = now
- return Time(now), clock_seq, nil
-}
+func GetTime() (Time, uint16, error) { return guuid.GetTime() }
// ClockSequence returns the current clock sequence, generating one if not
// already set. The clock sequence is only used for Version 1 UUIDs.
@@ -74,39 +27,11 @@ func getTime() (Time, uint16, error) {
// clock sequence is generated the first time a clock sequence is requested by
// ClockSequence, GetTime, or NewUUID. (section 4.2.1.1) sequence is generated
// for
-func ClockSequence() int {
- defer timeMu.Unlock()
- timeMu.Lock()
- return clockSequence()
-}
-
-func clockSequence() int {
- if clock_seq == 0 {
- setClockSequence(-1)
- }
- return int(clock_seq & 0x3fff)
-}
+func ClockSequence() int { return guuid.ClockSequence() }
// SetClockSeq sets the clock sequence to the lower 14 bits of seq. Setting to
// -1 causes a new sequence to be generated.
-func SetClockSequence(seq int) {
- defer timeMu.Unlock()
- timeMu.Lock()
- setClockSequence(seq)
-}
-
-func setClockSequence(seq int) {
- if seq == -1 {
- var b [2]byte
- randomBits(b[:]) // clock sequence
- seq = int(b[0])<<8 | int(b[1])
- }
- old_seq := clock_seq
- clock_seq = uint16(seq&0x3fff) | 0x8000 // Set our variant
- if old_seq != clock_seq {
- lasttime = 0
- }
-}
+func SetClockSequence(seq int) { guuid.SetClockSequence(seq) }
// Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in
// uuid. It returns false if uuid is not valid. The time is only well defined
diff --git a/vendor/github.com/pborman/uuid/util.go b/vendor/github.com/pborman/uuid/util.go
index fc8e052c7..255b5e248 100644
--- a/vendor/github.com/pborman/uuid/util.go
+++ b/vendor/github.com/pborman/uuid/util.go
@@ -4,17 +4,6 @@
package uuid
-import (
- "io"
-)
-
-// randomBits completely fills slice b with random data.
-func randomBits(b []byte) {
- if _, err := io.ReadFull(rander, b); err != nil {
- panic(err.Error()) // rand should never fail
- }
-}
-
// xvalues returns the value of a byte as a hexadecimal digit or 255.
var xvalues = [256]byte{
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
diff --git a/vendor/github.com/pborman/uuid/uuid.go b/vendor/github.com/pborman/uuid/uuid.go
index 7c643cf0a..a2429b0dd 100644
--- a/vendor/github.com/pborman/uuid/uuid.go
+++ b/vendor/github.com/pborman/uuid/uuid.go
@@ -8,9 +8,9 @@ import (
"bytes"
"crypto/rand"
"encoding/hex"
- "fmt"
"io"
- "strings"
+
+ guuid "github.com/google/uuid"
)
// Array is a pass-by-value UUID that can be used as an effecient key in a map.
@@ -24,7 +24,7 @@ func (uuid Array) UUID() UUID {
// String returns the string representation of uuid,
// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
func (uuid Array) String() string {
- return uuid.UUID().String()
+ return guuid.UUID(uuid).String()
}
// A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC
@@ -32,18 +32,18 @@ func (uuid Array) String() string {
type UUID []byte
// A Version represents a UUIDs version.
-type Version byte
+type Version = guuid.Version
// A Variant represents a UUIDs variant.
-type Variant byte
+type Variant = guuid.Variant
// Constants returned by Variant.
const (
- Invalid = Variant(iota) // Invalid UUID
- RFC4122 // The variant specified in RFC4122
- Reserved // Reserved, NCS backward compatibility.
- Microsoft // Reserved, Microsoft Corporation backward compatibility.
- Future // Reserved for future definition.
+ Invalid = guuid.Invalid // Invalid UUID
+ RFC4122 = guuid.RFC4122 // The variant specified in RFC4122
+ Reserved = guuid.Reserved // Reserved, NCS backward compatibility.
+ Microsoft = guuid.Microsoft // Reserved, Microsoft Corporation backward compatibility.
+ Future = guuid.Future // Reserved for future definition.
)
var rander = rand.Reader // random function
@@ -58,31 +58,20 @@ func New() string {
// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and
// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded.
func Parse(s string) UUID {
- if len(s) == 36+9 {
- if strings.ToLower(s[:9]) != "urn:uuid:" {
- return nil
- }
- s = s[9:]
- } else if len(s) != 36 {
- return nil
- }
- if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' {
- return nil
+ gu, err := guuid.Parse(s)
+ if err == nil {
+ return gu[:]
}
- var uuid [16]byte
- for i, x := range [16]int{
- 0, 2, 4, 6,
- 9, 11,
- 14, 16,
- 19, 21,
- 24, 26, 28, 30, 32, 34} {
- if v, ok := xtob(s[x:]); !ok {
- return nil
- } else {
- uuid[i] = v
- }
+ return nil
+}
+
+// ParseBytes is like Parse, except it parses a byte slice instead of a string.
+func ParseBytes(b []byte) (UUID, error) {
+ gu, err := guuid.ParseBytes(b)
+ if err == nil {
+ return gu[:], nil
}
- return uuid[:]
+ return nil, err
}
// Equal returns true if uuid1 and uuid2 are equal.
@@ -163,29 +152,6 @@ func (uuid UUID) Version() (Version, bool) {
return Version(uuid[6] >> 4), true
}
-func (v Version) String() string {
- if v > 15 {
- return fmt.Sprintf("BAD_VERSION_%d", v)
- }
- return fmt.Sprintf("VERSION_%d", v)
-}
-
-func (v Variant) String() string {
- switch v {
- case RFC4122:
- return "RFC4122"
- case Reserved:
- return "Reserved"
- case Microsoft:
- return "Microsoft"
- case Future:
- return "Future"
- case Invalid:
- return "Invalid"
- }
- return fmt.Sprintf("BadVariant%d", int(v))
-}
-
// SetRand sets the random number generator to r, which implements io.Reader.
// If r.Read returns an error when the package requests random data then
// a panic will be issued.
@@ -193,9 +159,5 @@ func (v Variant) String() string {
// Calling SetRand with nil sets the random number generator to the default
// generator.
func SetRand(r io.Reader) {
- if r == nil {
- rander = rand.Reader
- return
- }
- rander = r
+ guuid.SetRand(r)
}
diff --git a/vendor/github.com/pborman/uuid/version1.go b/vendor/github.com/pborman/uuid/version1.go
index 0127eacfa..7af948da7 100644
--- a/vendor/github.com/pborman/uuid/version1.go
+++ b/vendor/github.com/pborman/uuid/version1.go
@@ -5,7 +5,7 @@
package uuid
import (
- "encoding/binary"
+ guuid "github.com/google/uuid"
)
// NewUUID returns a Version 1 UUID based on the current NodeID and clock
@@ -15,27 +15,9 @@ import (
// SetClockSequence then it will be set automatically. If GetTime fails to
// return the current NewUUID returns nil.
func NewUUID() UUID {
- if nodeID == nil {
- SetNodeInterface("")
+ gu, err := guuid.NewUUID()
+ if err == nil {
+ return UUID(gu[:])
}
-
- now, seq, err := GetTime()
- if err != nil {
- return nil
- }
-
- uuid := make([]byte, 16)
-
- time_low := uint32(now & 0xffffffff)
- time_mid := uint16((now >> 32) & 0xffff)
- time_hi := uint16((now >> 48) & 0x0fff)
- time_hi |= 0x1000 // Version 1
-
- binary.BigEndian.PutUint32(uuid[0:], time_low)
- binary.BigEndian.PutUint16(uuid[4:], time_mid)
- binary.BigEndian.PutUint16(uuid[6:], time_hi)
- binary.BigEndian.PutUint16(uuid[8:], seq)
- copy(uuid[10:], nodeID)
-
- return uuid
+ return nil
}
diff --git a/vendor/github.com/pborman/uuid/version4.go b/vendor/github.com/pborman/uuid/version4.go
index b3d4a368d..b459d46d1 100644
--- a/vendor/github.com/pborman/uuid/version4.go
+++ b/vendor/github.com/pborman/uuid/version4.go
@@ -4,12 +4,14 @@
package uuid
+import guuid "github.com/google/uuid"
+
// Random returns a Random (Version 4) UUID or panics.
//
// The strength of the UUIDs is based on the strength of the crypto/rand
// package.
//
-// A note about uniqueness derived from from the UUID Wikipedia entry:
+// A note about uniqueness derived from the UUID Wikipedia entry:
//
// Randomly generated UUIDs have 122 random bits. One's annual risk of being
// hit by a meteorite is estimated to be one chance in 17 billion, that
@@ -17,9 +19,8 @@ package uuid
// equivalent to the odds of creating a few tens of trillions of UUIDs in a
// year and having one duplicate.
func NewRandom() UUID {
- uuid := make([]byte, 16)
- randomBits([]byte(uuid))
- uuid[6] = (uuid[6] & 0x0f) | 0x40 // Version 4
- uuid[8] = (uuid[8] & 0x3f) | 0x80 // Variant is 10
- return uuid
+ if gu, err := guuid.NewRandom(); err == nil {
+ return UUID(gu[:])
+ }
+ return nil
}
diff --git a/vendor/github.com/prometheus/procfs/fixtures.ttar b/vendor/github.com/prometheus/procfs/fixtures.ttar
index 3ee8291e8..13c831ef5 100644
--- a/vendor/github.com/prometheus/procfs/fixtures.ttar
+++ b/vendor/github.com/prometheus/procfs/fixtures.ttar
@@ -15,6 +15,9 @@ Lines: 1
vim
Mode: 644
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/cwd
+SymlinkTo: /usr/bin
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Path: fixtures/26231/exe
SymlinkTo: /usr/bin/vim
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -111,6 +114,9 @@ SymlinkTo: mnt:[4026531840]
Path: fixtures/26231/ns/net
SymlinkTo: net:[4026531993]
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26231/root
+SymlinkTo: /
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Path: fixtures/26231/stat
Lines: 1
26231 (vim) R 5392 7446 5392 34835 7446 4218880 32533 309516 26 82 1677 44 158 99 20 0 1 0 82375 56274944 1981 18446744073709551615 4194304 6294284 140736914091744 140736914087944 139965136429984 0 0 12288 1870679807 0 0 0 17 0 0 0 31 0 0 8391624 8481048 16420864 140736914093252 140736914093279 140736914093279 140736914096107 0
@@ -128,6 +134,9 @@ Lines: 1
ata_sff
Mode: 644
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26232/cwd
+SymlinkTo: /does/not/exist
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Directory: fixtures/26232/fd
Mode: 755
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -167,6 +176,9 @@ Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
Mode: 644
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/26232/root
+SymlinkTo: /does/not/exist
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Path: fixtures/26232/stat
Lines: 1
33 (ata_sff) S 2 0 0 0 -1 69238880 0 0 0 0 0 0 0 0 0 -20 1 0 5 0 0 18446744073709551615 0 0 0 0 0 0 0 2147483647 0 18446744073709551615 0 0 17 1 0 0 0 0 0 0 0 0 0 0 0 0 0
@@ -444,3 +456,7 @@ Path: fixtures/symlinktargets/xyz
Lines: 0
Mode: 644
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Path: fixtures/.unpacked
+Lines: 0
+Mode: 664
+# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/vendor/github.com/prometheus/procfs/proc.go b/vendor/github.com/prometheus/procfs/proc.go
index 7cf5b8acf..06bed0ef4 100644
--- a/vendor/github.com/prometheus/procfs/proc.go
+++ b/vendor/github.com/prometheus/procfs/proc.go
@@ -156,6 +156,26 @@ func (p Proc) Executable() (string, error) {
return exe, err
}
+// Cwd returns the absolute path to the current working directory of the process.
+func (p Proc) Cwd() (string, error) {
+ wd, err := os.Readlink(p.path("cwd"))
+ if os.IsNotExist(err) {
+ return "", nil
+ }
+
+ return wd, err
+}
+
+// RootDir returns the absolute path to the process's root directory (as set by chroot)
+func (p Proc) RootDir() (string, error) {
+ rdir, err := os.Readlink(p.path("root"))
+ if os.IsNotExist(err) {
+ return "", nil
+ }
+
+ return rdir, err
+}
+
// FileDescriptors returns the currently open file descriptors of a process.
func (p Proc) FileDescriptors() ([]uintptr, error) {
names, err := p.fileDescriptors()
diff --git a/vendor/github.com/sirupsen/logrus/.travis.yml b/vendor/github.com/sirupsen/logrus/.travis.yml
index 2f19b4a75..1f953bebd 100644
--- a/vendor/github.com/sirupsen/logrus/.travis.yml
+++ b/vendor/github.com/sirupsen/logrus/.travis.yml
@@ -1,13 +1,51 @@
language: go
-go:
- - 1.9.x
- - 1.10.x
env:
- GOMAXPROCS=4 GORACE=halt_on_error=1
-install:
- - go get github.com/stretchr/testify/assert
- - go get gopkg.in/gemnasium/logrus-airbrake-hook.v2
- - go get golang.org/x/sys/unix
- - go get golang.org/x/sys/windows
-script:
- - go test -race -v ./...
+matrix:
+ include:
+ - go: 1.10.x
+ install:
+ - go get github.com/stretchr/testify/assert
+ - go get golang.org/x/crypto/ssh/terminal
+ - go get golang.org/x/sys/unix
+ - go get golang.org/x/sys/windows
+ script:
+ - go test -race -v ./...
+ - go: 1.11.x
+ env: GO111MODULE=on
+ install:
+ - go mod download
+ script:
+ - go test -race -v ./...
+ - go: 1.11.x
+ env: GO111MODULE=off
+ install:
+ - go get github.com/stretchr/testify/assert
+ - go get golang.org/x/crypto/ssh/terminal
+ - go get golang.org/x/sys/unix
+ - go get golang.org/x/sys/windows
+ script:
+ - go test -race -v ./...
+ - go: 1.10.x
+ install:
+ - go get github.com/stretchr/testify/assert
+ - go get golang.org/x/crypto/ssh/terminal
+ - go get golang.org/x/sys/unix
+ - go get golang.org/x/sys/windows
+ script:
+ - go test -race -v -tags appengine ./...
+ - go: 1.11.x
+ env: GO111MODULE=on
+ install:
+ - go mod download
+ script:
+ - go test -race -v -tags appengine ./...
+ - go: 1.11.x
+ env: GO111MODULE=off
+ install:
+ - go get github.com/stretchr/testify/assert
+ - go get golang.org/x/crypto/ssh/terminal
+ - go get golang.org/x/sys/unix
+ - go get golang.org/x/sys/windows
+ script:
+ - go test -race -v -tags appengine ./...
diff --git a/vendor/github.com/sirupsen/logrus/CHANGELOG.md b/vendor/github.com/sirupsen/logrus/CHANGELOG.md
index 1bd1deb29..170269608 100644
--- a/vendor/github.com/sirupsen/logrus/CHANGELOG.md
+++ b/vendor/github.com/sirupsen/logrus/CHANGELOG.md
@@ -1,3 +1,33 @@
+# 1.1.0
+This new release introduces:
+ * several fixes:
+ * a fix for a race condition on entry formatting
+ * proper cleanup of previously used entries before putting them back in the pool
+ * the extra new line at the end of message in text formatter has been removed
+ * a new global public API to check if a level is activated: IsLevelEnabled
+ * the following methods have been added to the Logger object
+ * IsLevelEnabled
+ * SetFormatter
+ * SetOutput
+ * ReplaceHooks
+ * introduction of go module
+ * an indent configuration for the json formatter
+ * output colour support for windows
+ * the field sort function is now configurable for text formatter
+ * the CLICOLOR and CLICOLOR\_FORCE environment variable support in text formater
+
+# 1.0.6
+
+This new release introduces:
+ * a new api WithTime which allows to easily force the time of the log entry
+ which is mostly useful for logger wrapper
+ * a fix reverting the immutability of the entry given as parameter to the hooks
+ a new configuration field of the json formatter in order to put all the fields
+ in a nested dictionnary
+ * a new SetOutput method in the Logger
+ * a new configuration of the textformatter to configure the name of the default keys
+ * a new configuration of the text formatter to disable the level truncation
+
# 1.0.5
* Fix hooks race (#707)
diff --git a/vendor/github.com/sirupsen/logrus/entry.go b/vendor/github.com/sirupsen/logrus/entry.go
index 473bd1a0d..4efedddfe 100644
--- a/vendor/github.com/sirupsen/logrus/entry.go
+++ b/vendor/github.com/sirupsen/logrus/entry.go
@@ -41,7 +41,7 @@ type Entry struct {
// Message passed to Debug, Info, Warn, Error, Fatal or Panic
Message string
- // When formatter is called in entry.log(), an Buffer may be set to entry
+ // When formatter is called in entry.log(), a Buffer may be set to entry
Buffer *bytes.Buffer
}
@@ -137,9 +137,9 @@ func (entry *Entry) fireHooks() {
}
func (entry *Entry) write() {
- serialized, err := entry.Logger.Formatter.Format(entry)
entry.Logger.mu.Lock()
defer entry.Logger.mu.Unlock()
+ serialized, err := entry.Logger.Formatter.Format(entry)
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err)
} else {
@@ -151,7 +151,7 @@ func (entry *Entry) write() {
}
func (entry *Entry) Debug(args ...interface{}) {
- if entry.Logger.level() >= DebugLevel {
+ if entry.Logger.IsLevelEnabled(DebugLevel) {
entry.log(DebugLevel, fmt.Sprint(args...))
}
}
@@ -161,13 +161,13 @@ func (entry *Entry) Print(args ...interface{}) {
}
func (entry *Entry) Info(args ...interface{}) {
- if entry.Logger.level() >= InfoLevel {
+ if entry.Logger.IsLevelEnabled(InfoLevel) {
entry.log(InfoLevel, fmt.Sprint(args...))
}
}
func (entry *Entry) Warn(args ...interface{}) {
- if entry.Logger.level() >= WarnLevel {
+ if entry.Logger.IsLevelEnabled(WarnLevel) {
entry.log(WarnLevel, fmt.Sprint(args...))
}
}
@@ -177,20 +177,20 @@ func (entry *Entry) Warning(args ...interface{}) {
}
func (entry *Entry) Error(args ...interface{}) {
- if entry.Logger.level() >= ErrorLevel {
+ if entry.Logger.IsLevelEnabled(ErrorLevel) {
entry.log(ErrorLevel, fmt.Sprint(args...))
}
}
func (entry *Entry) Fatal(args ...interface{}) {
- if entry.Logger.level() >= FatalLevel {
+ if entry.Logger.IsLevelEnabled(FatalLevel) {
entry.log(FatalLevel, fmt.Sprint(args...))
}
Exit(1)
}
func (entry *Entry) Panic(args ...interface{}) {
- if entry.Logger.level() >= PanicLevel {
+ if entry.Logger.IsLevelEnabled(PanicLevel) {
entry.log(PanicLevel, fmt.Sprint(args...))
}
panic(fmt.Sprint(args...))
@@ -199,13 +199,13 @@ func (entry *Entry) Panic(args ...interface{}) {
// Entry Printf family functions
func (entry *Entry) Debugf(format string, args ...interface{}) {
- if entry.Logger.level() >= DebugLevel {
+ if entry.Logger.IsLevelEnabled(DebugLevel) {
entry.Debug(fmt.Sprintf(format, args...))
}
}
func (entry *Entry) Infof(format string, args ...interface{}) {
- if entry.Logger.level() >= InfoLevel {
+ if entry.Logger.IsLevelEnabled(InfoLevel) {
entry.Info(fmt.Sprintf(format, args...))
}
}
@@ -215,7 +215,7 @@ func (entry *Entry) Printf(format string, args ...interface{}) {
}
func (entry *Entry) Warnf(format string, args ...interface{}) {
- if entry.Logger.level() >= WarnLevel {
+ if entry.Logger.IsLevelEnabled(WarnLevel) {
entry.Warn(fmt.Sprintf(format, args...))
}
}
@@ -225,20 +225,20 @@ func (entry *Entry) Warningf(format string, args ...interface{}) {
}
func (entry *Entry) Errorf(format string, args ...interface{}) {
- if entry.Logger.level() >= ErrorLevel {
+ if entry.Logger.IsLevelEnabled(ErrorLevel) {
entry.Error(fmt.Sprintf(format, args...))
}
}
func (entry *Entry) Fatalf(format string, args ...interface{}) {
- if entry.Logger.level() >= FatalLevel {
+ if entry.Logger.IsLevelEnabled(FatalLevel) {
entry.Fatal(fmt.Sprintf(format, args...))
}
Exit(1)
}
func (entry *Entry) Panicf(format string, args ...interface{}) {
- if entry.Logger.level() >= PanicLevel {
+ if entry.Logger.IsLevelEnabled(PanicLevel) {
entry.Panic(fmt.Sprintf(format, args...))
}
}
@@ -246,13 +246,13 @@ func (entry *Entry) Panicf(format string, args ...interface{}) {
// Entry Println family functions
func (entry *Entry) Debugln(args ...interface{}) {
- if entry.Logger.level() >= DebugLevel {
+ if entry.Logger.IsLevelEnabled(DebugLevel) {
entry.Debug(entry.sprintlnn(args...))
}
}
func (entry *Entry) Infoln(args ...interface{}) {
- if entry.Logger.level() >= InfoLevel {
+ if entry.Logger.IsLevelEnabled(InfoLevel) {
entry.Info(entry.sprintlnn(args...))
}
}
@@ -262,7 +262,7 @@ func (entry *Entry) Println(args ...interface{}) {
}
func (entry *Entry) Warnln(args ...interface{}) {
- if entry.Logger.level() >= WarnLevel {
+ if entry.Logger.IsLevelEnabled(WarnLevel) {
entry.Warn(entry.sprintlnn(args...))
}
}
@@ -272,20 +272,20 @@ func (entry *Entry) Warningln(args ...interface{}) {
}
func (entry *Entry) Errorln(args ...interface{}) {
- if entry.Logger.level() >= ErrorLevel {
+ if entry.Logger.IsLevelEnabled(ErrorLevel) {
entry.Error(entry.sprintlnn(args...))
}
}
func (entry *Entry) Fatalln(args ...interface{}) {
- if entry.Logger.level() >= FatalLevel {
+ if entry.Logger.IsLevelEnabled(FatalLevel) {
entry.Fatal(entry.sprintlnn(args...))
}
Exit(1)
}
func (entry *Entry) Panicln(args ...interface{}) {
- if entry.Logger.level() >= PanicLevel {
+ if entry.Logger.IsLevelEnabled(PanicLevel) {
entry.Panic(entry.sprintlnn(args...))
}
}
diff --git a/vendor/github.com/sirupsen/logrus/exported.go b/vendor/github.com/sirupsen/logrus/exported.go
index eb612a6f3..fb2a7a1f0 100644
--- a/vendor/github.com/sirupsen/logrus/exported.go
+++ b/vendor/github.com/sirupsen/logrus/exported.go
@@ -21,30 +21,27 @@ func SetOutput(out io.Writer) {
// SetFormatter sets the standard logger formatter.
func SetFormatter(formatter Formatter) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Formatter = formatter
+ std.SetFormatter(formatter)
}
// SetLevel sets the standard logger level.
func SetLevel(level Level) {
- std.mu.Lock()
- defer std.mu.Unlock()
std.SetLevel(level)
}
// GetLevel returns the standard logger level.
func GetLevel() Level {
- std.mu.Lock()
- defer std.mu.Unlock()
- return std.level()
+ return std.GetLevel()
+}
+
+// IsLevelEnabled checks if the log level of the standard logger is greater than the level param
+func IsLevelEnabled(level Level) bool {
+ return std.IsLevelEnabled(level)
}
// AddHook adds a hook to the standard logger hooks.
func AddHook(hook Hook) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Hooks.Add(hook)
+ std.AddHook(hook)
}
// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.
diff --git a/vendor/github.com/sirupsen/logrus/go.mod b/vendor/github.com/sirupsen/logrus/go.mod
new file mode 100644
index 000000000..f4fed02fb
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/go.mod
@@ -0,0 +1,10 @@
+module github.com/sirupsen/logrus
+
+require (
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe
+ github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/stretchr/testify v1.2.2
+ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793
+ golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33
+)
diff --git a/vendor/github.com/sirupsen/logrus/go.sum b/vendor/github.com/sirupsen/logrus/go.sum
new file mode 100644
index 000000000..1f0d71964
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/go.sum
@@ -0,0 +1,12 @@
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe h1:CHRGQ8V7OlCYtwaKPJi3iA7J+YdNKdo8j7nG5IgDhjs=
+github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I=
+golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8=
+golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
diff --git a/vendor/github.com/sirupsen/logrus/json_formatter.go b/vendor/github.com/sirupsen/logrus/json_formatter.go
index dab17610f..d3dadefe6 100644
--- a/vendor/github.com/sirupsen/logrus/json_formatter.go
+++ b/vendor/github.com/sirupsen/logrus/json_formatter.go
@@ -1,6 +1,7 @@
package logrus
import (
+ "bytes"
"encoding/json"
"fmt"
)
@@ -46,6 +47,9 @@ type JSONFormatter struct {
// },
// }
FieldMap FieldMap
+
+ // PrettyPrint will indent all json logs
+ PrettyPrint bool
}
// Format renders a single log entry
@@ -81,9 +85,20 @@ func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
data[f.FieldMap.resolve(FieldKeyMsg)] = entry.Message
data[f.FieldMap.resolve(FieldKeyLevel)] = entry.Level.String()
- serialized, err := json.Marshal(data)
- if err != nil {
+ var b *bytes.Buffer
+ if entry.Buffer != nil {
+ b = entry.Buffer
+ } else {
+ b = &bytes.Buffer{}
+ }
+
+ encoder := json.NewEncoder(b)
+ if f.PrettyPrint {
+ encoder.SetIndent("", " ")
+ }
+ if err := encoder.Encode(data); err != nil {
return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
}
- return append(serialized, '\n'), nil
+
+ return b.Bytes(), nil
}
diff --git a/vendor/github.com/sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go
index 342f7977d..b67bfcbd3 100644
--- a/vendor/github.com/sirupsen/logrus/logger.go
+++ b/vendor/github.com/sirupsen/logrus/logger.go
@@ -11,7 +11,7 @@ import (
type Logger struct {
// The logs are `io.Copy`'d to this in a mutex. It's common to set this to a
// file, or leave it default which is `os.Stderr`. You can also set this to
- // something more adventorous, such as logging to Kafka.
+ // something more adventurous, such as logging to Kafka.
Out io.Writer
// Hooks for the logger instance. These allow firing events based on logging
// levels and log entries. For example, to send errors to an error tracking
@@ -85,6 +85,7 @@ func (logger *Logger) newEntry() *Entry {
}
func (logger *Logger) releaseEntry(entry *Entry) {
+ entry.Data = map[string]interface{}{}
logger.entryPool.Put(entry)
}
@@ -121,7 +122,7 @@ func (logger *Logger) WithTime(t time.Time) *Entry {
}
func (logger *Logger) Debugf(format string, args ...interface{}) {
- if logger.level() >= DebugLevel {
+ if logger.IsLevelEnabled(DebugLevel) {
entry := logger.newEntry()
entry.Debugf(format, args...)
logger.releaseEntry(entry)
@@ -129,7 +130,7 @@ func (logger *Logger) Debugf(format string, args ...interface{}) {
}
func (logger *Logger) Infof(format string, args ...interface{}) {
- if logger.level() >= InfoLevel {
+ if logger.IsLevelEnabled(InfoLevel) {
entry := logger.newEntry()
entry.Infof(format, args...)
logger.releaseEntry(entry)
@@ -143,7 +144,7 @@ func (logger *Logger) Printf(format string, args ...interface{}) {
}
func (logger *Logger) Warnf(format string, args ...interface{}) {
- if logger.level() >= WarnLevel {
+ if logger.IsLevelEnabled(WarnLevel) {
entry := logger.newEntry()
entry.Warnf(format, args...)
logger.releaseEntry(entry)
@@ -151,7 +152,7 @@ func (logger *Logger) Warnf(format string, args ...interface{}) {
}
func (logger *Logger) Warningf(format string, args ...interface{}) {
- if logger.level() >= WarnLevel {
+ if logger.IsLevelEnabled(WarnLevel) {
entry := logger.newEntry()
entry.Warnf(format, args...)
logger.releaseEntry(entry)
@@ -159,7 +160,7 @@ func (logger *Logger) Warningf(format string, args ...interface{}) {
}
func (logger *Logger) Errorf(format string, args ...interface{}) {
- if logger.level() >= ErrorLevel {
+ if logger.IsLevelEnabled(ErrorLevel) {
entry := logger.newEntry()
entry.Errorf(format, args...)
logger.releaseEntry(entry)
@@ -167,7 +168,7 @@ func (logger *Logger) Errorf(format string, args ...interface{}) {
}
func (logger *Logger) Fatalf(format string, args ...interface{}) {
- if logger.level() >= FatalLevel {
+ if logger.IsLevelEnabled(FatalLevel) {
entry := logger.newEntry()
entry.Fatalf(format, args...)
logger.releaseEntry(entry)
@@ -176,7 +177,7 @@ func (logger *Logger) Fatalf(format string, args ...interface{}) {
}
func (logger *Logger) Panicf(format string, args ...interface{}) {
- if logger.level() >= PanicLevel {
+ if logger.IsLevelEnabled(PanicLevel) {
entry := logger.newEntry()
entry.Panicf(format, args...)
logger.releaseEntry(entry)
@@ -184,7 +185,7 @@ func (logger *Logger) Panicf(format string, args ...interface{}) {
}
func (logger *Logger) Debug(args ...interface{}) {
- if logger.level() >= DebugLevel {
+ if logger.IsLevelEnabled(DebugLevel) {
entry := logger.newEntry()
entry.Debug(args...)
logger.releaseEntry(entry)
@@ -192,7 +193,7 @@ func (logger *Logger) Debug(args ...interface{}) {
}
func (logger *Logger) Info(args ...interface{}) {
- if logger.level() >= InfoLevel {
+ if logger.IsLevelEnabled(InfoLevel) {
entry := logger.newEntry()
entry.Info(args...)
logger.releaseEntry(entry)
@@ -206,7 +207,7 @@ func (logger *Logger) Print(args ...interface{}) {
}
func (logger *Logger) Warn(args ...interface{}) {
- if logger.level() >= WarnLevel {
+ if logger.IsLevelEnabled(WarnLevel) {
entry := logger.newEntry()
entry.Warn(args...)
logger.releaseEntry(entry)
@@ -214,7 +215,7 @@ func (logger *Logger) Warn(args ...interface{}) {
}
func (logger *Logger) Warning(args ...interface{}) {
- if logger.level() >= WarnLevel {
+ if logger.IsLevelEnabled(WarnLevel) {
entry := logger.newEntry()
entry.Warn(args...)
logger.releaseEntry(entry)
@@ -222,7 +223,7 @@ func (logger *Logger) Warning(args ...interface{}) {
}
func (logger *Logger) Error(args ...interface{}) {
- if logger.level() >= ErrorLevel {
+ if logger.IsLevelEnabled(ErrorLevel) {
entry := logger.newEntry()
entry.Error(args...)
logger.releaseEntry(entry)
@@ -230,7 +231,7 @@ func (logger *Logger) Error(args ...interface{}) {
}
func (logger *Logger) Fatal(args ...interface{}) {
- if logger.level() >= FatalLevel {
+ if logger.IsLevelEnabled(FatalLevel) {
entry := logger.newEntry()
entry.Fatal(args...)
logger.releaseEntry(entry)
@@ -239,7 +240,7 @@ func (logger *Logger) Fatal(args ...interface{}) {
}
func (logger *Logger) Panic(args ...interface{}) {
- if logger.level() >= PanicLevel {
+ if logger.IsLevelEnabled(PanicLevel) {
entry := logger.newEntry()
entry.Panic(args...)
logger.releaseEntry(entry)
@@ -247,7 +248,7 @@ func (logger *Logger) Panic(args ...interface{}) {
}
func (logger *Logger) Debugln(args ...interface{}) {
- if logger.level() >= DebugLevel {
+ if logger.IsLevelEnabled(DebugLevel) {
entry := logger.newEntry()
entry.Debugln(args...)
logger.releaseEntry(entry)
@@ -255,7 +256,7 @@ func (logger *Logger) Debugln(args ...interface{}) {
}
func (logger *Logger) Infoln(args ...interface{}) {
- if logger.level() >= InfoLevel {
+ if logger.IsLevelEnabled(InfoLevel) {
entry := logger.newEntry()
entry.Infoln(args...)
logger.releaseEntry(entry)
@@ -269,7 +270,7 @@ func (logger *Logger) Println(args ...interface{}) {
}
func (logger *Logger) Warnln(args ...interface{}) {
- if logger.level() >= WarnLevel {
+ if logger.IsLevelEnabled(WarnLevel) {
entry := logger.newEntry()
entry.Warnln(args...)
logger.releaseEntry(entry)
@@ -277,7 +278,7 @@ func (logger *Logger) Warnln(args ...interface{}) {
}
func (logger *Logger) Warningln(args ...interface{}) {
- if logger.level() >= WarnLevel {
+ if logger.IsLevelEnabled(WarnLevel) {
entry := logger.newEntry()
entry.Warnln(args...)
logger.releaseEntry(entry)
@@ -285,7 +286,7 @@ func (logger *Logger) Warningln(args ...interface{}) {
}
func (logger *Logger) Errorln(args ...interface{}) {
- if logger.level() >= ErrorLevel {
+ if logger.IsLevelEnabled(ErrorLevel) {
entry := logger.newEntry()
entry.Errorln(args...)
logger.releaseEntry(entry)
@@ -293,7 +294,7 @@ func (logger *Logger) Errorln(args ...interface{}) {
}
func (logger *Logger) Fatalln(args ...interface{}) {
- if logger.level() >= FatalLevel {
+ if logger.IsLevelEnabled(FatalLevel) {
entry := logger.newEntry()
entry.Fatalln(args...)
logger.releaseEntry(entry)
@@ -302,7 +303,7 @@ func (logger *Logger) Fatalln(args ...interface{}) {
}
func (logger *Logger) Panicln(args ...interface{}) {
- if logger.level() >= PanicLevel {
+ if logger.IsLevelEnabled(PanicLevel) {
entry := logger.newEntry()
entry.Panicln(args...)
logger.releaseEntry(entry)
@@ -320,18 +321,47 @@ func (logger *Logger) level() Level {
return Level(atomic.LoadUint32((*uint32)(&logger.Level)))
}
+// SetLevel sets the logger level.
func (logger *Logger) SetLevel(level Level) {
atomic.StoreUint32((*uint32)(&logger.Level), uint32(level))
}
-func (logger *Logger) SetOutput(out io.Writer) {
- logger.mu.Lock()
- defer logger.mu.Unlock()
- logger.Out = out
+// GetLevel returns the logger level.
+func (logger *Logger) GetLevel() Level {
+ return logger.level()
}
+// AddHook adds a hook to the logger hooks.
func (logger *Logger) AddHook(hook Hook) {
logger.mu.Lock()
defer logger.mu.Unlock()
logger.Hooks.Add(hook)
}
+
+// IsLevelEnabled checks if the log level of the logger is greater than the level param
+func (logger *Logger) IsLevelEnabled(level Level) bool {
+ return logger.level() >= level
+}
+
+// SetFormatter sets the logger formatter.
+func (logger *Logger) SetFormatter(formatter Formatter) {
+ logger.mu.Lock()
+ defer logger.mu.Unlock()
+ logger.Formatter = formatter
+}
+
+// SetOutput sets the logger output.
+func (logger *Logger) SetOutput(output io.Writer) {
+ logger.mu.Lock()
+ defer logger.mu.Unlock()
+ logger.Out = output
+}
+
+// ReplaceHooks replaces the logger hooks and returns the old ones
+func (logger *Logger) ReplaceHooks(hooks LevelHooks) LevelHooks {
+ logger.mu.Lock()
+ oldHooks := logger.Hooks
+ logger.Hooks = hooks
+ logger.mu.Unlock()
+ return oldHooks
+}
diff --git a/vendor/github.com/sirupsen/logrus/logrus.go b/vendor/github.com/sirupsen/logrus/logrus.go
index dd3899974..fa0b9dea8 100644
--- a/vendor/github.com/sirupsen/logrus/logrus.go
+++ b/vendor/github.com/sirupsen/logrus/logrus.go
@@ -140,4 +140,11 @@ type FieldLogger interface {
Errorln(args ...interface{})
Fatalln(args ...interface{})
Panicln(args ...interface{})
+
+ // IsDebugEnabled() bool
+ // IsInfoEnabled() bool
+ // IsWarnEnabled() bool
+ // IsErrorEnabled() bool
+ // IsFatalEnabled() bool
+ // IsPanicEnabled() bool
}
diff --git a/vendor/github.com/sirupsen/logrus/terminal_appengine.go b/vendor/github.com/sirupsen/logrus/terminal_appengine.go
new file mode 100644
index 000000000..72f679cdb
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/terminal_appengine.go
@@ -0,0 +1,13 @@
+// Based on ssh/terminal:
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build appengine
+
+package logrus
+
+import "io"
+
+func initTerminal(w io.Writer) {
+}
diff --git a/vendor/github.com/sirupsen/logrus/terminal_bsd.go b/vendor/github.com/sirupsen/logrus/terminal_bsd.go
index 4880d13d2..62ca252d0 100644
--- a/vendor/github.com/sirupsen/logrus/terminal_bsd.go
+++ b/vendor/github.com/sirupsen/logrus/terminal_bsd.go
@@ -1,10 +1,17 @@
// +build darwin freebsd openbsd netbsd dragonfly
-// +build !appengine,!gopherjs
+// +build !appengine,!js
package logrus
-import "golang.org/x/sys/unix"
+import (
+ "io"
+
+ "golang.org/x/sys/unix"
+)
const ioctlReadTermios = unix.TIOCGETA
type Termios unix.Termios
+
+func initTerminal(w io.Writer) {
+}
diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go
index 3de08e802..2403de981 100644
--- a/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go
+++ b/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go
@@ -1,4 +1,4 @@
-// +build appengine gopherjs
+// +build appengine
package logrus
diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_js.go b/vendor/github.com/sirupsen/logrus/terminal_check_js.go
new file mode 100644
index 000000000..0c209750a
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/terminal_check_js.go
@@ -0,0 +1,11 @@
+// +build js
+
+package logrus
+
+import (
+ "io"
+)
+
+func checkIfTerminal(w io.Writer) bool {
+ return false
+}
diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
index 067047a12..cf309d6fb 100644
--- a/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
+++ b/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
@@ -1,4 +1,4 @@
-// +build !appengine,!gopherjs
+// +build !appengine,!js,!windows
package logrus
diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_windows.go b/vendor/github.com/sirupsen/logrus/terminal_check_windows.go
new file mode 100644
index 000000000..3b9d2864c
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/terminal_check_windows.go
@@ -0,0 +1,20 @@
+// +build !appengine,!js,windows
+
+package logrus
+
+import (
+ "io"
+ "os"
+ "syscall"
+)
+
+func checkIfTerminal(w io.Writer) bool {
+ switch v := w.(type) {
+ case *os.File:
+ var mode uint32
+ err := syscall.GetConsoleMode(syscall.Handle(v.Fd()), &mode)
+ return err == nil
+ default:
+ return false
+ }
+}
diff --git a/vendor/github.com/sirupsen/logrus/terminal_linux.go b/vendor/github.com/sirupsen/logrus/terminal_linux.go
index f29a0097c..18066f08a 100644
--- a/vendor/github.com/sirupsen/logrus/terminal_linux.go
+++ b/vendor/github.com/sirupsen/logrus/terminal_linux.go
@@ -3,12 +3,19 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !appengine,!gopherjs
+// +build !appengine,!js
package logrus
-import "golang.org/x/sys/unix"
+import (
+ "io"
+
+ "golang.org/x/sys/unix"
+)
const ioctlReadTermios = unix.TCGETS
type Termios unix.Termios
+
+func initTerminal(w io.Writer) {
+}
diff --git a/vendor/github.com/sirupsen/logrus/terminal_windows.go b/vendor/github.com/sirupsen/logrus/terminal_windows.go
new file mode 100644
index 000000000..b4ef5286c
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/terminal_windows.go
@@ -0,0 +1,18 @@
+// +build !appengine,!js,windows
+
+package logrus
+
+import (
+ "io"
+ "os"
+ "syscall"
+
+ sequences "github.com/konsorten/go-windows-terminal-sequences"
+)
+
+func initTerminal(w io.Writer) {
+ switch v := w.(type) {
+ case *os.File:
+ sequences.EnableVirtualTerminalProcessing(syscall.Handle(v.Fd()), true)
+ }
+}
diff --git a/vendor/github.com/sirupsen/logrus/text_formatter.go b/vendor/github.com/sirupsen/logrus/text_formatter.go
index 3e5504030..67fb686c6 100644
--- a/vendor/github.com/sirupsen/logrus/text_formatter.go
+++ b/vendor/github.com/sirupsen/logrus/text_formatter.go
@@ -3,6 +3,7 @@ package logrus
import (
"bytes"
"fmt"
+ "os"
"sort"
"strings"
"sync"
@@ -35,6 +36,9 @@ type TextFormatter struct {
// Force disabling colors.
DisableColors bool
+ // Override coloring based on CLICOLOR and CLICOLOR_FORCE. - https://bixense.com/clicolors/
+ EnvironmentOverrideColors bool
+
// Disable timestamp logging. useful when output is redirected to logging
// system that already adds timestamps.
DisableTimestamp bool
@@ -51,6 +55,9 @@ type TextFormatter struct {
// be desired.
DisableSorting bool
+ // The keys sorting function, when uninitialized it uses sort.Strings.
+ SortingFunc func([]string)
+
// Disables the truncation of the level text to 4 characters.
DisableLevelTruncation bool
@@ -69,13 +76,33 @@ type TextFormatter struct {
// FieldKeyMsg: "@message"}}
FieldMap FieldMap
- sync.Once
+ terminalInitOnce sync.Once
}
func (f *TextFormatter) init(entry *Entry) {
if entry.Logger != nil {
f.isTerminal = checkIfTerminal(entry.Logger.Out)
+
+ if f.isTerminal {
+ initTerminal(entry.Logger.Out)
+ }
+ }
+}
+
+func (f *TextFormatter) isColored() bool {
+ isColored := f.ForceColors || f.isTerminal
+
+ if f.EnvironmentOverrideColors {
+ if force, ok := os.LookupEnv("CLICOLOR_FORCE"); ok && force != "0" {
+ isColored = true
+ } else if ok && force == "0" {
+ isColored = false
+ } else if os.Getenv("CLICOLOR") == "0" {
+ isColored = false
+ }
}
+
+ return isColored && !f.DisableColors
}
// Format renders a single log entry
@@ -87,8 +114,29 @@ func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
keys = append(keys, k)
}
+ fixedKeys := make([]string, 0, 3+len(entry.Data))
+ if !f.DisableTimestamp {
+ fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyTime))
+ }
+ fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyLevel))
+ if entry.Message != "" {
+ fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyMsg))
+ }
+
if !f.DisableSorting {
- sort.Strings(keys)
+ if f.SortingFunc == nil {
+ sort.Strings(keys)
+ fixedKeys = append(fixedKeys, keys...)
+ } else {
+ if !f.isColored() {
+ fixedKeys = append(fixedKeys, keys...)
+ f.SortingFunc(fixedKeys)
+ } else {
+ f.SortingFunc(keys)
+ }
+ }
+ } else {
+ fixedKeys = append(fixedKeys, keys...)
}
var b *bytes.Buffer
@@ -98,26 +146,28 @@ func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
b = &bytes.Buffer{}
}
- f.Do(func() { f.init(entry) })
-
- isColored := (f.ForceColors || f.isTerminal) && !f.DisableColors
+ f.terminalInitOnce.Do(func() { f.init(entry) })
timestampFormat := f.TimestampFormat
if timestampFormat == "" {
timestampFormat = defaultTimestampFormat
}
- if isColored {
+ if f.isColored() {
f.printColored(b, entry, keys, timestampFormat)
} else {
- if !f.DisableTimestamp {
- f.appendKeyValue(b, f.FieldMap.resolve(FieldKeyTime), entry.Time.Format(timestampFormat))
- }
- f.appendKeyValue(b, f.FieldMap.resolve(FieldKeyLevel), entry.Level.String())
- if entry.Message != "" {
- f.appendKeyValue(b, f.FieldMap.resolve(FieldKeyMsg), entry.Message)
- }
- for _, key := range keys {
- f.appendKeyValue(b, key, entry.Data[key])
+ for _, key := range fixedKeys {
+ var value interface{}
+ switch key {
+ case f.FieldMap.resolve(FieldKeyTime):
+ value = entry.Time.Format(timestampFormat)
+ case f.FieldMap.resolve(FieldKeyLevel):
+ value = entry.Level.String()
+ case f.FieldMap.resolve(FieldKeyMsg):
+ value = entry.Message
+ default:
+ value = entry.Data[key]
+ }
+ f.appendKeyValue(b, key, value)
}
}
@@ -143,6 +193,10 @@ func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []strin
levelText = levelText[0:4]
}
+ // Remove a single newline if it already exists in the message to keep
+ // the behavior of logrus text_formatter the same as the stdlib log package
+ entry.Message = strings.TrimSuffix(entry.Message, "\n")
+
if f.DisableTimestamp {
fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m %-44s ", levelColor, levelText, entry.Message)
} else if !f.FullTimestamp {
diff --git a/vendor/github.com/spf13/afero/go.mod b/vendor/github.com/spf13/afero/go.mod
new file mode 100644
index 000000000..9eff4fed5
--- /dev/null
+++ b/vendor/github.com/spf13/afero/go.mod
@@ -0,0 +1 @@
+module github.com/spf13/afero
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_agpl.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_agpl.go
deleted file mode 100644
index bc22e9732..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/license_agpl.go
+++ /dev/null
@@ -1,683 +0,0 @@
-package cmd
-
-func initAgpl() {
- Licenses["agpl"] = License{
- Name: "GNU Affero General Public License",
- PossibleMatches: []string{"agpl", "affero gpl", "gnu agpl"},
- Header: `
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.`,
- Text: ` GNU AFFERO GENERAL PUBLIC LICENSE
- Version 3, 19 November 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU Affero General Public License is a free, copyleft license for
-software and other kinds of works, specifically designed to ensure
-cooperation with the community in the case of network server software.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-our General Public Licenses are intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- Developers that use our General Public Licenses protect your rights
-with two steps: (1) assert copyright on the software, and (2) offer
-you this License which gives you legal permission to copy, distribute
-and/or modify the software.
-
- A secondary benefit of defending all users' freedom is that
-improvements made in alternate versions of the program, if they
-receive widespread use, become available for other developers to
-incorporate. Many developers of free software are heartened and
-encouraged by the resulting cooperation. However, in the case of
-software used on network servers, this result may fail to come about.
-The GNU General Public License permits making a modified version and
-letting the public access it on a server without ever releasing its
-source code to the public.
-
- The GNU Affero General Public License is designed specifically to
-ensure that, in such cases, the modified source code becomes available
-to the community. It requires the operator of a network server to
-provide the source code of the modified version running there to the
-users of that server. Therefore, public use of a modified version, on
-a publicly accessible server, gives the public access to the source
-code of the modified version.
-
- An older license, called the Affero General Public License and
-published by Affero, was designed to accomplish similar goals. This is
-a different license, not a version of the Affero GPL, but Affero has
-released a new version of the Affero GPL which permits relicensing under
-this license.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU Affero General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Remote Network Interaction; Use with the GNU General Public License.
-
- Notwithstanding any other provision of this License, if you modify the
-Program, your modified version must prominently offer all users
-interacting with it remotely through a computer network (if your version
-supports such interaction) an opportunity to receive the Corresponding
-Source of your version by providing access to the Corresponding Source
-from a network server at no charge, through some standard or customary
-means of facilitating copying of software. This Corresponding Source
-shall include the Corresponding Source for any work covered by version 3
-of the GNU General Public License that is incorporated pursuant to the
-following paragraph.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the work with which it is combined will remain governed by version
-3 of the GNU General Public License.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU Affero General Public License from time to time. Such new versions
-will be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU Affero General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU Affero General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU Affero General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If your software can interact with users remotely through a computer
-network, you should also make sure that it provides a way for users to
-get its source. For example, if your program is a web application, its
-interface could display a "Source" link that leads users to an archive
-of the code. There are many ways you could offer source, and different
-solutions will be better for different programs; see section 13 for the
-specific requirements.
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU AGPL, see
-<http://www.gnu.org/licenses/>.
-`,
- }
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_apache_2.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_apache_2.go
deleted file mode 100644
index 38393d541..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/license_apache_2.go
+++ /dev/null
@@ -1,238 +0,0 @@
-// Copyright © 2015 Steve Francia <spf@spf13.com>.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Parts inspired by https://github.com/ryanuber/go-license
-
-package cmd
-
-func initApache2() {
- Licenses["apache"] = License{
- Name: "Apache 2.0",
- PossibleMatches: []string{"apache", "apache20", "apache 2.0", "apache2.0", "apache-2.0"},
- Header: `
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.`,
- Text: `
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-`,
- }
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_2.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_2.go
deleted file mode 100644
index 4a847e04a..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_2.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright © 2015 Steve Francia <spf@spf13.com>.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Parts inspired by https://github.com/ryanuber/go-license
-
-package cmd
-
-func initBsdClause2() {
- Licenses["freebsd"] = License{
- Name: "Simplified BSD License",
- PossibleMatches: []string{"freebsd", "simpbsd", "simple bsd", "2-clause bsd",
- "2 clause bsd", "simplified bsd license"},
- Header: `All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.`,
- Text: `{{ .copyright }}
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-`,
- }
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_3.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_3.go
deleted file mode 100644
index c7476b31f..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_3.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright © 2015 Steve Francia <spf@spf13.com>.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Parts inspired by https://github.com/ryanuber/go-license
-
-package cmd
-
-func initBsdClause3() {
- Licenses["bsd"] = License{
- Name: "NewBSD",
- PossibleMatches: []string{"bsd", "newbsd", "3 clause bsd", "3-clause bsd"},
- Header: `All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holder nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.`,
- Text: `{{ .copyright }}
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holder nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-`,
- }
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_2.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_2.go
deleted file mode 100644
index 03e05b3a7..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_2.go
+++ /dev/null
@@ -1,376 +0,0 @@
-// Copyright © 2015 Steve Francia <spf@spf13.com>.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Parts inspired by https://github.com/ryanuber/go-license
-
-package cmd
-
-func initGpl2() {
- Licenses["gpl2"] = License{
- Name: "GNU General Public License 2.0",
- PossibleMatches: []string{"gpl2", "gnu gpl2", "gplv2"},
- Header: `
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.`,
- Text: ` GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type 'show c' for details.
-
-The hypothetical commands 'show w' and 'show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than 'show w' and 'show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- 'Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
-`,
- }
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_3.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_3.go
deleted file mode 100644
index ce07679c7..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_3.go
+++ /dev/null
@@ -1,711 +0,0 @@
-// Copyright © 2015 Steve Francia <spf@spf13.com>.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Parts inspired by https://github.com/ryanuber/go-license
-
-package cmd
-
-func initGpl3() {
- Licenses["gpl3"] = License{
- Name: "GNU General Public License 3.0",
- PossibleMatches: []string{"gpl3", "gplv3", "gpl", "gnu gpl3", "gnu gpl"},
- Header: `
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.`,
- Text: ` GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type 'show c' for details.
-
-The hypothetical commands 'show w' and 'show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
-`,
- }
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_lgpl.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_lgpl.go
deleted file mode 100644
index 0f8b96cad..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/license_lgpl.go
+++ /dev/null
@@ -1,186 +0,0 @@
-package cmd
-
-func initLgpl() {
- Licenses["lgpl"] = License{
- Name: "GNU Lesser General Public License",
- PossibleMatches: []string{"lgpl", "lesser gpl", "gnu lgpl"},
- Header: `
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.`,
- Text: ` GNU LESSER GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
- 0. Additional Definitions.
-
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.`,
- }
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/license_mit.go b/vendor/github.com/spf13/cobra/cobra/cmd/license_mit.go
deleted file mode 100644
index bd2d0c4fa..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/license_mit.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright © 2015 Steve Francia <spf@spf13.com>.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Parts inspired by https://github.com/ryanuber/go-license
-
-package cmd
-
-func initMit() {
- Licenses["mit"] = License{
- Name: "MIT License",
- PossibleMatches: []string{"mit"},
- Header: `
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.`,
- Text: `The MIT License (MIT)
-
-{{ .copyright }}
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-`,
- }
-}
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/licenses.go b/vendor/github.com/spf13/cobra/cobra/cmd/licenses.go
deleted file mode 100644
index a070134dd..000000000
--- a/vendor/github.com/spf13/cobra/cobra/cmd/licenses.go
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright © 2015 Steve Francia <spf@spf13.com>.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Parts inspired by https://github.com/ryanuber/go-license
-
-package cmd
-
-import (
- "strings"
- "time"
-
- "github.com/spf13/viper"
-)
-
-// Licenses contains all possible licenses a user can choose from.
-var Licenses = make(map[string]License)
-
-// License represents a software license agreement, containing the Name of
-// the license, its possible matches (on the command line as given to cobra),
-// the header to be used with each file on the file's creating, and the text
-// of the license
-type License struct {
- Name string // The type of license in use
- PossibleMatches []string // Similar names to guess
- Text string // License text data
- Header string // License header for source files
-}
-
-func init() {
- // Allows a user to not use a license.
- Licenses["none"] = License{"None", []string{"none", "false"}, "", ""}
-
- initApache2()
- initMit()
- initBsdClause3()
- initBsdClause2()
- initGpl2()
- initGpl3()
- initLgpl()
- initAgpl()
-}
-
-// getLicense returns license specified by user in flag or in config.
-// If user didn't specify the license, it returns Apache License 2.0.
-//
-// TODO: Inspect project for existing license
-func getLicense() License {
- // If explicitly flagged, use that.
- if userLicense != "" {
- return findLicense(userLicense)
- }
-
- // If user wants to have custom license, use that.
- if viper.IsSet("license.header") || viper.IsSet("license.text") {
- return License{Header: viper.GetString("license.header"),
- Text: viper.GetString("license.text")}
- }
-
- // If user wants to have built-in license, use that.
- if viper.IsSet("license") {
- return findLicense(viper.GetString("license"))
- }
-
- // If user didn't set any license, use Apache 2.0 by default.
- return Licenses["apache"]
-}
-
-func copyrightLine() string {
- author := viper.GetString("author")
-
- year := viper.GetString("year") // For tests.
- if year == "" {
- year = time.Now().Format("2006")
- }
-
- return "Copyright © " + year + " " + author
-}
-
-// findLicense looks for License object of built-in licenses.
-// If it didn't find license, then the app will be terminated and
-// error will be printed.
-func findLicense(name string) License {
- found := matchLicense(name)
- if found == "" {
- er("unknown license: " + name)
- }
- return Licenses[found]
-}
-
-// matchLicense compares the given a license name
-// to PossibleMatches of all built-in licenses.
-// It returns blank string, if name is blank string or it didn't find
-// then appropriate match to name.
-func matchLicense(name string) string {
- if name == "" {
- return ""
- }
-
- for key, lic := range Licenses {
- for _, match := range lic.PossibleMatches {
- if strings.EqualFold(name, match) {
- return key
- }
- }
- }
-
- return ""
-}
diff --git a/vendor/github.com/spf13/jwalterweatherman/go.mod b/vendor/github.com/spf13/jwalterweatherman/go.mod
new file mode 100644
index 000000000..bce549c04
--- /dev/null
+++ b/vendor/github.com/spf13/jwalterweatherman/go.mod
@@ -0,0 +1 @@
+module github.com/spf13/jwalterweatherman
diff --git a/vendor/golang.org/x/image/font/font.go b/vendor/golang.org/x/image/font/font.go
index 05f4357c7..4d9d63c24 100644
--- a/vendor/golang.org/x/image/font/font.go
+++ b/vendor/golang.org/x/image/font/font.go
@@ -86,6 +86,18 @@ type Metrics struct {
// value is typically positive, even though a descender goes below the
// baseline.
Descent fixed.Int26_6
+
+ // XHeight is the distance from the top of non-ascending lowercase letters
+ // to the baseline.
+ XHeight fixed.Int26_6
+
+ // CapHeight is the distance from the top of uppercase letters to the
+ // baseline.
+ CapHeight fixed.Int26_6
+
+ // CaretSlope is the slope of a caret as a vector with the Y axis pointing up.
+ // The slope {0, 1} is the vertical caret.
+ CaretSlope image.Point
}
// Drawer draws text on a destination image.
diff --git a/vendor/golang.org/x/net/html/const.go b/vendor/golang.org/x/net/html/const.go
index 5eb7c5a8f..a3a918f0b 100644
--- a/vendor/golang.org/x/net/html/const.go
+++ b/vendor/golang.org/x/net/html/const.go
@@ -97,8 +97,16 @@ func isSpecialElement(element *Node) bool {
switch element.Namespace {
case "", "html":
return isSpecialElementMap[element.Data]
+ case "math":
+ switch element.Data {
+ case "mi", "mo", "mn", "ms", "mtext", "annotation-xml":
+ return true
+ }
case "svg":
- return element.Data == "foreignObject"
+ switch element.Data {
+ case "foreignObject", "desc", "title":
+ return true
+ }
}
return false
}
diff --git a/vendor/golang.org/x/net/html/parse.go b/vendor/golang.org/x/net/html/parse.go
index bbe01164e..9889c09be 100644
--- a/vendor/golang.org/x/net/html/parse.go
+++ b/vendor/golang.org/x/net/html/parse.go
@@ -255,7 +255,7 @@ func (p *parser) fosterParent(n *Node) {
}
}
- if template != nil && (table == nil || j < i) {
+ if template != nil && (table == nil || j > i) {
template.AppendChild(n)
return
}
@@ -470,6 +470,10 @@ func (p *parser) resetInsertionMode() {
case a.Table:
p.im = inTableIM
case a.Template:
+ // TODO: remove this divergence from the HTML5 spec.
+ if n.Namespace != "" {
+ continue
+ }
p.im = p.templateStack.top()
case a.Head:
// TODO: remove this divergence from the HTML5 spec.
@@ -984,6 +988,14 @@ func inBodyIM(p *parser) bool {
p.acknowledgeSelfClosingTag()
p.popUntil(buttonScope, a.P)
p.parseImpliedToken(StartTagToken, a.Form, a.Form.String())
+ if p.form == nil {
+ // NOTE: The 'isindex' element has been removed,
+ // and the 'template' element has not been designed to be
+ // collaborative with the index element.
+ //
+ // Ignore the token.
+ return true
+ }
if action != "" {
p.form.Attr = []Attribute{{Key: "action", Val: action}}
}
@@ -2209,6 +2221,15 @@ func (p *parser) parse() error {
}
// Parse returns the parse tree for the HTML from the given Reader.
+//
+// It implements the HTML5 parsing algorithm
+// (https://html.spec.whatwg.org/multipage/syntax.html#tree-construction),
+// which is very complicated. The resultant tree can contain implicitly created
+// nodes that have no explicit <tag> listed in r's data, and nodes' parents can
+// differ from the nesting implied by a naive processing of start and end
+// <tag>s. Conversely, explicit <tag>s in r's data can be silently dropped,
+// with no corresponding node in the resulting tree.
+//
// The input is assumed to be UTF-8 encoded.
func Parse(r io.Reader) (*Node, error) {
p := &parser{
@@ -2230,6 +2251,8 @@ func Parse(r io.Reader) (*Node, error) {
// ParseFragment parses a fragment of HTML and returns the nodes that were
// found. If the fragment is the InnerHTML for an existing element, pass that
// element in context.
+//
+// It has the same intricacies as Parse.
func ParseFragment(r io.Reader, context *Node) ([]*Node, error) {
contextTag := ""
if context != nil {
diff --git a/vendor/golang.org/x/net/http2/write.go b/vendor/golang.org/x/net/http2/write.go
index 8a9711f6e..fae5c8adc 100644
--- a/vendor/golang.org/x/net/http2/write.go
+++ b/vendor/golang.org/x/net/http2/write.go
@@ -199,7 +199,7 @@ func (w *writeResHeaders) staysWithinBuffer(max int) bool {
// TODO: this is a common one. It'd be nice to return true
// here and get into the fast path if we could be clever and
// calculate the size fast enough, or at least a conservative
- // uppper bound that usually fires. (Maybe if w.h and
+ // upper bound that usually fires. (Maybe if w.h and
// w.trailers are nil, so we don't need to enumerate it.)
// Otherwise I'm afraid that just calculating the length to
// answer this question would be slower than the ~2µs benefit.
diff --git a/vendor/golang.org/x/sys/unix/aliases.go b/vendor/golang.org/x/sys/unix/aliases.go
index d87a681bb..951fce4d0 100644
--- a/vendor/golang.org/x/sys/unix/aliases.go
+++ b/vendor/golang.org/x/sys/unix/aliases.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
// +build go1.9
package unix
diff --git a/vendor/golang.org/x/sys/unix/constants.go b/vendor/golang.org/x/sys/unix/constants.go
index a96f0ebc2..3a6ac648d 100644
--- a/vendor/golang.org/x/sys/unix/constants.go
+++ b/vendor/golang.org/x/sys/unix/constants.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
diff --git a/vendor/golang.org/x/sys/unix/dev_aix_ppc.go b/vendor/golang.org/x/sys/unix/dev_aix_ppc.go
new file mode 100644
index 000000000..5e5fb4510
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/dev_aix_ppc.go
@@ -0,0 +1,27 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build aix
+// +build ppc
+
+// Functions to access/create device major and minor numbers matching the
+// encoding used by AIX.
+
+package unix
+
+// Major returns the major component of a Linux device number.
+func Major(dev uint64) uint32 {
+ return uint32((dev >> 16) & 0xffff)
+}
+
+// Minor returns the minor component of a Linux device number.
+func Minor(dev uint64) uint32 {
+ return uint32(dev & 0xffff)
+}
+
+// Mkdev returns a Linux device number generated from the given major and minor
+// components.
+func Mkdev(major, minor uint32) uint64 {
+ return uint64(((major) << 16) | (minor))
+}
diff --git a/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go b/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
new file mode 100644
index 000000000..8b401244c
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
@@ -0,0 +1,29 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build aix
+// +build ppc64
+
+// Functions to access/create device major and minor numbers matching the
+// encoding used AIX.
+
+package unix
+
+// Major returns the major component of a Linux device number.
+func Major(dev uint64) uint32 {
+ return uint32((dev & 0x3fffffff00000000) >> 32)
+}
+
+// Minor returns the minor component of a Linux device number.
+func Minor(dev uint64) uint32 {
+ return uint32((dev & 0x00000000ffffffff) >> 0)
+}
+
+// Mkdev returns a Linux device number generated from the given major and minor
+// components.
+func Mkdev(major, minor uint32) uint64 {
+ var DEVNO64 uint64
+ DEVNO64 = 0x8000000000000000
+ return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64)
+}
diff --git a/vendor/golang.org/x/sys/unix/dirent.go b/vendor/golang.org/x/sys/unix/dirent.go
index 95fd35317..4407c505a 100644
--- a/vendor/golang.org/x/sys/unix/dirent.go
+++ b/vendor/golang.org/x/sys/unix/dirent.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
package unix
diff --git a/vendor/golang.org/x/sys/unix/env_unix.go b/vendor/golang.org/x/sys/unix/env_unix.go
index 706b3cd1d..84178b0a1 100644
--- a/vendor/golang.org/x/sys/unix/env_unix.go
+++ b/vendor/golang.org/x/sys/unix/env_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
// Unix environment variables.
diff --git a/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/golang.org/x/sys/unix/gccgo.go
index 50062e3c7..cd6f5a613 100644
--- a/vendor/golang.org/x/sys/unix/gccgo.go
+++ b/vendor/golang.org/x/sys/unix/gccgo.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.
// +build gccgo
+// +build !aix
package unix
diff --git a/vendor/golang.org/x/sys/unix/gccgo_c.c b/vendor/golang.org/x/sys/unix/gccgo_c.c
index 46523ced6..c44730c5e 100644
--- a/vendor/golang.org/x/sys/unix/gccgo_c.c
+++ b/vendor/golang.org/x/sys/unix/gccgo_c.c
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.
// +build gccgo
+// +build !aix
#include <errno.h>
#include <stdint.h>
diff --git a/vendor/golang.org/x/sys/unix/ioctl.go b/vendor/golang.org/x/sys/unix/ioctl.go
index 8c9aaeb27..f121a8d64 100644
--- a/vendor/golang.org/x/sys/unix/ioctl.go
+++ b/vendor/golang.org/x/sys/unix/ioctl.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh
index 1715122bd..edb176f16 100755
--- a/vendor/golang.org/x/sys/unix/mkall.sh
+++ b/vendor/golang.org/x/sys/unix/mkall.sh
@@ -59,6 +59,16 @@ _* | *_ | _)
echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
exit 1
;;
+aix_ppc)
+ mkerrors="$mkerrors -maix32"
+ mksyscall="perl mksyscall_aix.pl -aix"
+ mktypes="GOARCH=$GOARCH go tool cgo -godefs"
+ ;;
+aix_ppc64)
+ mkerrors="$mkerrors -maix64"
+ mksyscall="perl mksyscall_aix.pl -aix"
+ mktypes="GOARCH=$GOARCH go tool cgo -godefs"
+ ;;
darwin_386)
mkerrors="$mkerrors -m32"
mksyscall="./mksyscall.pl -l32"
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index 45ebc985e..ec8e61322 100755
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -25,7 +25,11 @@ if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
fi
fi
-CC=${CC:-cc}
+if [[ "$GOOS" = "aix" ]]; then
+ CC=${CC:-gcc}
+else
+ CC=${CC:-cc}
+fi
if [[ "$GOOS" = "solaris" ]]; then
# Assumes GNU versions of utilities in PATH.
@@ -34,6 +38,21 @@ fi
uname=$(uname)
+includes_AIX='
+#include <net/if.h>
+#include <net/netopt.h>
+#include <netinet/ip_mroute.h>
+#include <sys/protosw.h>
+#include <sys/stropts.h>
+#include <sys/mman.h>
+#include <sys/poll.h>
+#include <sys/termio.h>
+#include <termios.h>
+#include <fcntl.h>
+
+#define AF_LOCAL AF_UNIX
+'
+
includes_Darwin='
#define _DARWIN_C_SOURCE
#define KERNEL
@@ -68,6 +87,7 @@ includes_DragonFly='
#include <sys/stat.h>
#include <sys/sysctl.h>
#include <sys/mman.h>
+#include <sys/mount.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
#include <net/bpf.h>
@@ -175,6 +195,7 @@ struct ltchars {
#include <linux/fs.h>
#include <linux/keyctl.h>
#include <linux/magic.h>
+#include <linux/memfd.h>
#include <linux/netfilter/nfnetlink.h>
#include <linux/netlink.h>
#include <linux/net_namespace.h>
@@ -196,6 +217,7 @@ struct ltchars {
#include <linux/watchdog.h>
#include <linux/hdreg.h>
#include <linux/rtc.h>
+#include <linux/if_xdp.h>
#include <mtd/ubi-user.h>
#include <net/route.h>
#include <asm/termbits.h>
@@ -226,6 +248,16 @@ struct ltchars {
#define FS_KEY_DESC_PREFIX "fscrypt:"
#define FS_KEY_DESC_PREFIX_SIZE 8
#define FS_MAX_KEY_SIZE 64
+
+// XDP socket constants do not appear to be picked up otherwise.
+// Copied from samples/bpf/xdpsock_user.c.
+#ifndef SOL_XDP
+#define SOL_XDP 283
+#endif
+
+#ifndef AF_XDP
+#define AF_XDP 44
+#endif
'
includes_NetBSD='
@@ -234,6 +266,7 @@ includes_NetBSD='
#include <sys/event.h>
#include <sys/extattr.h>
#include <sys/mman.h>
+#include <sys/mount.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/sysctl.h>
@@ -259,6 +292,7 @@ includes_OpenBSD='
#include <sys/param.h>
#include <sys/event.h>
#include <sys/mman.h>
+#include <sys/mount.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/stat.h>
@@ -360,6 +394,7 @@ ccflags="$@"
$2 ~ /^EXTATTR_NAMESPACE_NAMES/ ||
$2 ~ /^EXTATTR_NAMESPACE_[A-Z]+_STRING/ {next}
+ $2 !~ /^ECCAPBITS/ &&
$2 !~ /^ETH_/ &&
$2 !~ /^EPROC_/ &&
$2 !~ /^EQUIV_/ &&
@@ -395,7 +430,7 @@ ccflags="$@"
$2 ~ /^TC[IO](ON|OFF)$/ ||
$2 ~ /^IN_/ ||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
- $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|T?PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
+ $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
$2 ~ /^TP_STATUS_/ ||
$2 ~ /^FALLOC_/ ||
$2 == "ICMPV6_FILTER" ||
@@ -406,6 +441,7 @@ ccflags="$@"
$2 ~ /^KERN_(HOSTNAME|OS(RELEASE|TYPE)|VERSION)$/ ||
$2 ~ /^HW_MACHINE$/ ||
$2 ~ /^SYSCTL_VERS/ ||
+ $2 !~ "MNT_BITS" &&
$2 ~ /^(MS|MNT|UMOUNT)_/ ||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
$2 ~ /^(O|F|E?FD|NAME|S|PTRACE|PT)_/ ||
@@ -438,6 +474,7 @@ ccflags="$@"
$2 ~ /^PERF_EVENT_IOC_/ ||
$2 ~ /^SECCOMP_MODE_/ ||
$2 ~ /^SPLICE_/ ||
+ $2 ~ /^SYNC_FILE_RANGE_/ ||
$2 !~ /^AUDIT_RECORD_MAGIC/ &&
$2 !~ /IOC_MAGIC/ &&
$2 ~ /^[A-Z][A-Z0-9_]+_MAGIC2?$/ ||
@@ -455,6 +492,7 @@ ccflags="$@"
$2 ~ /^FSOPT_/ ||
$2 ~ /^WDIOC_/ ||
$2 ~ /^NFN/ ||
+ $2 ~ /^XDP_/ ||
$2 ~ /^(HDIO|WIN|SMART)_/ ||
$2 !~ "WMESGLEN" &&
$2 ~ /^W[A-Z0-9]+$/ ||
@@ -479,7 +517,7 @@ errors=$(
signals=$(
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
+ egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
sort
)
@@ -489,7 +527,7 @@ echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
sort >_error.grep
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
+ egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
sort >_signal.grep
echo '// mkerrors.sh' "$@"
diff --git a/vendor/golang.org/x/sys/unix/mksyscall_aix.pl b/vendor/golang.org/x/sys/unix/mksyscall_aix.pl
new file mode 100644
index 000000000..c9b3954ba
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/mksyscall_aix.pl
@@ -0,0 +1,385 @@
+#!/usr/bin/env perl
+# 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.
+
+# This program reads a file containing function prototypes
+# (like syscall_aix.go) and generates system call bodies.
+# The prototypes are marked by lines beginning with "//sys"
+# and read like func declarations if //sys is replaced by func, but:
+# * The parameter lists must give a name for each argument.
+# This includes return parameters.
+# * The parameter lists must give a type for each argument:
+# the (x, y, z int) shorthand is not allowed.
+# * If the return parameter is an error number, it must be named err.
+# * If go func name needs to be different than its libc name,
+# * or the function is not in libc, name could be specified
+# * at the end, after "=" sign, like
+# //sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
+
+use strict;
+
+my $cmdline = "mksyscall_aix.pl " . join(' ', @ARGV);
+my $errors = 0;
+my $_32bit = "";
+my $tags = ""; # build tags
+my $aix = 0;
+my $solaris = 0;
+
+binmode STDOUT;
+
+if($ARGV[0] eq "-b32") {
+ $_32bit = "big-endian";
+ shift;
+} elsif($ARGV[0] eq "-l32") {
+ $_32bit = "little-endian";
+ shift;
+}
+if($ARGV[0] eq "-aix") {
+ $aix = 1;
+ shift;
+}
+if($ARGV[0] eq "-tags") {
+ shift;
+ $tags = $ARGV[0];
+ shift;
+}
+
+if($ARGV[0] =~ /^-/) {
+ print STDERR "usage: mksyscall_aix.pl [-b32 | -l32] [-tags x,y] [file ...]\n";
+ exit 1;
+}
+
+sub parseparamlist($) {
+ my ($list) = @_;
+ $list =~ s/^\s*//;
+ $list =~ s/\s*$//;
+ if($list eq "") {
+ return ();
+ }
+ return split(/\s*,\s*/, $list);
+}
+
+sub parseparam($) {
+ my ($p) = @_;
+ if($p !~ /^(\S*) (\S*)$/) {
+ print STDERR "$ARGV:$.: malformed parameter: $p\n";
+ $errors = 1;
+ return ("xx", "int");
+ }
+ return ($1, $2);
+}
+
+my $package = "";
+my $text = "";
+my $c_extern = "/*\n#include <stdint.h>\n";
+my @vars = ();
+while(<>) {
+ chomp;
+ s/\s+/ /g;
+ s/^\s+//;
+ s/\s+$//;
+ $package = $1 if !$package && /^package (\S+)$/;
+ my $nonblock = /^\/\/sysnb /;
+ next if !/^\/\/sys / && !$nonblock;
+
+ # Line must be of the form
+ # func Open(path string, mode int, perm int) (fd int, err error)
+ # Split into name, in params, out params.
+ if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) {
+ print STDERR "$ARGV:$.: malformed //sys declaration\n";
+ $errors = 1;
+ next;
+ }
+ my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6);
+
+ # Split argument lists on comma.
+ my @in = parseparamlist($in);
+ my @out = parseparamlist($out);
+
+ $in = join(', ', @in);
+ $out = join(', ', @out);
+
+ # Try in vain to keep people from editing this file.
+ # The theory is that they jump into the middle of the file
+ # without reading the header.
+ $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
+
+ # Check if value return, err return available
+ my $errvar = "";
+ my $retvar = "";
+ my $rettype = "";
+ foreach my $p (@out) {
+ my ($name, $type) = parseparam($p);
+ if($type eq "error") {
+ $errvar = $name;
+ } else {
+ $retvar = $name;
+ $rettype = $type;
+ }
+ }
+
+ # System call name.
+ #if($func ne "fcntl") {
+
+ if($sysname eq "") {
+ $sysname = "$func";
+ }
+
+ $sysname =~ s/([a-z])([A-Z])/${1}_$2/g;
+ $sysname =~ y/A-Z/a-z/; # All libc functions are lowercase.
+
+ my $C_rettype = "";
+ if($rettype eq "unsafe.Pointer") {
+ $C_rettype = "uintptr_t";
+ } elsif($rettype eq "uintptr") {
+ $C_rettype = "uintptr_t";
+ } elsif($rettype =~ /^_/) {
+ $C_rettype = "uintptr_t";
+ } elsif($rettype eq "int") {
+ $C_rettype = "int";
+ } elsif($rettype eq "int32") {
+ $C_rettype = "int";
+ } elsif($rettype eq "int64") {
+ $C_rettype = "long long";
+ } elsif($rettype eq "uint32") {
+ $C_rettype = "unsigned int";
+ } elsif($rettype eq "uint64") {
+ $C_rettype = "unsigned long long";
+ } else {
+ $C_rettype = "int";
+ }
+ if($sysname eq "exit") {
+ $C_rettype = "void";
+ }
+
+ # Change types to c
+ my @c_in = ();
+ foreach my $p (@in) {
+ my ($name, $type) = parseparam($p);
+ if($type =~ /^\*/) {
+ push @c_in, "uintptr_t";
+ } elsif($type eq "string") {
+ push @c_in, "uintptr_t";
+ } elsif($type =~ /^\[\](.*)/) {
+ push @c_in, "uintptr_t", "size_t";
+ } elsif($type eq "unsafe.Pointer") {
+ push @c_in, "uintptr_t";
+ } elsif($type eq "uintptr") {
+ push @c_in, "uintptr_t";
+ } elsif($type =~ /^_/) {
+ push @c_in, "uintptr_t";
+ } elsif($type eq "int") {
+ push @c_in, "int";
+ } elsif($type eq "int32") {
+ push @c_in, "int";
+ } elsif($type eq "int64") {
+ push @c_in, "long long";
+ } elsif($type eq "uint32") {
+ push @c_in, "unsigned int";
+ } elsif($type eq "uint64") {
+ push @c_in, "unsigned long long";
+ } else {
+ push @c_in, "int";
+ }
+ }
+
+ if ($func ne "fcntl" && $func ne "FcntlInt" && $func ne "readlen" && $func ne "writelen") {
+ # Imports of system calls from libc
+ $c_extern .= "$C_rettype $sysname";
+ my $c_in = join(', ', @c_in);
+ $c_extern .= "($c_in);\n";
+ }
+
+ # So file name.
+ if($aix) {
+ if($modname eq "") {
+ $modname = "libc.a/shr_64.o";
+ } else {
+ print STDERR "$func: only syscall using libc are available\n";
+ $errors = 1;
+ next;
+ }
+ }
+
+ my $strconvfunc = "C.CString";
+ my $strconvtype = "*byte";
+
+ # Go function header.
+ if($out ne "") {
+ $out = " ($out)";
+ }
+ if($text ne "") {
+ $text .= "\n"
+ }
+
+ $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out ;
+
+ # Prepare arguments to call.
+ my @args = ();
+ my $n = 0;
+ my $arg_n = 0;
+ foreach my $p (@in) {
+ my ($name, $type) = parseparam($p);
+ if($type =~ /^\*/) {
+ push @args, "C.uintptr_t(uintptr(unsafe.Pointer($name)))";
+ } elsif($type eq "string" && $errvar ne "") {
+ $text .= "\t_p$n := uintptr(unsafe.Pointer($strconvfunc($name)))\n";
+ push @args, "C.uintptr_t(_p$n)";
+ $n++;
+ } elsif($type eq "string") {
+ print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
+ $text .= "\t_p$n := uintptr(unsafe.Pointer($strconvfunc($name)))\n";
+ push @args, "C.uintptr_t(_p$n)";
+ $n++;
+ } elsif($type =~ /^\[\](.*)/) {
+ # Convert slice into pointer, length.
+ # Have to be careful not to take address of &a[0] if len == 0:
+ # pass nil in that case.
+ $text .= "\tvar _p$n *$1\n";
+ $text .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n";
+ push @args, "C.uintptr_t(uintptr(unsafe.Pointer(_p$n)))";
+ $n++;
+ $text .= "\tvar _p$n int\n";
+ $text .= "\t_p$n = len($name)\n";
+ push @args, "C.size_t(_p$n)";
+ $n++;
+ } elsif($type eq "int64" && $_32bit ne "") {
+ if($_32bit eq "big-endian") {
+ push @args, "uintptr($name >> 32)", "uintptr($name)";
+ } else {
+ push @args, "uintptr($name)", "uintptr($name >> 32)";
+ }
+ $n++;
+ } elsif($type eq "bool") {
+ $text .= "\tvar _p$n uint32\n";
+ $text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n";
+ push @args, "_p$n";
+ $n++;
+ } elsif($type =~ /^_/) {
+ push @args, "C.uintptr_t(uintptr($name))";
+ } elsif($type eq "unsafe.Pointer") {
+ push @args, "C.uintptr_t(uintptr($name))";
+ } elsif($type eq "int") {
+ if (($arg_n == 2) && (($func eq "readlen") || ($func eq "writelen"))) {
+ push @args, "C.size_t($name)";
+ } elsif ($arg_n == 0 && $func eq "fcntl") {
+ push @args, "C.uintptr_t($name)";
+ } elsif (($arg_n == 2) && (($func eq "fcntl") || ($func eq "FcntlInt"))) {
+ push @args, "C.uintptr_t($name)";
+ } else {
+ push @args, "C.int($name)";
+ }
+ } elsif($type eq "int32") {
+ push @args, "C.int($name)";
+ } elsif($type eq "int64") {
+ push @args, "C.longlong($name)";
+ } elsif($type eq "uint32") {
+ push @args, "C.uint($name)";
+ } elsif($type eq "uint64") {
+ push @args, "C.ulonglong($name)";
+ } elsif($type eq "uintptr") {
+ push @args, "C.uintptr_t($name)";
+ } else {
+ push @args, "C.int($name)";
+ }
+ $arg_n++;
+ }
+ my $nargs = @args;
+
+
+ # Determine which form to use; pad args with zeros.
+ if ($nonblock) {
+ }
+
+ my $args = join(', ', @args);
+ my $call = "";
+ if ($sysname eq "exit") {
+ if ($errvar ne "") {
+ $call .= "er :=";
+ } else {
+ $call .= "";
+ }
+ } elsif ($errvar ne "") {
+ $call .= "r0,er :=";
+ } elsif ($retvar ne "") {
+ $call .= "r0,_ :=";
+ } else {
+ $call .= ""
+ }
+ $call .= "C.$sysname($args)";
+
+ # Assign return values.
+ my $body = "";
+ my $failexpr = "";
+
+ for(my $i=0; $i<@out; $i++) {
+ my $p = $out[$i];
+ my ($name, $type) = parseparam($p);
+ my $reg = "";
+ if($name eq "err") {
+ $reg = "e1";
+ } else {
+ $reg = "r0";
+ }
+ if($reg ne "e1" ) {
+ $body .= "\t$name = $type($reg)\n";
+ }
+ }
+
+ # verify return
+ if ($sysname ne "exit" && $errvar ne "") {
+ if ($C_rettype =~ /^uintptr/) {
+ $body .= "\tif \(uintptr\(r0\) ==\^uintptr\(0\) && er != nil\) {\n";
+ $body .= "\t\t$errvar = er\n";
+ $body .= "\t}\n";
+ } else {
+ $body .= "\tif \(r0 ==-1 && er != nil\) {\n";
+ $body .= "\t\t$errvar = er\n";
+ $body .= "\t}\n";
+ }
+ } elsif ($errvar ne "") {
+ $body .= "\tif \(er != nil\) {\n";
+ $body .= "\t\t$errvar = er\n";
+ $body .= "\t}\n";
+ }
+
+ $text .= "\t$call\n";
+ $text .= $body;
+
+ $text .= "\treturn\n";
+ $text .= "}\n";
+}
+
+if($errors) {
+ exit 1;
+}
+
+print <<EOF;
+// $cmdline
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build $tags
+
+package $package
+
+
+$c_extern
+*/
+import "C"
+import (
+ "unsafe"
+ "syscall"
+)
+
+
+EOF
+
+print "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
+
+chomp($_=<<EOF);
+
+$text
+EOF
+print $_;
+exit 0;
diff --git a/vendor/golang.org/x/sys/unix/pagesize_unix.go b/vendor/golang.org/x/sys/unix/pagesize_unix.go
index 83c85e019..bc2f3629a 100644
--- a/vendor/golang.org/x/sys/unix/pagesize_unix.go
+++ b/vendor/golang.org/x/sys/unix/pagesize_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
// For Unix, get the pagesize from the runtime.
diff --git a/vendor/golang.org/x/sys/unix/race0.go b/vendor/golang.org/x/sys/unix/race0.go
index dd0820431..ad026678c 100644
--- a/vendor/golang.org/x/sys/unix/race0.go
+++ b/vendor/golang.org/x/sys/unix/race0.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
+// +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
package unix
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
index bb756ece1..f153c0673 100644
--- a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
// Socket control messages
diff --git a/vendor/golang.org/x/sys/unix/str.go b/vendor/golang.org/x/sys/unix/str.go
index 35ed66435..17fb69868 100644
--- a/vendor/golang.org/x/sys/unix/str.go
+++ b/vendor/golang.org/x/sys/unix/str.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall.go b/vendor/golang.org/x/sys/unix/syscall.go
index ef35fce80..0d4b1d7a2 100644
--- a/vendor/golang.org/x/sys/unix/syscall.go
+++ b/vendor/golang.org/x/sys/unix/syscall.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
// Package unix contains an interface to the low-level operating system
// primitives. OS details vary depending on the underlying system, and
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go
new file mode 100644
index 000000000..df1f9ea3d
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_aix.go
@@ -0,0 +1,564 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build aix
+
+// Aix system calls.
+// This file is compiled as ordinary Go code,
+// but it is also input to mksyscall,
+// which parses the //sys lines and generates system call stubs.
+// Note that sometimes we use a lowercase //sys name and
+// wrap it in our own nicer implementation.
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+/*
+ * Wrapped
+ */
+
+//sys utimes(path string, times *[2]Timeval) (err error)
+func Utimes(path string, tv []Timeval) error {
+ if len(tv) != 2 {
+ return EINVAL
+ }
+ return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
+}
+
+//sys utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error)
+func UtimesNano(path string, ts []Timespec) error {
+ if len(ts) != 2 {
+ return EINVAL
+ }
+ return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
+}
+
+func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
+ if ts == nil {
+ return utimensat(dirfd, path, nil, flags)
+ }
+ if len(ts) != 2 {
+ return EINVAL
+ }
+ return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
+}
+
+func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ if sa.Port < 0 || sa.Port > 0xFFFF {
+ return nil, 0, EINVAL
+ }
+ sa.raw.Family = AF_INET
+ p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
+ p[0] = byte(sa.Port >> 8)
+ p[1] = byte(sa.Port)
+ for i := 0; i < len(sa.Addr); i++ {
+ sa.raw.Addr[i] = sa.Addr[i]
+ }
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
+}
+
+func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ if sa.Port < 0 || sa.Port > 0xFFFF {
+ return nil, 0, EINVAL
+ }
+ sa.raw.Family = AF_INET6
+ p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
+ p[0] = byte(sa.Port >> 8)
+ p[1] = byte(sa.Port)
+ sa.raw.Scope_id = sa.ZoneId
+ for i := 0; i < len(sa.Addr); i++ {
+ sa.raw.Addr[i] = sa.Addr[i]
+ }
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
+}
+
+func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ name := sa.Name
+ n := len(name)
+ if n > len(sa.raw.Path) {
+ return nil, 0, EINVAL
+ }
+ if n == len(sa.raw.Path) && name[0] != '@' {
+ return nil, 0, EINVAL
+ }
+ sa.raw.Family = AF_UNIX
+ for i := 0; i < n; i++ {
+ sa.raw.Path[i] = uint8(name[i])
+ }
+ // length is family (uint16), name, NUL.
+ sl := _Socklen(2)
+ if n > 0 {
+ sl += _Socklen(n) + 1
+ }
+ if sa.raw.Path[0] == '@' {
+ sa.raw.Path[0] = 0
+ // Don't count trailing NUL for abstract address.
+ sl--
+ }
+
+ return unsafe.Pointer(&sa.raw), sl, nil
+}
+
+func Getsockname(fd int) (sa Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ var len _Socklen = SizeofSockaddrAny
+ if err = getsockname(fd, &rsa, &len); err != nil {
+ return
+ }
+ return anyToSockaddr(fd, &rsa)
+}
+
+//sys getcwd(buf []byte) (err error)
+
+const ImplementsGetwd = true
+
+func Getwd() (ret string, err error) {
+ for len := uint64(4096); ; len *= 2 {
+ b := make([]byte, len)
+ err := getcwd(b)
+ if err == nil {
+ i := 0
+ for b[i] != 0 {
+ i++
+ }
+ return string(b[0:i]), nil
+ }
+ if err != ERANGE {
+ return "", err
+ }
+ }
+}
+
+func Getcwd(buf []byte) (n int, err error) {
+ err = getcwd(buf)
+ if err == nil {
+ i := 0
+ for buf[i] != 0 {
+ i++
+ }
+ n = i + 1
+ }
+ return
+}
+
+func Getgroups() (gids []int, err error) {
+ n, err := getgroups(0, nil)
+ if err != nil {
+ return nil, err
+ }
+ if n == 0 {
+ return nil, nil
+ }
+
+ // Sanity check group count. Max is 16 on BSD.
+ if n < 0 || n > 1000 {
+ return nil, EINVAL
+ }
+
+ a := make([]_Gid_t, n)
+ n, err = getgroups(n, &a[0])
+ if err != nil {
+ return nil, err
+ }
+ gids = make([]int, n)
+ for i, v := range a[0:n] {
+ gids[i] = int(v)
+ }
+ return
+}
+
+func Setgroups(gids []int) (err error) {
+ if len(gids) == 0 {
+ return setgroups(0, nil)
+ }
+
+ a := make([]_Gid_t, len(gids))
+ for i, v := range gids {
+ a[i] = _Gid_t(v)
+ }
+ return setgroups(len(a), &a[0])
+}
+
+/*
+ * Socket
+ */
+
+//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
+
+func Accept(fd int) (nfd int, sa Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ var len _Socklen = SizeofSockaddrAny
+ nfd, err = accept(fd, &rsa, &len)
+ if nfd == -1 {
+ return
+ }
+ sa, err = anyToSockaddr(fd, &rsa)
+ if err != nil {
+ Close(nfd)
+ nfd = 0
+ }
+ return
+}
+
+func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
+ // Recvmsg not implemented on AIX
+ sa := new(SockaddrUnix)
+ return -1, -1, -1, sa, ENOSYS
+}
+
+func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
+ _, err = SendmsgN(fd, p, oob, to, flags)
+ return
+}
+
+func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
+ // SendmsgN not implemented on AIX
+ return -1, ENOSYS
+}
+
+func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
+ switch rsa.Addr.Family {
+
+ case AF_UNIX:
+ pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
+ sa := new(SockaddrUnix)
+
+ // Some versions of AIX have a bug in getsockname (see IV78655).
+ // We can't rely on sa.Len being set correctly.
+ n := SizeofSockaddrUnix - 3 // substract leading Family, Len, terminating NUL.
+ for i := 0; i < n; i++ {
+ if pp.Path[i] == 0 {
+ n = i
+ break
+ }
+ }
+
+ bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
+ sa.Name = string(bytes)
+ return sa, nil
+
+ case AF_INET:
+ pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
+ sa := new(SockaddrInet4)
+ p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+ sa.Port = int(p[0])<<8 + int(p[1])
+ for i := 0; i < len(sa.Addr); i++ {
+ sa.Addr[i] = pp.Addr[i]
+ }
+ return sa, nil
+
+ case AF_INET6:
+ pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
+ sa := new(SockaddrInet6)
+ p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+ sa.Port = int(p[0])<<8 + int(p[1])
+ sa.ZoneId = pp.Scope_id
+ for i := 0; i < len(sa.Addr); i++ {
+ sa.Addr[i] = pp.Addr[i]
+ }
+ return sa, nil
+ }
+ return nil, EAFNOSUPPORT
+}
+
+func Gettimeofday(tv *Timeval) (err error) {
+ err = gettimeofday(tv, nil)
+ return
+}
+
+// TODO
+func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
+ return -1, ENOSYS
+}
+
+//sys getdirent(fd int, buf []byte) (n int, err error)
+func ReadDirent(fd int, buf []byte) (n int, err error) {
+ return getdirent(fd, buf)
+}
+
+//sys wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error)
+func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
+ var status _C_int
+ var r Pid_t
+ err = ERESTART
+ // AIX wait4 may return with ERESTART errno, while the processus is still
+ // active.
+ for err == ERESTART {
+ r, err = wait4(Pid_t(pid), &status, options, rusage)
+ }
+ wpid = int(r)
+ if wstatus != nil {
+ *wstatus = WaitStatus(status)
+ }
+ return
+}
+
+/*
+ * Wait
+ */
+
+type WaitStatus uint32
+
+func (w WaitStatus) Stopped() bool { return w&0x40 != 0 }
+func (w WaitStatus) StopSignal() syscall.Signal {
+ if !w.Stopped() {
+ return -1
+ }
+ return syscall.Signal(w>>8) & 0xFF
+}
+
+func (w WaitStatus) Exited() bool { return w&0xFF == 0 }
+func (w WaitStatus) ExitStatus() int {
+ if !w.Exited() {
+ return -1
+ }
+ return int((w >> 8) & 0xFF)
+}
+
+func (w WaitStatus) Signaled() bool { return w&0x40 == 0 && w&0xFF != 0 }
+func (w WaitStatus) Signal() syscall.Signal {
+ if !w.Signaled() {
+ return -1
+ }
+ return syscall.Signal(w>>16) & 0xFF
+}
+
+func (w WaitStatus) Continued() bool { return w&0x01000000 != 0 }
+
+func (w WaitStatus) CoreDump() bool { return w&0x200 != 0 }
+
+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.
+
+// FcntlInt performs a fcntl syscall on fd with the provided command and argument.
+//sys FcntlInt(fd uintptr, cmd int, arg int) (r int,err error) = fcntl
+
+// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
+//sys FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) = fcntl
+
+func Flock(fd int, how int) (err error) {
+ return syscall.Flock(fd, how)
+}
+
+/*
+ * Direct access
+ */
+
+//sys Acct(path string) (err error)
+//sys Chdir(path string) (err error)
+//sys Chroot(path string) (err error)
+//sys Close(fd int) (err error)
+//sys Dup(oldfd int) (fd int, err error)
+//sys Dup3(oldfd int, newfd int, flags int) (err error)
+//sys Exit(code int)
+//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
+//sys Fallocate(fd int, mode uint32, off int64, len int64) (err error)
+//sys Fchdir(fd int) (err error)
+//sys Fchmod(fd int, mode uint32) (err error)
+//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
+//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
+//sys fcntl(fd int, cmd int, arg int) (val int, err error)
+//sys Fdatasync(fd int) (err error)
+//sys Fsync(fd int) (err error)
+// readdir_r
+//sysnb Getpgid(pid int) (pgid int, err error)
+
+//sys Getpgrp() (pid int)
+
+//sysnb Getpid() (pid int)
+//sysnb Getppid() (ppid int)
+//sys Getpriority(which int, who int) (prio int, err error)
+//sysnb Getrusage(who int, rusage *Rusage) (err error)
+//sysnb Getsid(pid int) (sid int, err error)
+//sysnb Kill(pid int, sig syscall.Signal) (err error)
+//sys Klogctl(typ int, buf []byte) (n int, err error) = syslog
+//sys Mkdir(dirfd int, path string, mode uint32) (err error)
+//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
+//sys Mkfifo(path string, mode uint32) (err error)
+//sys Mknod(path string, mode uint32, dev int) (err error)
+//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
+//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
+//sys Open(path string, mode int, perm uint32) (fd int, err error) = open64
+//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
+//sys read(fd int, p []byte) (n int, err error)
+//sys Readlink(path string, buf []byte) (n int, err error)
+//sys Removexattr(path string, attr string) (err error)
+//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
+//sys Setdomainname(p []byte) (err error)
+//sys Sethostname(p []byte) (err error)
+//sysnb Setpgid(pid int, pgid int) (err error)
+//sysnb Setsid() (pid int, err error)
+//sysnb Settimeofday(tv *Timeval) (err error)
+
+//sys Setuid(uid int) (err error)
+//sys Setgid(uid int) (err error)
+
+//sys Setpriority(which int, who int, prio int) (err error)
+//sys Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error)
+//sys Sync()
+//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
+//sysnb Times(tms *Tms) (ticks uintptr, err error)
+//sysnb Umask(mask int) (oldmask int)
+//sysnb Uname(buf *Utsname) (err error)
+//TODO umount
+// //sys Unmount(target string, flags int) (err error) = umount
+//sys Unlink(path string) (err error)
+//sys Unlinkat(dirfd int, path string, flags int) (err error)
+//sys Unshare(flags int) (err error)
+//sys Ustat(dev int, ubuf *Ustat_t) (err error)
+//sys write(fd int, p []byte) (n int, err error)
+//sys readlen(fd int, p *byte, np int) (n int, err error) = read
+//sys writelen(fd int, p *byte, np int) (n int, err error) = write
+
+//sys Dup2(oldfd int, newfd int) (err error)
+//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = posix_fadvise64
+//sys Fchown(fd int, uid int, gid int) (err error)
+//sys Fstat(fd int, stat *Stat_t) (err error)
+//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = fstatat
+//sys Fstatfs(fd int, buf *Statfs_t) (err error)
+//sys Ftruncate(fd int, length int64) (err error)
+//sysnb Getegid() (egid int)
+//sysnb Geteuid() (euid int)
+//sysnb Getgid() (gid int)
+//sysnb Getuid() (uid int)
+//sys Lchown(path string, uid int, gid int) (err error)
+//sys Listen(s int, n int) (err error)
+//sys Lstat(path string, stat *Stat_t) (err error)
+//sys Pause() (err error)
+//sys Pread(fd int, p []byte, offset int64) (n int, err error) = pread64
+//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64
+//TODO Select
+// //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
+//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
+//sysnb Setregid(rgid int, egid int) (err error)
+//sysnb Setreuid(ruid int, euid int) (err error)
+//sys Shutdown(fd int, how int) (err error)
+//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
+//sys Stat(path string, stat *Stat_t) (err error)
+//sys Statfs(path string, buf *Statfs_t) (err error)
+//sys Truncate(path string, length int64) (err error)
+
+//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
+//sysnb setgroups(n int, list *_Gid_t) (err error)
+//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
+//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
+//sysnb socket(domain int, typ int, proto int) (fd int, err error)
+//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
+//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
+//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
+//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
+
+//sys munmap(addr uintptr, length uintptr) (err error)
+
+var mapper = &mmapper{
+ active: make(map[*byte][]byte),
+ mmap: mmap,
+ munmap: munmap,
+}
+
+func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
+ return mapper.Mmap(fd, offset, length, prot, flags)
+}
+
+func Munmap(b []byte) (err error) {
+ return mapper.Munmap(b)
+}
+
+//sys Madvise(b []byte, advice int) (err error)
+//sys Mprotect(b []byte, prot int) (err error)
+//sys Mlock(b []byte) (err error)
+//sys Mlockall(flags int) (err error)
+//sys Msync(b []byte, flags int) (err error)
+//sys Munlock(b []byte) (err error)
+//sys Munlockall() (err error)
+
+//sysnb pipe(p *[2]_C_int) (err error)
+
+func Pipe(p []int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe(&pp)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, flags)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ if len(fds) == 0 {
+ return poll(nil, 0, timeout)
+ }
+ return poll(&fds[0], len(fds), timeout)
+}
+
+//sys gettimeofday(tv *Timeval, tzp *Timezone) (err error)
+//sysnb Time(t *Time_t) (tt Time_t, err error)
+//sys Utime(path string, buf *Utimbuf) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
new file mode 100644
index 000000000..c28af1f86
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
@@ -0,0 +1,34 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build aix
+// +build ppc
+
+package unix
+
+//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
+//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64
+//sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
+
+//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+ return Timeval{Sec: int32(sec), Usec: int32(usec)}
+}
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint32(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint32(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
new file mode 100644
index 000000000..881cacc6c
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
@@ -0,0 +1,34 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build aix
+// +build ppc64
+
+package unix
+
+//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
+//sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek
+
+//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+ return Timeval{Sec: int64(sec), Usec: int32(usec)}
+}
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint32(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 eb6335402..02cf204a1 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -692,6 +692,24 @@ func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
}
+type SockaddrXDP struct {
+ Flags uint16
+ Ifindex uint32
+ QueueID uint32
+ SharedUmemFD uint32
+ raw RawSockaddrXDP
+}
+
+func (sa *SockaddrXDP) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Family = AF_XDP
+ sa.raw.Flags = sa.Flags
+ sa.raw.Ifindex = sa.Ifindex
+ sa.raw.Queue_id = sa.QueueID
+ sa.raw.Shared_umem_fd = sa.SharedUmemFD
+
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrXDP, nil
+}
+
func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
switch rsa.Addr.Family {
case AF_NETLINK:
@@ -793,6 +811,15 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
}
return sa, nil
}
+ case AF_XDP:
+ pp := (*RawSockaddrXDP)(unsafe.Pointer(rsa))
+ sa := &SockaddrXDP{
+ Flags: pp.Flags,
+ Ifindex: pp.Ifindex,
+ QueueID: pp.Queue_id,
+ SharedUmemFD: pp.Shared_umem_fd,
+ }
+ return sa, nil
}
return nil, EAFNOSUPPORT
}
@@ -1273,6 +1300,7 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
//sys Adjtimex(buf *Timex) (state int, err error)
//sys Chdir(path string) (err error)
//sys Chroot(path string) (err error)
+//sys ClockGetres(clockid int32, res *Timespec) (err error)
//sys ClockGettime(clockid int32, time *Timespec) (err error)
//sys Close(fd int) (err error)
//sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
@@ -1320,6 +1348,7 @@ func Getpgrp() (pid int) {
//sys Llistxattr(path string, dest []byte) (sz int, err error)
//sys Lremovexattr(path string, attr string) (err error)
//sys Lsetxattr(path string, attr string, data []byte, flags int) (err error)
+//sys MemfdCreate(name string, flags int) (fd int, err error)
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
@@ -1495,7 +1524,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
// Brk
// Capget
// Capset
-// ClockGetres
// ClockNanosleep
// ClockSettime
// Clone
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 8c6720f7f..6a38dfd5b 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
@@ -44,7 +44,6 @@ package unix
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Stat(path string, stat *Stat_t) (err error)
//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) = SYS_SYNC_FILE_RANGE2
//sys Truncate(path string, length int64) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
@@ -129,3 +128,11 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
}
return poll(&fds[0], len(fds), timeout)
}
+
+//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
+
+func SyncFileRange(fd int, off int64, n int64, flags int) error {
+ // The sync_file_range and sync_file_range2 syscalls differ only in the
+ // order of their arguments.
+ return syncFileRange2(fd, flags, off, n)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
new file mode 100644
index 000000000..512077fe8
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
@@ -0,0 +1,212 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build riscv64,linux
+
+package unix
+
+import "unsafe"
+
+func EpollCreate(size int) (fd int, err error) {
+ if size <= 0 {
+ return -1, EINVAL
+ }
+ return EpollCreate1(0)
+}
+
+//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
+//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
+//sys Fchown(fd int, uid int, gid int) (err error)
+//sys Fstat(fd int, stat *Stat_t) (err error)
+//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
+//sys Fstatfs(fd int, buf *Statfs_t) (err error)
+//sys Ftruncate(fd int, length int64) (err error)
+//sysnb Getegid() (egid int)
+//sysnb Geteuid() (euid int)
+//sysnb Getgid() (gid int)
+//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb Getuid() (uid int)
+//sys Listen(s int, n int) (err error)
+//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
+
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ var ts *Timespec
+ if timeout != nil {
+ ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
+ }
+ return Pselect(nfd, r, w, e, ts, nil)
+}
+
+//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
+//sys Setfsgid(gid int) (err error)
+//sys Setfsuid(uid int) (err error)
+//sysnb Setregid(rgid int, egid int) (err error)
+//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
+//sysnb Setresuid(ruid int, euid int, suid int) (err error)
+//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb Setreuid(ruid int, euid int) (err error)
+//sys Shutdown(fd int, how int) (err error)
+//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
+
+func Stat(path string, stat *Stat_t) (err error) {
+ return Fstatat(AT_FDCWD, path, stat, 0)
+}
+
+func Lchown(path string, uid int, gid int) (err error) {
+ return Fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW)
+}
+
+func Lstat(path string, stat *Stat_t) (err error) {
+ return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
+}
+
+//sys Statfs(path string, buf *Statfs_t) (err error)
+//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
+//sys Truncate(path string, length int64) (err error)
+
+func Ustat(dev int, ubuf *Ustat_t) (err error) {
+ return ENOSYS
+}
+
+//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
+//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
+//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
+//sysnb setgroups(n int, list *_Gid_t) (err error)
+//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
+//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
+//sysnb socket(domain int, typ int, proto int) (fd int, err error)
+//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
+//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
+//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
+//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
+
+//sysnb Gettimeofday(tv *Timeval) (err error)
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+ return Timeval{Sec: sec, Usec: usec}
+}
+
+func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {
+ if tv == nil {
+ return utimensat(dirfd, path, nil, 0)
+ }
+
+ ts := []Timespec{
+ NsecToTimespec(TimevalToNsec(tv[0])),
+ NsecToTimespec(TimevalToNsec(tv[1])),
+ }
+ return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
+}
+
+func Time(t *Time_t) (Time_t, error) {
+ var tv Timeval
+ err := Gettimeofday(&tv)
+ if err != nil {
+ return 0, err
+ }
+ if t != nil {
+ *t = Time_t(tv.Sec)
+ }
+ return Time_t(tv.Sec), nil
+}
+
+func Utime(path string, buf *Utimbuf) error {
+ tv := []Timeval{
+ {Sec: buf.Actime},
+ {Sec: buf.Modtime},
+ }
+ return Utimes(path, tv)
+}
+
+func utimes(path string, tv *[2]Timeval) (err error) {
+ if tv == nil {
+ return utimensat(AT_FDCWD, path, nil, 0)
+ }
+
+ ts := []Timespec{
+ NsecToTimespec(TimevalToNsec(tv[0])),
+ NsecToTimespec(TimevalToNsec(tv[1])),
+ }
+ return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
+}
+
+func Pipe(p []int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, 0)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, flags)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+func (r *PtraceRegs) PC() uint64 { return r.Pc }
+
+func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint64(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint64(length)
+}
+
+func InotifyInit() (fd int, err error) {
+ return InotifyInit1(0)
+}
+
+func Dup2(oldfd int, newfd int) (err error) {
+ return Dup3(oldfd, newfd, 0)
+}
+
+func Pause() (err error) {
+ _, _, e1 := Syscall6(SYS_PPOLL, 0, 0, 0, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ var ts *Timespec
+ if timeout >= 0 {
+ ts = new(Timespec)
+ *ts = NsecToTimespec(int64(timeout) * 1e6)
+ }
+ if len(fds) == 0 {
+ return ppoll(nil, 0, ts, nil)
+ }
+ return ppoll(&fds[0], len(fds), ts, nil)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
index 6f8ebde3a..639bcdef7 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
@@ -93,6 +93,23 @@ func nametomib(name string) (mib []_C_int, err error) {
return mib, nil
}
+func SysctlClockinfo(name string) (*Clockinfo, error) {
+ mib, err := sysctlmib(name)
+ if err != nil {
+ return nil, err
+ }
+
+ n := uintptr(SizeofClockinfo)
+ buf := make([]byte, SizeofClockinfo)
+ if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
+ return nil, err
+ }
+ if n != SizeofClockinfo {
+ return nil, EIO
+ }
+ return (*Clockinfo)(unsafe.Pointer(&buf[0])), nil
+}
+
//sysnb pipe() (fd1 int, fd2 int, err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go
index 95b2180ae..13956b795 100644
--- a/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
diff --git a/vendor/golang.org/x/sys/unix/timestruct.go b/vendor/golang.org/x/sys/unix/timestruct.go
index 47b9011ee..4a672f569 100644
--- a/vendor/golang.org/x/sys/unix/timestruct.go
+++ b/vendor/golang.org/x/sys/unix/timestruct.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
diff --git a/vendor/golang.org/x/sys/unix/types_aix.go b/vendor/golang.org/x/sys/unix/types_aix.go
new file mode 100644
index 000000000..18fbddd52
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/types_aix.go
@@ -0,0 +1,236 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+// +build aix
+
+/*
+Input to cgo -godefs. See also mkerrors.sh and mkall.sh
+*/
+
+// +godefs map struct_in_addr [4]byte /* in_addr */
+// +godefs map struct_in6_addr [16]byte /* in6_addr */
+
+package unix
+
+/*
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/limits.h>
+#include <sys/un.h>
+#include <utime.h>
+#include <sys/utsname.h>
+#include <sys/poll.h>
+#include <sys/resource.h>
+#include <sys/stat.h>
+#include <sys/statfs.h>
+#include <sys/termio.h>
+#include <sys/ioctl.h>
+
+#include <termios.h>
+
+#include <net/if.h>
+#include <net/if_dl.h>
+#include <netinet/in.h>
+#include <netinet/icmp6.h>
+
+
+#include <dirent.h>
+#include <fcntl.h>
+
+enum {
+ sizeofPtr = sizeof(void*),
+};
+
+union sockaddr_all {
+ struct sockaddr s1; // this one gets used for fields
+ struct sockaddr_in s2; // these pad it out
+ struct sockaddr_in6 s3;
+ struct sockaddr_un s4;
+ struct sockaddr_dl s5;
+};
+
+struct sockaddr_any {
+ struct sockaddr addr;
+ char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
+};
+
+*/
+import "C"
+
+// Machine characteristics; for internal use.
+
+const (
+ sizeofPtr = C.sizeofPtr
+ sizeofShort = C.sizeof_short
+ sizeofInt = C.sizeof_int
+ sizeofLong = C.sizeof_long
+ sizeofLongLong = C.sizeof_longlong
+ PathMax = C.PATH_MAX
+)
+
+// Basic types
+
+type (
+ _C_short C.short
+ _C_int C.int
+ _C_long C.long
+ _C_long_long C.longlong
+)
+
+type off64 C.off64_t
+type off C.off_t
+type Mode_t C.mode_t
+
+// Time
+
+type Timespec C.struct_timespec
+
+type StTimespec C.struct_st_timespec
+
+type Timeval C.struct_timeval
+
+type Timeval32 C.struct_timeval32
+
+type Timex C.struct_timex
+
+type Time_t C.time_t
+
+type Tms C.struct_tms
+
+type Utimbuf C.struct_utimbuf
+
+type Timezone C.struct_timezone
+
+// Processes
+
+type Rusage C.struct_rusage
+
+type Rlimit C.struct_rlimit64
+
+type Pid_t C.pid_t
+
+type _Gid_t C.gid_t
+
+type dev_t C.dev_t
+
+// Files
+
+type Stat_t C.struct_stat
+
+type StatxTimestamp C.struct_statx_timestamp
+
+type Statx_t C.struct_statx
+
+type Dirent C.struct_dirent
+
+// Sockets
+
+type RawSockaddrInet4 C.struct_sockaddr_in
+
+type RawSockaddrInet6 C.struct_sockaddr_in6
+
+type RawSockaddrUnix C.struct_sockaddr_un
+
+type RawSockaddr C.struct_sockaddr
+
+type RawSockaddrAny C.struct_sockaddr_any
+
+type _Socklen C.socklen_t
+
+type Cmsghdr C.struct_cmsghdr
+
+type ICMPv6Filter C.struct_icmp6_filter
+
+type Iovec C.struct_iovec
+
+type IPMreq C.struct_ip_mreq
+
+type IPv6Mreq C.struct_ipv6_mreq
+
+type IPv6MTUInfo C.struct_ip6_mtuinfo
+
+type Linger C.struct_linger
+
+type Msghdr C.struct_msghdr
+
+const (
+ SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
+ SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
+ SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
+ SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
+ SizeofLinger = C.sizeof_struct_linger
+ SizeofIPMreq = C.sizeof_struct_ip_mreq
+ SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
+ SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
+ SizeofMsghdr = C.sizeof_struct_msghdr
+ SizeofCmsghdr = C.sizeof_struct_cmsghdr
+ SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
+)
+
+// Routing and interface messages
+
+const (
+ SizeofIfMsghdr = C.sizeof_struct_if_msghdr
+)
+
+type IfMsgHdr C.struct_if_msghdr
+
+// Misc
+
+type FdSet C.fd_set
+
+type Utsname C.struct_utsname
+
+type Ustat_t C.struct_ustat
+
+type Sigset_t C.sigset_t
+
+const (
+ AT_FDCWD = C.AT_FDCWD
+ AT_REMOVEDIR = C.AT_REMOVEDIR
+ AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
+)
+
+// Terminal handling
+
+type Termios C.struct_termios
+
+type Termio C.struct_termio
+
+type Winsize C.struct_winsize
+
+//poll
+
+type PollFd struct {
+ Fd int32
+ Events uint16
+ Revents uint16
+}
+
+const (
+ POLLERR = C.POLLERR
+ POLLHUP = C.POLLHUP
+ POLLIN = C.POLLIN
+ POLLNVAL = C.POLLNVAL
+ POLLOUT = C.POLLOUT
+ POLLPRI = C.POLLPRI
+ POLLRDBAND = C.POLLRDBAND
+ POLLRDNORM = C.POLLRDNORM
+ POLLWRBAND = C.POLLWRBAND
+ POLLWRNORM = C.POLLWRNORM
+)
+
+//flock_t
+
+type Flock_t C.struct_flock64
+
+// Statfs
+
+type Fsid_t C.struct_fsid_t
+type Fsid64_t C.struct_fsid64_t
+
+type Statfs_t C.struct_statfs
+
+const RNDGETENTCNT = 0x80045200
diff --git a/vendor/golang.org/x/sys/unix/types_netbsd.go b/vendor/golang.org/x/sys/unix/types_netbsd.go
index 1494aafcb..c49621ce5 100644
--- a/vendor/golang.org/x/sys/unix/types_netbsd.go
+++ b/vendor/golang.org/x/sys/unix/types_netbsd.go
@@ -279,3 +279,9 @@ type Sysctlnode C.struct_sysctlnode
// Uname
type Utsname C.struct_utsname
+
+// Clockinfo
+
+const SizeofClockinfo = C.sizeof_struct_clockinfo
+
+type Clockinfo C.struct_clockinfo
diff --git a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
new file mode 100644
index 000000000..4b7b96502
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
@@ -0,0 +1,1372 @@
+// mkerrors.sh -maix32
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build ppc,aix
+
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs -- -maix32 _const.go
+
+package unix
+
+import "syscall"
+
+const (
+ AF_APPLETALK = 0x10
+ AF_BYPASS = 0x19
+ AF_CCITT = 0xa
+ AF_CHAOS = 0x5
+ AF_DATAKIT = 0x9
+ AF_DECnet = 0xc
+ AF_DLI = 0xd
+ AF_ECMA = 0x8
+ AF_HYLINK = 0xf
+ AF_IMPLINK = 0x3
+ AF_INET = 0x2
+ AF_INET6 = 0x18
+ AF_INTF = 0x14
+ AF_ISO = 0x7
+ AF_LAT = 0xe
+ AF_LINK = 0x12
+ AF_LOCAL = 0x1
+ AF_MAX = 0x1e
+ AF_NDD = 0x17
+ AF_NETWARE = 0x16
+ AF_NS = 0x6
+ AF_OSI = 0x7
+ AF_PUP = 0x4
+ AF_RIF = 0x15
+ AF_ROUTE = 0x11
+ AF_SNA = 0xb
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ ALTWERASE = 0x400000
+ ARPHRD_802_3 = 0x6
+ ARPHRD_802_5 = 0x6
+ ARPHRD_ETHER = 0x1
+ ARPHRD_FDDI = 0x1
+ B0 = 0x0
+ B110 = 0x3
+ B1200 = 0x9
+ B134 = 0x4
+ B150 = 0x5
+ B1800 = 0xa
+ B19200 = 0xe
+ B200 = 0x6
+ B2400 = 0xb
+ B300 = 0x7
+ B38400 = 0xf
+ B4800 = 0xc
+ B50 = 0x1
+ B600 = 0x8
+ B75 = 0x2
+ B9600 = 0xd
+ BRKINT = 0x2
+ BS0 = 0x0
+ BS1 = 0x1000
+ BSDLY = 0x1000
+ CAP_AACCT = 0x6
+ CAP_ARM_APPLICATION = 0x5
+ CAP_BYPASS_RAC_VMM = 0x3
+ CAP_CLEAR = 0x0
+ CAP_CREDENTIALS = 0x7
+ CAP_EFFECTIVE = 0x1
+ CAP_EWLM_AGENT = 0x4
+ CAP_INHERITABLE = 0x2
+ CAP_MAXIMUM = 0x7
+ CAP_NUMA_ATTACH = 0x2
+ CAP_PERMITTED = 0x3
+ CAP_PROPAGATE = 0x1
+ CAP_PROPOGATE = 0x1
+ CAP_SET = 0x1
+ CBAUD = 0xf
+ CFLUSH = 0xf
+ CIBAUD = 0xf0000
+ CLOCAL = 0x800
+ CLOCK_MONOTONIC = 0xa
+ CLOCK_PROCESS_CPUTIME_ID = 0xb
+ CLOCK_REALTIME = 0x9
+ CLOCK_THREAD_CPUTIME_ID = 0xc
+ CR0 = 0x0
+ CR1 = 0x100
+ CR2 = 0x200
+ CR3 = 0x300
+ CRDLY = 0x300
+ CREAD = 0x80
+ CS5 = 0x0
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIOCGIFCONF = -0x3ff796dc
+ CSIZE = 0x30
+ CSMAP_DIR = "/usr/lib/nls/csmap/"
+ CSTART = '\021'
+ CSTOP = '\023'
+ CSTOPB = 0x40
+ CSUSP = 0x1a
+ ECHO = 0x8
+ ECHOCTL = 0x20000
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x80000
+ ECHONL = 0x40
+ ECHOPRT = 0x40000
+ ECH_ICMPID = 0x2
+ ETHERNET_CSMACD = 0x6
+ EVENP = 0x80
+ EXCONTINUE = 0x0
+ EXDLOK = 0x3
+ EXIO = 0x2
+ EXPGIO = 0x0
+ EXRESUME = 0x2
+ EXRETURN = 0x1
+ EXSIG = 0x4
+ EXTA = 0xe
+ EXTB = 0xf
+ EXTRAP = 0x1
+ EYEC_RTENTRYA = 0x257274656e747241
+ EYEC_RTENTRYF = 0x257274656e747246
+ E_ACC = 0x0
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0xfffe
+ FF0 = 0x0
+ FF1 = 0x2000
+ FFDLY = 0x2000
+ FLUSHBAND = 0x40
+ FLUSHLOW = 0x8
+ FLUSHO = 0x100000
+ FLUSHR = 0x1
+ FLUSHRW = 0x3
+ FLUSHW = 0x2
+ F_CLOSEM = 0xa
+ F_DUP2FD = 0xe
+ F_DUPFD = 0x0
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLK = 0x5
+ F_GETLK64 = 0xb
+ F_GETOWN = 0x8
+ F_LOCK = 0x1
+ F_OK = 0x0
+ F_RDLCK = 0x1
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLK = 0x6
+ F_SETLK64 = 0xc
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0xd
+ F_SETOWN = 0x9
+ F_TEST = 0x3
+ F_TLOCK = 0x2
+ F_TSTLK = 0xf
+ F_ULOCK = 0x0
+ F_UNLCK = 0x3
+ F_WRLCK = 0x2
+ HUPCL = 0x400
+ IBSHIFT = 0x10
+ ICANON = 0x2
+ ICMP6_FILTER = 0x26
+ ICMP6_SEC_SEND_DEL = 0x46
+ ICMP6_SEC_SEND_GET = 0x47
+ ICMP6_SEC_SEND_SET = 0x44
+ ICMP6_SEC_SEND_SET_CGA_ADDR = 0x45
+ ICRNL = 0x100
+ IEXTEN = 0x200000
+ IFA_FIRSTALIAS = 0x2000
+ IFA_ROUTE = 0x1
+ IFF_64BIT = 0x4000000
+ IFF_ALLCAST = 0x20000
+ IFF_ALLMULTI = 0x200
+ IFF_BPF = 0x8000000
+ IFF_BRIDGE = 0x40000
+ IFF_BROADCAST = 0x2
+ IFF_CANTCHANGE = 0x80c52
+ IFF_CHECKSUM_OFFLOAD = 0x10000000
+ IFF_D1 = 0x8000
+ IFF_D2 = 0x4000
+ IFF_D3 = 0x2000
+ IFF_D4 = 0x1000
+ IFF_DEBUG = 0x4
+ IFF_DEVHEALTH = 0x4000
+ IFF_DO_HW_LOOPBACK = 0x10000
+ IFF_GROUP_ROUTING = 0x2000000
+ IFF_IFBUFMGT = 0x800000
+ IFF_LINK0 = 0x100000
+ IFF_LINK1 = 0x200000
+ IFF_LINK2 = 0x400000
+ IFF_LOOPBACK = 0x8
+ IFF_MULTICAST = 0x80000
+ IFF_NOARP = 0x80
+ IFF_NOECHO = 0x800
+ IFF_NOTRAILERS = 0x20
+ IFF_OACTIVE = 0x400
+ IFF_POINTOPOINT = 0x10
+ IFF_PROMISC = 0x100
+ IFF_PSEG = 0x40000000
+ IFF_RUNNING = 0x40
+ IFF_SIMPLEX = 0x800
+ IFF_SNAP = 0x8000
+ IFF_TCP_DISABLE_CKSUM = 0x20000000
+ IFF_TCP_NOCKSUM = 0x1000000
+ IFF_UP = 0x1
+ IFF_VIPA = 0x80000000
+ IFNAMSIZ = 0x10
+ IFO_FLUSH = 0x1
+ IFT_1822 = 0x2
+ IFT_AAL5 = 0x31
+ IFT_ARCNET = 0x23
+ IFT_ARCNETPLUS = 0x24
+ IFT_ATM = 0x25
+ IFT_CEPT = 0x13
+ IFT_CLUSTER = 0x3e
+ IFT_DS3 = 0x1e
+ IFT_EON = 0x19
+ IFT_ETHER = 0x6
+ IFT_FCS = 0x3a
+ IFT_FDDI = 0xf
+ IFT_FRELAY = 0x20
+ IFT_FRELAYDCE = 0x2c
+ IFT_GIFTUNNEL = 0x3c
+ IFT_HDH1822 = 0x3
+ IFT_HF = 0x3d
+ IFT_HIPPI = 0x2f
+ IFT_HSSI = 0x2e
+ IFT_HY = 0xe
+ IFT_IB = 0xc7
+ IFT_ISDNBASIC = 0x14
+ IFT_ISDNPRIMARY = 0x15
+ IFT_ISO88022LLC = 0x29
+ IFT_ISO88023 = 0x7
+ IFT_ISO88024 = 0x8
+ IFT_ISO88025 = 0x9
+ IFT_ISO88026 = 0xa
+ IFT_LAPB = 0x10
+ IFT_LOCALTALK = 0x2a
+ IFT_LOOP = 0x18
+ IFT_MIOX25 = 0x26
+ IFT_MODEM = 0x30
+ IFT_NSIP = 0x1b
+ IFT_OTHER = 0x1
+ IFT_P10 = 0xc
+ IFT_P80 = 0xd
+ IFT_PARA = 0x22
+ IFT_PPP = 0x17
+ IFT_PROPMUX = 0x36
+ IFT_PROPVIRTUAL = 0x35
+ IFT_PTPSERIAL = 0x16
+ IFT_RS232 = 0x21
+ IFT_SDLC = 0x11
+ IFT_SIP = 0x1f
+ IFT_SLIP = 0x1c
+ IFT_SMDSDXI = 0x2b
+ IFT_SMDSICIP = 0x34
+ IFT_SN = 0x38
+ IFT_SONET = 0x27
+ IFT_SONETPATH = 0x32
+ IFT_SONETVT = 0x33
+ IFT_SP = 0x39
+ IFT_STARLAN = 0xb
+ IFT_T1 = 0x12
+ IFT_TUNNEL = 0x3b
+ IFT_ULTRA = 0x1d
+ IFT_V35 = 0x2d
+ IFT_VIPA = 0x37
+ IFT_X25 = 0x5
+ IFT_X25DDN = 0x4
+ IFT_X25PLE = 0x28
+ IFT_XETHER = 0x1a
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x10000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_CLASSA_HOST = 0xffffff
+ IN_CLASSA_MAX = 0x80
+ IN_CLASSA_NET = 0xff000000
+ IN_CLASSA_NSHIFT = 0x18
+ IN_CLASSB_HOST = 0xffff
+ IN_CLASSB_MAX = 0x10000
+ IN_CLASSB_NET = 0xffff0000
+ IN_CLASSB_NSHIFT = 0x10
+ IN_CLASSC_HOST = 0xff
+ IN_CLASSC_NET = 0xffffff00
+ IN_CLASSC_NSHIFT = 0x8
+ IN_CLASSD_HOST = 0xfffffff
+ IN_CLASSD_NET = 0xf0000000
+ IN_CLASSD_NSHIFT = 0x1c
+ IN_LOOPBACKNET = 0x7f
+ IN_USE = 0x1
+ IPPROTO_AH = 0x33
+ IPPROTO_BIP = 0x53
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_EON = 0x50
+ IPPROTO_ESP = 0x32
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GGP = 0x3
+ IPPROTO_GIF = 0x8c
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IP = 0x0
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_LOCAL = 0x3f
+ IPPROTO_MAX = 0x100
+ IPPROTO_MH = 0x87
+ IPPROTO_NONE = 0x3b
+ IPPROTO_PUP = 0xc
+ IPPROTO_QOS = 0x2d
+ IPPROTO_RAW = 0xff
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_SCTP = 0x84
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_UDP = 0x11
+ IPV6_ADDRFORM = 0x16
+ IPV6_ADDR_PREFERENCES = 0x4a
+ IPV6_ADD_MEMBERSHIP = 0xc
+ IPV6_AIXRAWSOCKET = 0x39
+ IPV6_CHECKSUM = 0x27
+ IPV6_DONTFRAG = 0x2d
+ IPV6_DROP_MEMBERSHIP = 0xd
+ IPV6_DSTOPTS = 0x36
+ IPV6_FLOWINFO_FLOWLABEL = 0xffffff
+ IPV6_FLOWINFO_PRIFLOW = 0xfffffff
+ IPV6_FLOWINFO_PRIORITY = 0xf000000
+ IPV6_FLOWINFO_SRFLAG = 0x10000000
+ IPV6_FLOWINFO_VERSION = 0xf0000000
+ IPV6_HOPLIMIT = 0x28
+ IPV6_HOPOPTS = 0x34
+ IPV6_JOIN_GROUP = 0xc
+ IPV6_LEAVE_GROUP = 0xd
+ IPV6_MIPDSTOPTS = 0x36
+ IPV6_MULTICAST_HOPS = 0xa
+ IPV6_MULTICAST_IF = 0x9
+ IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_NOPROBE = 0x1c
+ IPV6_PATHMTU = 0x2e
+ IPV6_PKTINFO = 0x21
+ IPV6_PKTOPTIONS = 0x24
+ IPV6_PRIORITY_10 = 0xa000000
+ IPV6_PRIORITY_11 = 0xb000000
+ IPV6_PRIORITY_12 = 0xc000000
+ IPV6_PRIORITY_13 = 0xd000000
+ IPV6_PRIORITY_14 = 0xe000000
+ IPV6_PRIORITY_15 = 0xf000000
+ IPV6_PRIORITY_8 = 0x8000000
+ IPV6_PRIORITY_9 = 0x9000000
+ IPV6_PRIORITY_BULK = 0x4000000
+ IPV6_PRIORITY_CONTROL = 0x7000000
+ IPV6_PRIORITY_FILLER = 0x1000000
+ IPV6_PRIORITY_INTERACTIVE = 0x6000000
+ IPV6_PRIORITY_RESERVED1 = 0x3000000
+ IPV6_PRIORITY_RESERVED2 = 0x5000000
+ IPV6_PRIORITY_UNATTENDED = 0x2000000
+ IPV6_PRIORITY_UNCHARACTERIZED = 0x0
+ IPV6_RECVDSTOPTS = 0x38
+ IPV6_RECVHOPLIMIT = 0x29
+ IPV6_RECVHOPOPTS = 0x35
+ IPV6_RECVHOPS = 0x22
+ IPV6_RECVIF = 0x1e
+ IPV6_RECVPATHMTU = 0x2f
+ IPV6_RECVPKTINFO = 0x23
+ IPV6_RECVRTHDR = 0x33
+ IPV6_RECVSRCRT = 0x1d
+ IPV6_RECVTCLASS = 0x2a
+ IPV6_RTHDR = 0x32
+ IPV6_RTHDRDSTOPTS = 0x37
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_RTHDR_TYPE_2 = 0x2
+ IPV6_SENDIF = 0x1f
+ IPV6_SRFLAG_LOOSE = 0x0
+ IPV6_SRFLAG_STRICT = 0x10000000
+ IPV6_TCLASS = 0x2b
+ IPV6_TOKEN_LENGTH = 0x40
+ IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2c
+ IPV6_V6ONLY = 0x25
+ IPV6_VERSION = 0x60000000
+ IP_ADDRFORM = 0x16
+ IP_ADD_MEMBERSHIP = 0xc
+ IP_ADD_SOURCE_MEMBERSHIP = 0x3c
+ IP_BLOCK_SOURCE = 0x3a
+ IP_BROADCAST_IF = 0x10
+ IP_CACHE_LINE_SIZE = 0x80
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DHCPMODE = 0x11
+ IP_DONTFRAG = 0x19
+ IP_DROP_MEMBERSHIP = 0xd
+ IP_DROP_SOURCE_MEMBERSHIP = 0x3d
+ IP_FINDPMTU = 0x1a
+ IP_HDRINCL = 0x2
+ IP_INC_MEMBERSHIPS = 0x14
+ IP_INIT_MEMBERSHIP = 0x14
+ IP_MAXPACKET = 0xffff
+ IP_MF = 0x2000
+ IP_MSS = 0x240
+ IP_MULTICAST_HOPS = 0xa
+ IP_MULTICAST_IF = 0x9
+ IP_MULTICAST_LOOP = 0xb
+ IP_MULTICAST_TTL = 0xa
+ IP_OPT = 0x1b
+ IP_OPTIONS = 0x1
+ IP_PMTUAGE = 0x1b
+ IP_RECVDSTADDR = 0x7
+ IP_RECVIF = 0x14
+ IP_RECVIFINFO = 0xf
+ IP_RECVINTERFACE = 0x20
+ IP_RECVMACHDR = 0xe
+ IP_RECVOPTS = 0x5
+ IP_RECVRETOPTS = 0x6
+ IP_RECVTTL = 0x22
+ IP_RETOPTS = 0x8
+ IP_SOURCE_FILTER = 0x48
+ IP_TOS = 0x3
+ IP_TTL = 0x4
+ IP_UNBLOCK_SOURCE = 0x3b
+ IP_UNICAST_HOPS = 0x4
+ ISIG = 0x1
+ ISTRIP = 0x20
+ IUCLC = 0x800
+ IXANY = 0x1000
+ IXOFF = 0x400
+ IXON = 0x200
+ I_FLUSH = 0x20005305
+ LNOFLSH = 0x8000
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ MADV_DONTNEED = 0x4
+ MADV_NORMAL = 0x0
+ MADV_RANDOM = 0x1
+ MADV_SEQUENTIAL = 0x2
+ MADV_SPACEAVAIL = 0x5
+ MADV_WILLNEED = 0x3
+ MAP_ANON = 0x10
+ MAP_ANONYMOUS = 0x10
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x100
+ MAP_PRIVATE = 0x2
+ MAP_SHARED = 0x1
+ MAP_TYPE = 0xf0
+ MAP_VARIABLE = 0x0
+ MCL_CURRENT = 0x100
+ MCL_FUTURE = 0x200
+ MSG_ANY = 0x4
+ MSG_ARGEXT = 0x400
+ MSG_BAND = 0x2
+ MSG_COMPAT = 0x8000
+ MSG_CTRUNC = 0x20
+ MSG_DONTROUTE = 0x4
+ MSG_EOR = 0x8
+ MSG_HIPRI = 0x1
+ MSG_MAXIOVLEN = 0x10
+ MSG_MPEG2 = 0x80
+ MSG_NONBLOCK = 0x4000
+ MSG_NOSIGNAL = 0x100
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_TRUNC = 0x10
+ MSG_WAITALL = 0x40
+ MSG_WAITFORONE = 0x200
+ MS_ASYNC = 0x10
+ MS_EINTR = 0x80
+ MS_INVALIDATE = 0x40
+ MS_PER_SEC = 0x3e8
+ MS_SYNC = 0x20
+ NL0 = 0x0
+ NL1 = 0x4000
+ NL2 = 0x8000
+ NL3 = 0xc000
+ NLDLY = 0x4000
+ NOFLSH = 0x80
+ NOFLUSH = 0x80000000
+ OCRNL = 0x8
+ OFDEL = 0x80
+ OFILL = 0x40
+ OLCUC = 0x2
+ ONLCR = 0x4
+ ONLRET = 0x20
+ ONOCR = 0x10
+ ONOEOT = 0x80000
+ OPOST = 0x1
+ OXTABS = 0x40000
+ O_ACCMODE = 0x23
+ O_APPEND = 0x8
+ O_CIO = 0x80
+ O_CIOR = 0x800000000
+ O_CLOEXEC = 0x800000
+ O_CREAT = 0x100
+ O_DEFER = 0x2000
+ O_DELAY = 0x4000
+ O_DIRECT = 0x8000000
+ O_DIRECTORY = 0x80000
+ O_DSYNC = 0x400000
+ O_EFSOFF = 0x400000000
+ O_EFSON = 0x200000000
+ O_EXCL = 0x400
+ O_EXEC = 0x20
+ O_LARGEFILE = 0x4000000
+ O_NDELAY = 0x8000
+ O_NOCACHE = 0x100000
+ O_NOCTTY = 0x800
+ O_NOFOLLOW = 0x1000000
+ O_NONBLOCK = 0x4
+ O_NONE = 0x3
+ O_NSHARE = 0x10000
+ O_RAW = 0x100000000
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_RSHARE = 0x1000
+ O_RSYNC = 0x200000
+ O_SEARCH = 0x20
+ O_SNAPSHOT = 0x40
+ O_SYNC = 0x10
+ O_TRUNC = 0x200
+ O_TTY_INIT = 0x0
+ O_WRONLY = 0x1
+ PARENB = 0x100
+ PAREXT = 0x100000
+ PARMRK = 0x8
+ PARODD = 0x200
+ PENDIN = 0x20000000
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROT_EXEC = 0x4
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ PR_64BIT = 0x20
+ PR_ADDR = 0x2
+ PR_ARGEXT = 0x400
+ PR_ATOMIC = 0x1
+ PR_CONNREQUIRED = 0x4
+ PR_FASTHZ = 0x5
+ PR_INP = 0x40
+ PR_INTRLEVEL = 0x8000
+ PR_MLS = 0x100
+ PR_MLS_1_LABEL = 0x200
+ PR_NOEOR = 0x4000
+ PR_RIGHTS = 0x10
+ PR_SLOWHZ = 0x2
+ PR_WANTRCVD = 0x8
+ RLIMIT_AS = 0x6
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x9
+ RLIMIT_RSS = 0x5
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = 0x7fffffff
+ RTAX_AUTHOR = 0x6
+ RTAX_BRD = 0x7
+ RTAX_DST = 0x0
+ RTAX_GATEWAY = 0x1
+ RTAX_GENMASK = 0x3
+ RTAX_IFA = 0x5
+ RTAX_IFP = 0x4
+ RTAX_MAX = 0x8
+ RTAX_NETMASK = 0x2
+ RTA_AUTHOR = 0x40
+ RTA_BRD = 0x80
+ RTA_DOWNSTREAM = 0x100
+ RTA_DST = 0x1
+ RTA_GATEWAY = 0x2
+ RTA_GENMASK = 0x8
+ RTA_IFA = 0x20
+ RTA_IFP = 0x10
+ RTA_NETMASK = 0x4
+ RTC_IA64 = 0x3
+ RTC_POWER = 0x1
+ RTC_POWER_PC = 0x2
+ RTF_ACTIVE_DGD = 0x1000000
+ RTF_BCE = 0x80000
+ RTF_BLACKHOLE = 0x1000
+ RTF_BROADCAST = 0x400000
+ RTF_BUL = 0x2000
+ RTF_CLONE = 0x10000
+ RTF_CLONED = 0x20000
+ RTF_CLONING = 0x100
+ RTF_DONE = 0x40
+ RTF_DYNAMIC = 0x10
+ RTF_FREE_IN_PROG = 0x4000000
+ RTF_GATEWAY = 0x2
+ RTF_HOST = 0x4
+ RTF_LLINFO = 0x400
+ RTF_LOCAL = 0x200000
+ RTF_MASK = 0x80
+ RTF_MODIFIED = 0x20
+ RTF_MULTICAST = 0x800000
+ RTF_PERMANENT6 = 0x8000000
+ RTF_PINNED = 0x100000
+ RTF_PROTO1 = 0x8000
+ RTF_PROTO2 = 0x4000
+ RTF_PROTO3 = 0x40000
+ RTF_REJECT = 0x8
+ RTF_SMALLMTU = 0x40000
+ RTF_STATIC = 0x800
+ RTF_STOPSRCH = 0x2000000
+ RTF_UNREACHABLE = 0x10000000
+ RTF_UP = 0x1
+ RTF_XRESOLVE = 0x200
+ RTM_ADD = 0x1
+ RTM_CHANGE = 0x3
+ RTM_DELADDR = 0xd
+ RTM_DELETE = 0x2
+ RTM_EXPIRE = 0xf
+ RTM_GET = 0x4
+ RTM_GETNEXT = 0x11
+ RTM_IFINFO = 0xe
+ RTM_LOCK = 0x8
+ RTM_LOSING = 0x5
+ RTM_MISS = 0x7
+ RTM_NEWADDR = 0xc
+ RTM_OLDADD = 0x9
+ RTM_OLDDEL = 0xa
+ RTM_REDIRECT = 0x6
+ RTM_RESOLVE = 0xb
+ RTM_RTLOST = 0x10
+ RTM_RTTUNIT = 0xf4240
+ RTM_SAMEADDR = 0x12
+ RTM_SET = 0x13
+ RTM_VERSION = 0x2
+ RTM_VERSION_GR = 0x4
+ RTM_VERSION_GR_COMPAT = 0x3
+ RTM_VERSION_POLICY = 0x5
+ RTM_VERSION_POLICY_EXT = 0x6
+ RTM_VERSION_POLICY_PRFN = 0x7
+ RTV_EXPIRE = 0x4
+ RTV_HOPCOUNT = 0x2
+ RTV_MTU = 0x1
+ RTV_RPIPE = 0x8
+ RTV_RTT = 0x40
+ RTV_RTTVAR = 0x80
+ RTV_SPIPE = 0x10
+ RTV_SSTHRESH = 0x20
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ RUSAGE_THREAD = 0x1
+ SCM_RIGHTS = 0x1
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIGMAX64 = 0xff
+ SIGQUEUE_MAX = 0x20
+ SIOCADDIFVIPA = 0x20006942
+ SIOCADDMTU = -0x7ffb9690
+ SIOCADDMULTI = -0x7fdf96cf
+ SIOCADDNETID = -0x7fd796a9
+ SIOCADDRT = -0x7fcf8df6
+ SIOCAIFADDR = -0x7fbf96e6
+ SIOCATMARK = 0x40047307
+ SIOCDARP = -0x7fb396e0
+ SIOCDELIFVIPA = 0x20006943
+ SIOCDELMTU = -0x7ffb968f
+ SIOCDELMULTI = -0x7fdf96ce
+ SIOCDELPMTU = -0x7fd78ff6
+ SIOCDELRT = -0x7fcf8df5
+ SIOCDIFADDR = -0x7fd796e7
+ SIOCDNETOPT = -0x3ffe9680
+ SIOCDX25XLATE = -0x7fd7969b
+ SIOCFIFADDR = -0x7fdf966d
+ SIOCGARP = -0x3fb396da
+ SIOCGETMTUS = 0x2000696f
+ SIOCGETSGCNT = -0x3feb8acc
+ SIOCGETVIFCNT = -0x3feb8acd
+ SIOCGHIWAT = 0x40047301
+ SIOCGIFADDR = -0x3fd796df
+ SIOCGIFADDRS = 0x2000698c
+ SIOCGIFBAUDRATE = -0x3fd79693
+ SIOCGIFBRDADDR = -0x3fd796dd
+ SIOCGIFCONF = -0x3ff796bb
+ SIOCGIFCONFGLOB = -0x3ff79670
+ SIOCGIFDSTADDR = -0x3fd796de
+ SIOCGIFFLAGS = -0x3fd796ef
+ SIOCGIFGIDLIST = 0x20006968
+ SIOCGIFHWADDR = -0x3fab966b
+ SIOCGIFMETRIC = -0x3fd796e9
+ SIOCGIFMTU = -0x3fd796aa
+ SIOCGIFNETMASK = -0x3fd796db
+ SIOCGIFOPTIONS = -0x3fd796d6
+ SIOCGISNO = -0x3fd79695
+ SIOCGLOADF = -0x3ffb967e
+ SIOCGLOWAT = 0x40047303
+ SIOCGNETOPT = -0x3ffe96a5
+ SIOCGNETOPT1 = -0x3fdf967f
+ SIOCGNMTUS = 0x2000696e
+ SIOCGPGRP = 0x40047309
+ SIOCGSIZIFCONF = 0x4004696a
+ SIOCGSRCFILTER = -0x3fe796cb
+ SIOCGTUNEPHASE = -0x3ffb9676
+ SIOCGX25XLATE = -0x3fd7969c
+ SIOCIFATTACH = -0x7fdf9699
+ SIOCIFDETACH = -0x7fdf969a
+ SIOCIFGETPKEY = -0x7fdf969b
+ SIOCIF_ATM_DARP = -0x7fdf9683
+ SIOCIF_ATM_DUMPARP = -0x7fdf9685
+ SIOCIF_ATM_GARP = -0x7fdf9682
+ SIOCIF_ATM_IDLE = -0x7fdf9686
+ SIOCIF_ATM_SARP = -0x7fdf9681
+ SIOCIF_ATM_SNMPARP = -0x7fdf9687
+ SIOCIF_ATM_SVC = -0x7fdf9684
+ SIOCIF_ATM_UBR = -0x7fdf9688
+ SIOCIF_DEVHEALTH = -0x7ffb966c
+ SIOCIF_IB_ARP_INCOMP = -0x7fdf9677
+ SIOCIF_IB_ARP_TIMER = -0x7fdf9678
+ SIOCIF_IB_CLEAR_PINFO = -0x3fdf966f
+ SIOCIF_IB_DEL_ARP = -0x7fdf967f
+ SIOCIF_IB_DEL_PINFO = -0x3fdf9670
+ SIOCIF_IB_DUMP_ARP = -0x7fdf9680
+ SIOCIF_IB_GET_ARP = -0x7fdf967e
+ SIOCIF_IB_GET_INFO = -0x3f879675
+ SIOCIF_IB_GET_STATS = -0x3f879672
+ SIOCIF_IB_NOTIFY_ADDR_REM = -0x3f87966a
+ SIOCIF_IB_RESET_STATS = -0x3f879671
+ SIOCIF_IB_RESIZE_CQ = -0x7fdf9679
+ SIOCIF_IB_SET_ARP = -0x7fdf967d
+ SIOCIF_IB_SET_PKEY = -0x7fdf967c
+ SIOCIF_IB_SET_PORT = -0x7fdf967b
+ SIOCIF_IB_SET_QKEY = -0x7fdf9676
+ SIOCIF_IB_SET_QSIZE = -0x7fdf967a
+ SIOCLISTIFVIPA = 0x20006944
+ SIOCSARP = -0x7fb396e2
+ SIOCSHIWAT = 0x80047300
+ SIOCSIFADDR = -0x7fd796f4
+ SIOCSIFADDRORI = -0x7fdb9673
+ SIOCSIFBRDADDR = -0x7fd796ed
+ SIOCSIFDSTADDR = -0x7fd796f2
+ SIOCSIFFLAGS = -0x7fd796f0
+ SIOCSIFGIDLIST = 0x20006969
+ SIOCSIFMETRIC = -0x7fd796e8
+ SIOCSIFMTU = -0x7fd796a8
+ SIOCSIFNETDUMP = -0x7fd796e4
+ SIOCSIFNETMASK = -0x7fd796ea
+ SIOCSIFOPTIONS = -0x7fd796d7
+ SIOCSIFSUBCHAN = -0x7fd796e5
+ SIOCSISNO = -0x7fd79694
+ SIOCSLOADF = -0x3ffb967d
+ SIOCSLOWAT = 0x80047302
+ SIOCSNETOPT = -0x7ffe96a6
+ SIOCSPGRP = 0x80047308
+ SIOCSX25XLATE = -0x7fd7969d
+ SOCK_CONN_DGRAM = 0x6
+ SOCK_DGRAM = 0x2
+ SOCK_RAW = 0x3
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0xffff
+ SOMAXCONN = 0x400
+ SO_ACCEPTCONN = 0x2
+ SO_AUDIT = 0x8000
+ SO_BROADCAST = 0x20
+ SO_CKSUMRECV = 0x800
+ SO_DEBUG = 0x1
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_KEEPALIVE = 0x8
+ SO_KERNACCEPT = 0x2000
+ SO_LINGER = 0x80
+ SO_NOMULTIPATH = 0x4000
+ SO_NOREUSEADDR = 0x1000
+ SO_OOBINLINE = 0x100
+ SO_PEERID = 0x1009
+ SO_RCVBUF = 0x1002
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_SNDBUF = 0x1001
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_TIMESTAMPNS = 0x100a
+ SO_TYPE = 0x1008
+ SO_USELOOPBACK = 0x40
+ SO_USE_IFBUFS = 0x400
+ S_BANDURG = 0x400
+ S_EMODFMT = 0x3c000000
+ S_ENFMT = 0x400
+ S_ERROR = 0x100
+ S_HANGUP = 0x200
+ S_HIPRI = 0x2
+ S_ICRYPTO = 0x80000
+ S_IEXEC = 0x40
+ S_IFBLK = 0x6000
+ S_IFCHR = 0x2000
+ S_IFDIR = 0x4000
+ S_IFIFO = 0x1000
+ S_IFJOURNAL = 0x10000
+ S_IFLNK = 0xa000
+ S_IFMPX = 0x2200
+ S_IFMT = 0xf000
+ S_IFPDIR = 0x4000000
+ S_IFPSDIR = 0x8000000
+ S_IFPSSDIR = 0xc000000
+ S_IFREG = 0x8000
+ S_IFSOCK = 0xc000
+ S_IFSYSEA = 0x30000000
+ S_INPUT = 0x1
+ S_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ S_ISUID = 0x800
+ S_ISVTX = 0x200
+ S_ITCB = 0x1000000
+ S_ITP = 0x800000
+ S_IWGRP = 0x10
+ S_IWOTH = 0x2
+ S_IWRITE = 0x80
+ S_IWUSR = 0x80
+ S_IXACL = 0x2000000
+ S_IXATTR = 0x40000
+ S_IXGRP = 0x8
+ S_IXINTERFACE = 0x100000
+ S_IXMOD = 0x40000000
+ S_IXOTH = 0x1
+ S_IXUSR = 0x40
+ S_MSG = 0x8
+ S_OUTPUT = 0x4
+ S_RDBAND = 0x20
+ S_RDNORM = 0x10
+ S_RESERVED1 = 0x20000
+ S_RESERVED2 = 0x200000
+ S_RESERVED3 = 0x400000
+ S_RESERVED4 = 0x80000000
+ S_RESFMT1 = 0x10000000
+ S_RESFMT10 = 0x34000000
+ S_RESFMT11 = 0x38000000
+ S_RESFMT12 = 0x3c000000
+ S_RESFMT2 = 0x14000000
+ S_RESFMT3 = 0x18000000
+ S_RESFMT4 = 0x1c000000
+ S_RESFMT5 = 0x20000000
+ S_RESFMT6 = 0x24000000
+ S_RESFMT7 = 0x28000000
+ S_RESFMT8 = 0x2c000000
+ S_WRBAND = 0x80
+ S_WRNORM = 0x40
+ TAB0 = 0x0
+ TAB1 = 0x400
+ TAB2 = 0x800
+ TAB3 = 0xc00
+ TABDLY = 0xc00
+ TCFLSH = 0x540c
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCIFLUSH = 0x0
+ TCIOFF = 0x2
+ TCIOFLUSH = 0x2
+ TCION = 0x3
+ TCOFLUSH = 0x1
+ TCOOFF = 0x0
+ TCOON = 0x1
+ TCP_24DAYS_WORTH_OF_SLOWTICKS = 0x3f4800
+ TCP_ACLADD = 0x23
+ TCP_ACLBIND = 0x26
+ TCP_ACLCLEAR = 0x22
+ TCP_ACLDEL = 0x24
+ TCP_ACLDENY = 0x8
+ TCP_ACLFLUSH = 0x21
+ TCP_ACLGID = 0x1
+ TCP_ACLLS = 0x25
+ TCP_ACLSUBNET = 0x4
+ TCP_ACLUID = 0x2
+ TCP_CWND_DF = 0x16
+ TCP_CWND_IF = 0x15
+ TCP_DELAY_ACK_FIN = 0x2
+ TCP_DELAY_ACK_SYN = 0x1
+ TCP_FASTNAME = 0x101080a
+ TCP_KEEPCNT = 0x13
+ TCP_KEEPIDLE = 0x11
+ TCP_KEEPINTVL = 0x12
+ TCP_LSPRIV = 0x29
+ TCP_LUID = 0x20
+ TCP_MAXBURST = 0x8
+ TCP_MAXDF = 0x64
+ TCP_MAXIF = 0x64
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAXWINDOWSCALE = 0xe
+ TCP_MAX_SACK = 0x4
+ TCP_MSS = 0x5b4
+ TCP_NODELAY = 0x1
+ TCP_NODELAYACK = 0x14
+ TCP_NOREDUCE_CWND_EXIT_FRXMT = 0x19
+ TCP_NOREDUCE_CWND_IN_FRXMT = 0x18
+ TCP_NOTENTER_SSTART = 0x17
+ TCP_OPT = 0x19
+ TCP_RFC1323 = 0x4
+ TCP_SETPRIV = 0x27
+ TCP_STDURG = 0x10
+ TCP_TIMESTAMP_OPTLEN = 0xc
+ TCP_UNSETPRIV = 0x28
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETSF = 0x5404
+ TCSETSW = 0x5403
+ TCXONC = 0x540b
+ TIOC = 0x5400
+ TIOCCBRK = 0x2000747a
+ TIOCCDTR = 0x20007478
+ TIOCCONS = 0x80047462
+ TIOCEXCL = 0x2000740d
+ TIOCFLUSH = 0x80047410
+ TIOCGETC = 0x40067412
+ TIOCGETD = 0x40047400
+ TIOCGETP = 0x40067408
+ TIOCGLTC = 0x40067474
+ TIOCGPGRP = 0x40047477
+ TIOCGSID = 0x40047448
+ TIOCGSIZE = 0x40087468
+ TIOCGWINSZ = 0x40087468
+ TIOCHPCL = 0x20007402
+ TIOCLBIC = 0x8004747e
+ TIOCLBIS = 0x8004747f
+ TIOCLGET = 0x4004747c
+ TIOCLSET = 0x8004747d
+ TIOCMBIC = 0x8004746b
+ TIOCMBIS = 0x8004746c
+ TIOCMGET = 0x4004746a
+ TIOCMIWAIT = 0x80047464
+ TIOCMODG = 0x40047403
+ TIOCMODS = 0x80047404
+ TIOCMSET = 0x8004746d
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_RTS = 0x4
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x20007471
+ TIOCNXCL = 0x2000740e
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x80047470
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIOCREMOTE = 0x80047469
+ TIOCSBRK = 0x2000747b
+ TIOCSDTR = 0x20007479
+ TIOCSETC = 0x80067411
+ TIOCSETD = 0x80047401
+ TIOCSETN = 0x8006740a
+ TIOCSETP = 0x80067409
+ TIOCSLTC = 0x80067475
+ TIOCSPGRP = 0x80047476
+ TIOCSSIZE = 0x80087467
+ TIOCSTART = 0x2000746e
+ TIOCSTI = 0x80017472
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0x80087467
+ TIOCUCNTL = 0x80047466
+ TOSTOP = 0x10000
+ UTIME_NOW = -0x2
+ UTIME_OMIT = -0x3
+ VDISCRD = 0xc
+ VDSUSP = 0xa
+ VEOF = 0x4
+ VEOL = 0x5
+ VEOL2 = 0x6
+ VERASE = 0x2
+ VINTR = 0x0
+ VKILL = 0x3
+ VLNEXT = 0xe
+ VMIN = 0x4
+ VQUIT = 0x1
+ VREPRINT = 0xb
+ VSTART = 0x7
+ VSTOP = 0x8
+ VSTRT = 0x7
+ VSUSP = 0x9
+ VT0 = 0x0
+ VT1 = 0x8000
+ VTDELAY = 0x2000
+ VTDLY = 0x8000
+ VTIME = 0x5
+ VWERSE = 0xd
+ WPARSTART = 0x1
+ WPARSTOP = 0x2
+ WPARTTYNAME = "Global"
+ XCASE = 0x4
+ XTABS = 0xc00
+ _FDATAFLUSH = 0x2000000000
+)
+
+// Errors
+const (
+ E2BIG = syscall.Errno(0x7)
+ EACCES = syscall.Errno(0xd)
+ EADDRINUSE = syscall.Errno(0x43)
+ EADDRNOTAVAIL = syscall.Errno(0x44)
+ EAFNOSUPPORT = syscall.Errno(0x42)
+ EAGAIN = syscall.Errno(0xb)
+ EALREADY = syscall.Errno(0x38)
+ EBADF = syscall.Errno(0x9)
+ EBADMSG = syscall.Errno(0x78)
+ EBUSY = syscall.Errno(0x10)
+ ECANCELED = syscall.Errno(0x75)
+ ECHILD = syscall.Errno(0xa)
+ ECHRNG = syscall.Errno(0x25)
+ ECLONEME = syscall.Errno(0x52)
+ ECONNABORTED = syscall.Errno(0x48)
+ ECONNREFUSED = syscall.Errno(0x4f)
+ ECONNRESET = syscall.Errno(0x49)
+ ECORRUPT = syscall.Errno(0x59)
+ EDEADLK = syscall.Errno(0x2d)
+ EDESTADDREQ = syscall.Errno(0x3a)
+ EDESTADDRREQ = syscall.Errno(0x3a)
+ EDIST = syscall.Errno(0x35)
+ EDOM = syscall.Errno(0x21)
+ EDQUOT = syscall.Errno(0x58)
+ EEXIST = syscall.Errno(0x11)
+ EFAULT = syscall.Errno(0xe)
+ EFBIG = syscall.Errno(0x1b)
+ EFORMAT = syscall.Errno(0x30)
+ EHOSTDOWN = syscall.Errno(0x50)
+ EHOSTUNREACH = syscall.Errno(0x51)
+ EIDRM = syscall.Errno(0x24)
+ EILSEQ = syscall.Errno(0x74)
+ EINPROGRESS = syscall.Errno(0x37)
+ EINTR = syscall.Errno(0x4)
+ EINVAL = syscall.Errno(0x16)
+ EIO = syscall.Errno(0x5)
+ EISCONN = syscall.Errno(0x4b)
+ EISDIR = syscall.Errno(0x15)
+ EL2HLT = syscall.Errno(0x2c)
+ EL2NSYNC = syscall.Errno(0x26)
+ EL3HLT = syscall.Errno(0x27)
+ EL3RST = syscall.Errno(0x28)
+ ELNRNG = syscall.Errno(0x29)
+ ELOOP = syscall.Errno(0x55)
+ EMEDIA = syscall.Errno(0x6e)
+ EMFILE = syscall.Errno(0x18)
+ EMLINK = syscall.Errno(0x1f)
+ EMSGSIZE = syscall.Errno(0x3b)
+ EMULTIHOP = syscall.Errno(0x7d)
+ ENAMETOOLONG = syscall.Errno(0x56)
+ ENETDOWN = syscall.Errno(0x45)
+ ENETRESET = syscall.Errno(0x47)
+ ENETUNREACH = syscall.Errno(0x46)
+ ENFILE = syscall.Errno(0x17)
+ ENOATTR = syscall.Errno(0x70)
+ ENOBUFS = syscall.Errno(0x4a)
+ ENOCONNECT = syscall.Errno(0x32)
+ ENOCSI = syscall.Errno(0x2b)
+ ENODATA = syscall.Errno(0x7a)
+ ENODEV = syscall.Errno(0x13)
+ ENOENT = syscall.Errno(0x2)
+ ENOEXEC = syscall.Errno(0x8)
+ ENOLCK = syscall.Errno(0x31)
+ ENOLINK = syscall.Errno(0x7e)
+ ENOMEM = syscall.Errno(0xc)
+ ENOMSG = syscall.Errno(0x23)
+ ENOPROTOOPT = syscall.Errno(0x3d)
+ ENOSPC = syscall.Errno(0x1c)
+ ENOSR = syscall.Errno(0x76)
+ ENOSTR = syscall.Errno(0x7b)
+ ENOSYS = syscall.Errno(0x6d)
+ ENOTBLK = syscall.Errno(0xf)
+ ENOTCONN = syscall.Errno(0x4c)
+ ENOTDIR = syscall.Errno(0x14)
+ ENOTEMPTY = syscall.Errno(0x11)
+ ENOTREADY = syscall.Errno(0x2e)
+ ENOTRECOVERABLE = syscall.Errno(0x5e)
+ ENOTRUST = syscall.Errno(0x72)
+ ENOTSOCK = syscall.Errno(0x39)
+ ENOTSUP = syscall.Errno(0x7c)
+ ENOTTY = syscall.Errno(0x19)
+ ENXIO = syscall.Errno(0x6)
+ EOPNOTSUPP = syscall.Errno(0x40)
+ EOVERFLOW = syscall.Errno(0x7f)
+ EOWNERDEAD = syscall.Errno(0x5f)
+ EPERM = syscall.Errno(0x1)
+ EPFNOSUPPORT = syscall.Errno(0x41)
+ EPIPE = syscall.Errno(0x20)
+ EPROCLIM = syscall.Errno(0x53)
+ EPROTO = syscall.Errno(0x79)
+ EPROTONOSUPPORT = syscall.Errno(0x3e)
+ EPROTOTYPE = syscall.Errno(0x3c)
+ ERANGE = syscall.Errno(0x22)
+ EREMOTE = syscall.Errno(0x5d)
+ ERESTART = syscall.Errno(0x52)
+ EROFS = syscall.Errno(0x1e)
+ ESAD = syscall.Errno(0x71)
+ ESHUTDOWN = syscall.Errno(0x4d)
+ ESOCKTNOSUPPORT = syscall.Errno(0x3f)
+ ESOFT = syscall.Errno(0x6f)
+ ESPIPE = syscall.Errno(0x1d)
+ ESRCH = syscall.Errno(0x3)
+ ESTALE = syscall.Errno(0x34)
+ ESYSERROR = syscall.Errno(0x5a)
+ ETIME = syscall.Errno(0x77)
+ ETIMEDOUT = syscall.Errno(0x4e)
+ ETOOMANYREFS = syscall.Errno(0x73)
+ ETXTBSY = syscall.Errno(0x1a)
+ EUNATCH = syscall.Errno(0x2a)
+ EUSERS = syscall.Errno(0x54)
+ EWOULDBLOCK = syscall.Errno(0xb)
+ EWRPROTECT = syscall.Errno(0x2f)
+ EXDEV = syscall.Errno(0x12)
+)
+
+// Signals
+const (
+ SIGABRT = syscall.Signal(0x6)
+ SIGAIO = syscall.Signal(0x17)
+ SIGALRM = syscall.Signal(0xe)
+ SIGALRM1 = syscall.Signal(0x26)
+ SIGBUS = syscall.Signal(0xa)
+ SIGCAPI = syscall.Signal(0x31)
+ SIGCHLD = syscall.Signal(0x14)
+ SIGCLD = syscall.Signal(0x14)
+ SIGCONT = syscall.Signal(0x13)
+ SIGCPUFAIL = syscall.Signal(0x3b)
+ SIGDANGER = syscall.Signal(0x21)
+ SIGEMT = syscall.Signal(0x7)
+ SIGFPE = syscall.Signal(0x8)
+ SIGGRANT = syscall.Signal(0x3c)
+ SIGHUP = syscall.Signal(0x1)
+ SIGILL = syscall.Signal(0x4)
+ SIGINT = syscall.Signal(0x2)
+ SIGIO = syscall.Signal(0x17)
+ SIGIOINT = syscall.Signal(0x10)
+ SIGIOT = syscall.Signal(0x6)
+ SIGKAP = syscall.Signal(0x3c)
+ SIGKILL = syscall.Signal(0x9)
+ SIGLOST = syscall.Signal(0x6)
+ SIGMAX = syscall.Signal(0x3f)
+ SIGMAX32 = syscall.Signal(0x3f)
+ SIGMIGRATE = syscall.Signal(0x23)
+ SIGMSG = syscall.Signal(0x1b)
+ SIGPIPE = syscall.Signal(0xd)
+ SIGPOLL = syscall.Signal(0x17)
+ SIGPRE = syscall.Signal(0x24)
+ SIGPROF = syscall.Signal(0x20)
+ SIGPTY = syscall.Signal(0x17)
+ SIGPWR = syscall.Signal(0x1d)
+ SIGQUIT = syscall.Signal(0x3)
+ SIGRECONFIG = syscall.Signal(0x3a)
+ SIGRETRACT = syscall.Signal(0x3d)
+ SIGSAK = syscall.Signal(0x3f)
+ SIGSEGV = syscall.Signal(0xb)
+ SIGSOUND = syscall.Signal(0x3e)
+ SIGSTOP = syscall.Signal(0x11)
+ SIGSYS = syscall.Signal(0xc)
+ SIGSYSERROR = syscall.Signal(0x30)
+ SIGTALRM = syscall.Signal(0x26)
+ SIGTERM = syscall.Signal(0xf)
+ SIGTRAP = syscall.Signal(0x5)
+ SIGTSTP = syscall.Signal(0x12)
+ SIGTTIN = syscall.Signal(0x15)
+ SIGTTOU = syscall.Signal(0x16)
+ SIGURG = syscall.Signal(0x10)
+ SIGUSR1 = syscall.Signal(0x1e)
+ SIGUSR2 = syscall.Signal(0x1f)
+ SIGVIRT = syscall.Signal(0x25)
+ SIGVTALRM = syscall.Signal(0x22)
+ SIGWAITING = syscall.Signal(0x27)
+ SIGWINCH = syscall.Signal(0x1c)
+ SIGXCPU = syscall.Signal(0x18)
+ SIGXFSZ = syscall.Signal(0x19)
+)
+
+// Error table
+var errorList = [...]struct {
+ num syscall.Errno
+ name string
+ desc string
+}{
+ {1, "EPERM", "not owner"},
+ {2, "ENOENT", "no such file or directory"},
+ {3, "ESRCH", "no such process"},
+ {4, "EINTR", "interrupted system call"},
+ {5, "EIO", "I/O error"},
+ {6, "ENXIO", "no such device or address"},
+ {7, "E2BIG", "arg list too long"},
+ {8, "ENOEXEC", "exec format error"},
+ {9, "EBADF", "bad file number"},
+ {10, "ECHILD", "no child processes"},
+ {11, "EWOULDBLOCK", "resource temporarily unavailable"},
+ {12, "ENOMEM", "not enough space"},
+ {13, "EACCES", "permission denied"},
+ {14, "EFAULT", "bad address"},
+ {15, "ENOTBLK", "block device required"},
+ {16, "EBUSY", "device busy"},
+ {17, "ENOTEMPTY", "file exists"},
+ {18, "EXDEV", "cross-device link"},
+ {19, "ENODEV", "no such device"},
+ {20, "ENOTDIR", "not a directory"},
+ {21, "EISDIR", "is a directory"},
+ {22, "EINVAL", "invalid argument"},
+ {23, "ENFILE", "file table overflow"},
+ {24, "EMFILE", "too many open files"},
+ {25, "ENOTTY", "not a typewriter"},
+ {26, "ETXTBSY", "text file busy"},
+ {27, "EFBIG", "file too large"},
+ {28, "ENOSPC", "no space left on device"},
+ {29, "ESPIPE", "illegal seek"},
+ {30, "EROFS", "read-only file system"},
+ {31, "EMLINK", "too many links"},
+ {32, "EPIPE", "broken pipe"},
+ {33, "EDOM", "argument out of domain"},
+ {34, "ERANGE", "result too large"},
+ {35, "ENOMSG", "no message of desired type"},
+ {36, "EIDRM", "identifier removed"},
+ {37, "ECHRNG", "channel number out of range"},
+ {38, "EL2NSYNC", "level 2 not synchronized"},
+ {39, "EL3HLT", "level 3 halted"},
+ {40, "EL3RST", "level 3 reset"},
+ {41, "ELNRNG", "link number out of range"},
+ {42, "EUNATCH", "protocol driver not attached"},
+ {43, "ENOCSI", "no CSI structure available"},
+ {44, "EL2HLT", "level 2 halted"},
+ {45, "EDEADLK", "deadlock condition if locked"},
+ {46, "ENOTREADY", "device not ready"},
+ {47, "EWRPROTECT", "write-protected media"},
+ {48, "EFORMAT", "unformatted or incompatible media"},
+ {49, "ENOLCK", "no locks available"},
+ {50, "ENOCONNECT", "cannot Establish Connection"},
+ {52, "ESTALE", "missing file or filesystem"},
+ {53, "EDIST", "requests blocked by Administrator"},
+ {55, "EINPROGRESS", "operation now in progress"},
+ {56, "EALREADY", "operation already in progress"},
+ {57, "ENOTSOCK", "socket operation on non-socket"},
+ {58, "EDESTADDREQ", "destination address required"},
+ {59, "EMSGSIZE", "message too long"},
+ {60, "EPROTOTYPE", "protocol wrong type for socket"},
+ {61, "ENOPROTOOPT", "protocol not available"},
+ {62, "EPROTONOSUPPORT", "protocol not supported"},
+ {63, "ESOCKTNOSUPPORT", "socket type not supported"},
+ {64, "EOPNOTSUPP", "operation not supported on socket"},
+ {65, "EPFNOSUPPORT", "protocol family not supported"},
+ {66, "EAFNOSUPPORT", "addr family not supported by protocol"},
+ {67, "EADDRINUSE", "address already in use"},
+ {68, "EADDRNOTAVAIL", "can't assign requested address"},
+ {69, "ENETDOWN", "network is down"},
+ {70, "ENETUNREACH", "network is unreachable"},
+ {71, "ENETRESET", "network dropped connection on reset"},
+ {72, "ECONNABORTED", "software caused connection abort"},
+ {73, "ECONNRESET", "connection reset by peer"},
+ {74, "ENOBUFS", "no buffer space available"},
+ {75, "EISCONN", "socket is already connected"},
+ {76, "ENOTCONN", "socket is not connected"},
+ {77, "ESHUTDOWN", "can't send after socket shutdown"},
+ {78, "ETIMEDOUT", "connection timed out"},
+ {79, "ECONNREFUSED", "connection refused"},
+ {80, "EHOSTDOWN", "host is down"},
+ {81, "EHOSTUNREACH", "no route to host"},
+ {82, "ERESTART", "restart the system call"},
+ {83, "EPROCLIM", "too many processes"},
+ {84, "EUSERS", "too many users"},
+ {85, "ELOOP", "too many levels of symbolic links"},
+ {86, "ENAMETOOLONG", "file name too long"},
+ {88, "EDQUOT", "disk quota exceeded"},
+ {89, "ECORRUPT", "invalid file system control data detected"},
+ {90, "ESYSERROR", "for future use "},
+ {93, "EREMOTE", "item is not local to host"},
+ {94, "ENOTRECOVERABLE", "state not recoverable "},
+ {95, "EOWNERDEAD", "previous owner died "},
+ {109, "ENOSYS", "function not implemented"},
+ {110, "EMEDIA", "media surface error"},
+ {111, "ESOFT", "I/O completed, but needs relocation"},
+ {112, "ENOATTR", "no attribute found"},
+ {113, "ESAD", "security Authentication Denied"},
+ {114, "ENOTRUST", "not a Trusted Program"},
+ {115, "ETOOMANYREFS", "too many references: can't splice"},
+ {116, "EILSEQ", "invalid wide character"},
+ {117, "ECANCELED", "asynchronous I/O cancelled"},
+ {118, "ENOSR", "out of STREAMS resources"},
+ {119, "ETIME", "system call timed out"},
+ {120, "EBADMSG", "next message has wrong type"},
+ {121, "EPROTO", "error in protocol"},
+ {122, "ENODATA", "no message on stream head read q"},
+ {123, "ENOSTR", "fd not associated with a stream"},
+ {124, "ENOTSUP", "unsupported attribute value"},
+ {125, "EMULTIHOP", "multihop is not allowed"},
+ {126, "ENOLINK", "the server link has been severed"},
+ {127, "EOVERFLOW", "value too large to be stored in data type"},
+}
+
+// Signal table
+var signalList = [...]struct {
+ num syscall.Signal
+ name string
+ desc string
+}{
+ {1, "SIGHUP", "hangup"},
+ {2, "SIGINT", "interrupt"},
+ {3, "SIGQUIT", "quit"},
+ {4, "SIGILL", "illegal instruction"},
+ {5, "SIGTRAP", "trace/BPT trap"},
+ {6, "SIGIOT", "IOT/Abort trap"},
+ {7, "SIGEMT", "EMT trap"},
+ {8, "SIGFPE", "floating point exception"},
+ {9, "SIGKILL", "killed"},
+ {10, "SIGBUS", "bus error"},
+ {11, "SIGSEGV", "segmentation fault"},
+ {12, "SIGSYS", "bad system call"},
+ {13, "SIGPIPE", "broken pipe"},
+ {14, "SIGALRM", "alarm clock"},
+ {15, "SIGTERM", "terminated"},
+ {16, "SIGURG", "urgent I/O condition"},
+ {17, "SIGSTOP", "stopped (signal)"},
+ {18, "SIGTSTP", "stopped"},
+ {19, "SIGCONT", "continued"},
+ {20, "SIGCHLD", "child exited"},
+ {21, "SIGTTIN", "stopped (tty input)"},
+ {22, "SIGTTOU", "stopped (tty output)"},
+ {23, "SIGIO", "I/O possible/complete"},
+ {24, "SIGXCPU", "cputime limit exceeded"},
+ {25, "SIGXFSZ", "filesize limit exceeded"},
+ {27, "SIGMSG", "input device data"},
+ {28, "SIGWINCH", "window size changes"},
+ {29, "SIGPWR", "power-failure"},
+ {30, "SIGUSR1", "user defined signal 1"},
+ {31, "SIGUSR2", "user defined signal 2"},
+ {32, "SIGPROF", "profiling timer expired"},
+ {33, "SIGDANGER", "paging space low"},
+ {34, "SIGVTALRM", "virtual timer expired"},
+ {35, "SIGMIGRATE", "signal 35"},
+ {36, "SIGPRE", "signal 36"},
+ {37, "SIGVIRT", "signal 37"},
+ {38, "SIGTALRM", "signal 38"},
+ {39, "SIGWAITING", "signal 39"},
+ {48, "SIGSYSERROR", "signal 48"},
+ {49, "SIGCAPI", "signal 49"},
+ {58, "SIGRECONFIG", "signal 58"},
+ {59, "SIGCPUFAIL", "CPU Failure Predicted"},
+ {60, "SIGKAP", "monitor mode granted"},
+ {61, "SIGRETRACT", "monitor mode retracted"},
+ {62, "SIGSOUND", "sound completed"},
+ {63, "SIGSAK", "secure attention"},
+}
diff --git a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
new file mode 100644
index 000000000..ed04fd1b7
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
@@ -0,0 +1,1373 @@
+// mkerrors.sh -maix64
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build ppc64,aix
+
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs -- -maix64 _const.go
+
+package unix
+
+import "syscall"
+
+const (
+ AF_APPLETALK = 0x10
+ AF_BYPASS = 0x19
+ AF_CCITT = 0xa
+ AF_CHAOS = 0x5
+ AF_DATAKIT = 0x9
+ AF_DECnet = 0xc
+ AF_DLI = 0xd
+ AF_ECMA = 0x8
+ AF_HYLINK = 0xf
+ AF_IMPLINK = 0x3
+ AF_INET = 0x2
+ AF_INET6 = 0x18
+ AF_INTF = 0x14
+ AF_ISO = 0x7
+ AF_LAT = 0xe
+ AF_LINK = 0x12
+ AF_LOCAL = 0x1
+ AF_MAX = 0x1e
+ AF_NDD = 0x17
+ AF_NETWARE = 0x16
+ AF_NS = 0x6
+ AF_OSI = 0x7
+ AF_PUP = 0x4
+ AF_RIF = 0x15
+ AF_ROUTE = 0x11
+ AF_SNA = 0xb
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ ALTWERASE = 0x400000
+ ARPHRD_802_3 = 0x6
+ ARPHRD_802_5 = 0x6
+ ARPHRD_ETHER = 0x1
+ ARPHRD_FDDI = 0x1
+ B0 = 0x0
+ B110 = 0x3
+ B1200 = 0x9
+ B134 = 0x4
+ B150 = 0x5
+ B1800 = 0xa
+ B19200 = 0xe
+ B200 = 0x6
+ B2400 = 0xb
+ B300 = 0x7
+ B38400 = 0xf
+ B4800 = 0xc
+ B50 = 0x1
+ B600 = 0x8
+ B75 = 0x2
+ B9600 = 0xd
+ BRKINT = 0x2
+ BS0 = 0x0
+ BS1 = 0x1000
+ BSDLY = 0x1000
+ CAP_AACCT = 0x6
+ CAP_ARM_APPLICATION = 0x5
+ CAP_BYPASS_RAC_VMM = 0x3
+ CAP_CLEAR = 0x0
+ CAP_CREDENTIALS = 0x7
+ CAP_EFFECTIVE = 0x1
+ CAP_EWLM_AGENT = 0x4
+ CAP_INHERITABLE = 0x2
+ CAP_MAXIMUM = 0x7
+ CAP_NUMA_ATTACH = 0x2
+ CAP_PERMITTED = 0x3
+ CAP_PROPAGATE = 0x1
+ CAP_PROPOGATE = 0x1
+ CAP_SET = 0x1
+ CBAUD = 0xf
+ CFLUSH = 0xf
+ CIBAUD = 0xf0000
+ CLOCAL = 0x800
+ CLOCK_MONOTONIC = 0xa
+ CLOCK_PROCESS_CPUTIME_ID = 0xb
+ CLOCK_REALTIME = 0x9
+ CLOCK_THREAD_CPUTIME_ID = 0xc
+ CR0 = 0x0
+ CR1 = 0x100
+ CR2 = 0x200
+ CR3 = 0x300
+ CRDLY = 0x300
+ CREAD = 0x80
+ CS5 = 0x0
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIOCGIFCONF = -0x3fef96dc
+ CSIZE = 0x30
+ CSMAP_DIR = "/usr/lib/nls/csmap/"
+ CSTART = '\021'
+ CSTOP = '\023'
+ CSTOPB = 0x40
+ CSUSP = 0x1a
+ ECHO = 0x8
+ ECHOCTL = 0x20000
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x80000
+ ECHONL = 0x40
+ ECHOPRT = 0x40000
+ ECH_ICMPID = 0x2
+ ETHERNET_CSMACD = 0x6
+ EVENP = 0x80
+ EXCONTINUE = 0x0
+ EXDLOK = 0x3
+ EXIO = 0x2
+ EXPGIO = 0x0
+ EXRESUME = 0x2
+ EXRETURN = 0x1
+ EXSIG = 0x4
+ EXTA = 0xe
+ EXTB = 0xf
+ EXTRAP = 0x1
+ EYEC_RTENTRYA = 0x257274656e747241
+ EYEC_RTENTRYF = 0x257274656e747246
+ E_ACC = 0x0
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0xfffe
+ FF0 = 0x0
+ FF1 = 0x2000
+ FFDLY = 0x2000
+ FLUSHBAND = 0x40
+ FLUSHLOW = 0x8
+ FLUSHO = 0x100000
+ FLUSHR = 0x1
+ FLUSHRW = 0x3
+ FLUSHW = 0x2
+ F_CLOSEM = 0xa
+ F_DUP2FD = 0xe
+ F_DUPFD = 0x0
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLK = 0xb
+ F_GETLK64 = 0xb
+ F_GETOWN = 0x8
+ F_LOCK = 0x1
+ F_OK = 0x0
+ F_RDLCK = 0x1
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLK = 0xc
+ F_SETLK64 = 0xc
+ F_SETLKW = 0xd
+ F_SETLKW64 = 0xd
+ F_SETOWN = 0x9
+ F_TEST = 0x3
+ F_TLOCK = 0x2
+ F_TSTLK = 0xf
+ F_ULOCK = 0x0
+ F_UNLCK = 0x3
+ F_WRLCK = 0x2
+ HUPCL = 0x400
+ IBSHIFT = 0x10
+ ICANON = 0x2
+ ICMP6_FILTER = 0x26
+ ICMP6_SEC_SEND_DEL = 0x46
+ ICMP6_SEC_SEND_GET = 0x47
+ ICMP6_SEC_SEND_SET = 0x44
+ ICMP6_SEC_SEND_SET_CGA_ADDR = 0x45
+ ICRNL = 0x100
+ IEXTEN = 0x200000
+ IFA_FIRSTALIAS = 0x2000
+ IFA_ROUTE = 0x1
+ IFF_64BIT = 0x4000000
+ IFF_ALLCAST = 0x20000
+ IFF_ALLMULTI = 0x200
+ IFF_BPF = 0x8000000
+ IFF_BRIDGE = 0x40000
+ IFF_BROADCAST = 0x2
+ IFF_CANTCHANGE = 0x80c52
+ IFF_CHECKSUM_OFFLOAD = 0x10000000
+ IFF_D1 = 0x8000
+ IFF_D2 = 0x4000
+ IFF_D3 = 0x2000
+ IFF_D4 = 0x1000
+ IFF_DEBUG = 0x4
+ IFF_DEVHEALTH = 0x4000
+ IFF_DO_HW_LOOPBACK = 0x10000
+ IFF_GROUP_ROUTING = 0x2000000
+ IFF_IFBUFMGT = 0x800000
+ IFF_LINK0 = 0x100000
+ IFF_LINK1 = 0x200000
+ IFF_LINK2 = 0x400000
+ IFF_LOOPBACK = 0x8
+ IFF_MULTICAST = 0x80000
+ IFF_NOARP = 0x80
+ IFF_NOECHO = 0x800
+ IFF_NOTRAILERS = 0x20
+ IFF_OACTIVE = 0x400
+ IFF_POINTOPOINT = 0x10
+ IFF_PROMISC = 0x100
+ IFF_PSEG = 0x40000000
+ IFF_RUNNING = 0x40
+ IFF_SIMPLEX = 0x800
+ IFF_SNAP = 0x8000
+ IFF_TCP_DISABLE_CKSUM = 0x20000000
+ IFF_TCP_NOCKSUM = 0x1000000
+ IFF_UP = 0x1
+ IFF_VIPA = 0x80000000
+ IFNAMSIZ = 0x10
+ IFO_FLUSH = 0x1
+ IFT_1822 = 0x2
+ IFT_AAL5 = 0x31
+ IFT_ARCNET = 0x23
+ IFT_ARCNETPLUS = 0x24
+ IFT_ATM = 0x25
+ IFT_CEPT = 0x13
+ IFT_CLUSTER = 0x3e
+ IFT_DS3 = 0x1e
+ IFT_EON = 0x19
+ IFT_ETHER = 0x6
+ IFT_FCS = 0x3a
+ IFT_FDDI = 0xf
+ IFT_FRELAY = 0x20
+ IFT_FRELAYDCE = 0x2c
+ IFT_GIFTUNNEL = 0x3c
+ IFT_HDH1822 = 0x3
+ IFT_HF = 0x3d
+ IFT_HIPPI = 0x2f
+ IFT_HSSI = 0x2e
+ IFT_HY = 0xe
+ IFT_IB = 0xc7
+ IFT_ISDNBASIC = 0x14
+ IFT_ISDNPRIMARY = 0x15
+ IFT_ISO88022LLC = 0x29
+ IFT_ISO88023 = 0x7
+ IFT_ISO88024 = 0x8
+ IFT_ISO88025 = 0x9
+ IFT_ISO88026 = 0xa
+ IFT_LAPB = 0x10
+ IFT_LOCALTALK = 0x2a
+ IFT_LOOP = 0x18
+ IFT_MIOX25 = 0x26
+ IFT_MODEM = 0x30
+ IFT_NSIP = 0x1b
+ IFT_OTHER = 0x1
+ IFT_P10 = 0xc
+ IFT_P80 = 0xd
+ IFT_PARA = 0x22
+ IFT_PPP = 0x17
+ IFT_PROPMUX = 0x36
+ IFT_PROPVIRTUAL = 0x35
+ IFT_PTPSERIAL = 0x16
+ IFT_RS232 = 0x21
+ IFT_SDLC = 0x11
+ IFT_SIP = 0x1f
+ IFT_SLIP = 0x1c
+ IFT_SMDSDXI = 0x2b
+ IFT_SMDSICIP = 0x34
+ IFT_SN = 0x38
+ IFT_SONET = 0x27
+ IFT_SONETPATH = 0x32
+ IFT_SONETVT = 0x33
+ IFT_SP = 0x39
+ IFT_STARLAN = 0xb
+ IFT_T1 = 0x12
+ IFT_TUNNEL = 0x3b
+ IFT_ULTRA = 0x1d
+ IFT_V35 = 0x2d
+ IFT_VIPA = 0x37
+ IFT_X25 = 0x5
+ IFT_X25DDN = 0x4
+ IFT_X25PLE = 0x28
+ IFT_XETHER = 0x1a
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x10000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_CLASSA_HOST = 0xffffff
+ IN_CLASSA_MAX = 0x80
+ IN_CLASSA_NET = 0xff000000
+ IN_CLASSA_NSHIFT = 0x18
+ IN_CLASSB_HOST = 0xffff
+ IN_CLASSB_MAX = 0x10000
+ IN_CLASSB_NET = 0xffff0000
+ IN_CLASSB_NSHIFT = 0x10
+ IN_CLASSC_HOST = 0xff
+ IN_CLASSC_NET = 0xffffff00
+ IN_CLASSC_NSHIFT = 0x8
+ IN_CLASSD_HOST = 0xfffffff
+ IN_CLASSD_NET = 0xf0000000
+ IN_CLASSD_NSHIFT = 0x1c
+ IN_LOOPBACKNET = 0x7f
+ IN_USE = 0x1
+ IPPROTO_AH = 0x33
+ IPPROTO_BIP = 0x53
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_EON = 0x50
+ IPPROTO_ESP = 0x32
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GGP = 0x3
+ IPPROTO_GIF = 0x8c
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IP = 0x0
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_LOCAL = 0x3f
+ IPPROTO_MAX = 0x100
+ IPPROTO_MH = 0x87
+ IPPROTO_NONE = 0x3b
+ IPPROTO_PUP = 0xc
+ IPPROTO_QOS = 0x2d
+ IPPROTO_RAW = 0xff
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_SCTP = 0x84
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_UDP = 0x11
+ IPV6_ADDRFORM = 0x16
+ IPV6_ADDR_PREFERENCES = 0x4a
+ IPV6_ADD_MEMBERSHIP = 0xc
+ IPV6_AIXRAWSOCKET = 0x39
+ IPV6_CHECKSUM = 0x27
+ IPV6_DONTFRAG = 0x2d
+ IPV6_DROP_MEMBERSHIP = 0xd
+ IPV6_DSTOPTS = 0x36
+ IPV6_FLOWINFO_FLOWLABEL = 0xffffff
+ IPV6_FLOWINFO_PRIFLOW = 0xfffffff
+ IPV6_FLOWINFO_PRIORITY = 0xf000000
+ IPV6_FLOWINFO_SRFLAG = 0x10000000
+ IPV6_FLOWINFO_VERSION = 0xf0000000
+ IPV6_HOPLIMIT = 0x28
+ IPV6_HOPOPTS = 0x34
+ IPV6_JOIN_GROUP = 0xc
+ IPV6_LEAVE_GROUP = 0xd
+ IPV6_MIPDSTOPTS = 0x36
+ IPV6_MULTICAST_HOPS = 0xa
+ IPV6_MULTICAST_IF = 0x9
+ IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_NOPROBE = 0x1c
+ IPV6_PATHMTU = 0x2e
+ IPV6_PKTINFO = 0x21
+ IPV6_PKTOPTIONS = 0x24
+ IPV6_PRIORITY_10 = 0xa000000
+ IPV6_PRIORITY_11 = 0xb000000
+ IPV6_PRIORITY_12 = 0xc000000
+ IPV6_PRIORITY_13 = 0xd000000
+ IPV6_PRIORITY_14 = 0xe000000
+ IPV6_PRIORITY_15 = 0xf000000
+ IPV6_PRIORITY_8 = 0x8000000
+ IPV6_PRIORITY_9 = 0x9000000
+ IPV6_PRIORITY_BULK = 0x4000000
+ IPV6_PRIORITY_CONTROL = 0x7000000
+ IPV6_PRIORITY_FILLER = 0x1000000
+ IPV6_PRIORITY_INTERACTIVE = 0x6000000
+ IPV6_PRIORITY_RESERVED1 = 0x3000000
+ IPV6_PRIORITY_RESERVED2 = 0x5000000
+ IPV6_PRIORITY_UNATTENDED = 0x2000000
+ IPV6_PRIORITY_UNCHARACTERIZED = 0x0
+ IPV6_RECVDSTOPTS = 0x38
+ IPV6_RECVHOPLIMIT = 0x29
+ IPV6_RECVHOPOPTS = 0x35
+ IPV6_RECVHOPS = 0x22
+ IPV6_RECVIF = 0x1e
+ IPV6_RECVPATHMTU = 0x2f
+ IPV6_RECVPKTINFO = 0x23
+ IPV6_RECVRTHDR = 0x33
+ IPV6_RECVSRCRT = 0x1d
+ IPV6_RECVTCLASS = 0x2a
+ IPV6_RTHDR = 0x32
+ IPV6_RTHDRDSTOPTS = 0x37
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_RTHDR_TYPE_2 = 0x2
+ IPV6_SENDIF = 0x1f
+ IPV6_SRFLAG_LOOSE = 0x0
+ IPV6_SRFLAG_STRICT = 0x10000000
+ IPV6_TCLASS = 0x2b
+ IPV6_TOKEN_LENGTH = 0x40
+ IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2c
+ IPV6_V6ONLY = 0x25
+ IPV6_VERSION = 0x60000000
+ IP_ADDRFORM = 0x16
+ IP_ADD_MEMBERSHIP = 0xc
+ IP_ADD_SOURCE_MEMBERSHIP = 0x3c
+ IP_BLOCK_SOURCE = 0x3a
+ IP_BROADCAST_IF = 0x10
+ IP_CACHE_LINE_SIZE = 0x80
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DHCPMODE = 0x11
+ IP_DONTFRAG = 0x19
+ IP_DROP_MEMBERSHIP = 0xd
+ IP_DROP_SOURCE_MEMBERSHIP = 0x3d
+ IP_FINDPMTU = 0x1a
+ IP_HDRINCL = 0x2
+ IP_INC_MEMBERSHIPS = 0x14
+ IP_INIT_MEMBERSHIP = 0x14
+ IP_MAXPACKET = 0xffff
+ IP_MF = 0x2000
+ IP_MSS = 0x240
+ IP_MULTICAST_HOPS = 0xa
+ IP_MULTICAST_IF = 0x9
+ IP_MULTICAST_LOOP = 0xb
+ IP_MULTICAST_TTL = 0xa
+ IP_OPT = 0x1b
+ IP_OPTIONS = 0x1
+ IP_PMTUAGE = 0x1b
+ IP_RECVDSTADDR = 0x7
+ IP_RECVIF = 0x14
+ IP_RECVIFINFO = 0xf
+ IP_RECVINTERFACE = 0x20
+ IP_RECVMACHDR = 0xe
+ IP_RECVOPTS = 0x5
+ IP_RECVRETOPTS = 0x6
+ IP_RECVTTL = 0x22
+ IP_RETOPTS = 0x8
+ IP_SOURCE_FILTER = 0x48
+ IP_TOS = 0x3
+ IP_TTL = 0x4
+ IP_UNBLOCK_SOURCE = 0x3b
+ IP_UNICAST_HOPS = 0x4
+ ISIG = 0x1
+ ISTRIP = 0x20
+ IUCLC = 0x800
+ IXANY = 0x1000
+ IXOFF = 0x400
+ IXON = 0x200
+ I_FLUSH = 0x20005305
+ LNOFLSH = 0x8000
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ MADV_DONTNEED = 0x4
+ MADV_NORMAL = 0x0
+ MADV_RANDOM = 0x1
+ MADV_SEQUENTIAL = 0x2
+ MADV_SPACEAVAIL = 0x5
+ MADV_WILLNEED = 0x3
+ MAP_ANON = 0x10
+ MAP_ANONYMOUS = 0x10
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x100
+ MAP_PRIVATE = 0x2
+ MAP_SHARED = 0x1
+ MAP_TYPE = 0xf0
+ MAP_VARIABLE = 0x0
+ MCL_CURRENT = 0x100
+ MCL_FUTURE = 0x200
+ MSG_ANY = 0x4
+ MSG_ARGEXT = 0x400
+ MSG_BAND = 0x2
+ MSG_COMPAT = 0x8000
+ MSG_CTRUNC = 0x20
+ MSG_DONTROUTE = 0x4
+ MSG_EOR = 0x8
+ MSG_HIPRI = 0x1
+ MSG_MAXIOVLEN = 0x10
+ MSG_MPEG2 = 0x80
+ MSG_NONBLOCK = 0x4000
+ MSG_NOSIGNAL = 0x100
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_TRUNC = 0x10
+ MSG_WAITALL = 0x40
+ MSG_WAITFORONE = 0x200
+ MS_ASYNC = 0x10
+ MS_EINTR = 0x80
+ MS_INVALIDATE = 0x40
+ MS_PER_SEC = 0x3e8
+ MS_SYNC = 0x20
+ NL0 = 0x0
+ NL1 = 0x4000
+ NL2 = 0x8000
+ NL3 = 0xc000
+ NLDLY = 0x4000
+ NOFLSH = 0x80
+ NOFLUSH = 0x80000000
+ OCRNL = 0x8
+ OFDEL = 0x80
+ OFILL = 0x40
+ OLCUC = 0x2
+ ONLCR = 0x4
+ ONLRET = 0x20
+ ONOCR = 0x10
+ ONOEOT = 0x80000
+ OPOST = 0x1
+ OXTABS = 0x40000
+ O_ACCMODE = 0x23
+ O_APPEND = 0x8
+ O_CIO = 0x80
+ O_CIOR = 0x800000000
+ O_CLOEXEC = 0x800000
+ O_CREAT = 0x100
+ O_DEFER = 0x2000
+ O_DELAY = 0x4000
+ O_DIRECT = 0x8000000
+ O_DIRECTORY = 0x80000
+ O_DSYNC = 0x400000
+ O_EFSOFF = 0x400000000
+ O_EFSON = 0x200000000
+ O_EXCL = 0x400
+ O_EXEC = 0x20
+ O_LARGEFILE = 0x4000000
+ O_NDELAY = 0x8000
+ O_NOCACHE = 0x100000
+ O_NOCTTY = 0x800
+ O_NOFOLLOW = 0x1000000
+ O_NONBLOCK = 0x4
+ O_NONE = 0x3
+ O_NSHARE = 0x10000
+ O_RAW = 0x100000000
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_RSHARE = 0x1000
+ O_RSYNC = 0x200000
+ O_SEARCH = 0x20
+ O_SNAPSHOT = 0x40
+ O_SYNC = 0x10
+ O_TRUNC = 0x200
+ O_TTY_INIT = 0x0
+ O_WRONLY = 0x1
+ PARENB = 0x100
+ PAREXT = 0x100000
+ PARMRK = 0x8
+ PARODD = 0x200
+ PENDIN = 0x20000000
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROT_EXEC = 0x4
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ PR_64BIT = 0x20
+ PR_ADDR = 0x2
+ PR_ARGEXT = 0x400
+ PR_ATOMIC = 0x1
+ PR_CONNREQUIRED = 0x4
+ PR_FASTHZ = 0x5
+ PR_INP = 0x40
+ PR_INTRLEVEL = 0x8000
+ PR_MLS = 0x100
+ PR_MLS_1_LABEL = 0x200
+ PR_NOEOR = 0x4000
+ PR_RIGHTS = 0x10
+ PR_SLOWHZ = 0x2
+ PR_WANTRCVD = 0x8
+ RLIMIT_AS = 0x6
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x9
+ RLIMIT_RSS = 0x5
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = 0x7fffffffffffffff
+ RTAX_AUTHOR = 0x6
+ RTAX_BRD = 0x7
+ RTAX_DST = 0x0
+ RTAX_GATEWAY = 0x1
+ RTAX_GENMASK = 0x3
+ RTAX_IFA = 0x5
+ RTAX_IFP = 0x4
+ RTAX_MAX = 0x8
+ RTAX_NETMASK = 0x2
+ RTA_AUTHOR = 0x40
+ RTA_BRD = 0x80
+ RTA_DOWNSTREAM = 0x100
+ RTA_DST = 0x1
+ RTA_GATEWAY = 0x2
+ RTA_GENMASK = 0x8
+ RTA_IFA = 0x20
+ RTA_IFP = 0x10
+ RTA_NETMASK = 0x4
+ RTC_IA64 = 0x3
+ RTC_POWER = 0x1
+ RTC_POWER_PC = 0x2
+ RTF_ACTIVE_DGD = 0x1000000
+ RTF_BCE = 0x80000
+ RTF_BLACKHOLE = 0x1000
+ RTF_BROADCAST = 0x400000
+ RTF_BUL = 0x2000
+ RTF_CLONE = 0x10000
+ RTF_CLONED = 0x20000
+ RTF_CLONING = 0x100
+ RTF_DONE = 0x40
+ RTF_DYNAMIC = 0x10
+ RTF_FREE_IN_PROG = 0x4000000
+ RTF_GATEWAY = 0x2
+ RTF_HOST = 0x4
+ RTF_LLINFO = 0x400
+ RTF_LOCAL = 0x200000
+ RTF_MASK = 0x80
+ RTF_MODIFIED = 0x20
+ RTF_MULTICAST = 0x800000
+ RTF_PERMANENT6 = 0x8000000
+ RTF_PINNED = 0x100000
+ RTF_PROTO1 = 0x8000
+ RTF_PROTO2 = 0x4000
+ RTF_PROTO3 = 0x40000
+ RTF_REJECT = 0x8
+ RTF_SMALLMTU = 0x40000
+ RTF_STATIC = 0x800
+ RTF_STOPSRCH = 0x2000000
+ RTF_UNREACHABLE = 0x10000000
+ RTF_UP = 0x1
+ RTF_XRESOLVE = 0x200
+ RTM_ADD = 0x1
+ RTM_CHANGE = 0x3
+ RTM_DELADDR = 0xd
+ RTM_DELETE = 0x2
+ RTM_EXPIRE = 0xf
+ RTM_GET = 0x4
+ RTM_GETNEXT = 0x11
+ RTM_IFINFO = 0xe
+ RTM_LOCK = 0x8
+ RTM_LOSING = 0x5
+ RTM_MISS = 0x7
+ RTM_NEWADDR = 0xc
+ RTM_OLDADD = 0x9
+ RTM_OLDDEL = 0xa
+ RTM_REDIRECT = 0x6
+ RTM_RESOLVE = 0xb
+ RTM_RTLOST = 0x10
+ RTM_RTTUNIT = 0xf4240
+ RTM_SAMEADDR = 0x12
+ RTM_SET = 0x13
+ RTM_VERSION = 0x2
+ RTM_VERSION_GR = 0x4
+ RTM_VERSION_GR_COMPAT = 0x3
+ RTM_VERSION_POLICY = 0x5
+ RTM_VERSION_POLICY_EXT = 0x6
+ RTM_VERSION_POLICY_PRFN = 0x7
+ RTV_EXPIRE = 0x4
+ RTV_HOPCOUNT = 0x2
+ RTV_MTU = 0x1
+ RTV_RPIPE = 0x8
+ RTV_RTT = 0x40
+ RTV_RTTVAR = 0x80
+ RTV_SPIPE = 0x10
+ RTV_SSTHRESH = 0x20
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ RUSAGE_THREAD = 0x1
+ SCM_RIGHTS = 0x1
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIGMAX64 = 0xff
+ SIGQUEUE_MAX = 0x20
+ SIOCADDIFVIPA = 0x20006942
+ SIOCADDMTU = -0x7ffb9690
+ SIOCADDMULTI = -0x7fdf96cf
+ SIOCADDNETID = -0x7fd796a9
+ SIOCADDRT = -0x7fc78df6
+ SIOCAIFADDR = -0x7fbf96e6
+ SIOCATMARK = 0x40047307
+ SIOCDARP = -0x7fb396e0
+ SIOCDELIFVIPA = 0x20006943
+ SIOCDELMTU = -0x7ffb968f
+ SIOCDELMULTI = -0x7fdf96ce
+ SIOCDELPMTU = -0x7fd78ff6
+ SIOCDELRT = -0x7fc78df5
+ SIOCDIFADDR = -0x7fd796e7
+ SIOCDNETOPT = -0x3ffe9680
+ SIOCDX25XLATE = -0x7fd7969b
+ SIOCFIFADDR = -0x7fdf966d
+ SIOCGARP = -0x3fb396da
+ SIOCGETMTUS = 0x2000696f
+ SIOCGETSGCNT = -0x3feb8acc
+ SIOCGETVIFCNT = -0x3feb8acd
+ SIOCGHIWAT = 0x40047301
+ SIOCGIFADDR = -0x3fd796df
+ SIOCGIFADDRS = 0x2000698c
+ SIOCGIFBAUDRATE = -0x3fd79693
+ SIOCGIFBRDADDR = -0x3fd796dd
+ SIOCGIFCONF = -0x3fef96bb
+ SIOCGIFCONFGLOB = -0x3fef9670
+ SIOCGIFDSTADDR = -0x3fd796de
+ SIOCGIFFLAGS = -0x3fd796ef
+ SIOCGIFGIDLIST = 0x20006968
+ SIOCGIFHWADDR = -0x3fab966b
+ SIOCGIFMETRIC = -0x3fd796e9
+ SIOCGIFMTU = -0x3fd796aa
+ SIOCGIFNETMASK = -0x3fd796db
+ SIOCGIFOPTIONS = -0x3fd796d6
+ SIOCGISNO = -0x3fd79695
+ SIOCGLOADF = -0x3ffb967e
+ SIOCGLOWAT = 0x40047303
+ SIOCGNETOPT = -0x3ffe96a5
+ SIOCGNETOPT1 = -0x3fdf967f
+ SIOCGNMTUS = 0x2000696e
+ SIOCGPGRP = 0x40047309
+ SIOCGSIZIFCONF = 0x4004696a
+ SIOCGSRCFILTER = -0x3fe796cb
+ SIOCGTUNEPHASE = -0x3ffb9676
+ SIOCGX25XLATE = -0x3fd7969c
+ SIOCIFATTACH = -0x7fdf9699
+ SIOCIFDETACH = -0x7fdf969a
+ SIOCIFGETPKEY = -0x7fdf969b
+ SIOCIF_ATM_DARP = -0x7fdf9683
+ SIOCIF_ATM_DUMPARP = -0x7fdf9685
+ SIOCIF_ATM_GARP = -0x7fdf9682
+ SIOCIF_ATM_IDLE = -0x7fdf9686
+ SIOCIF_ATM_SARP = -0x7fdf9681
+ SIOCIF_ATM_SNMPARP = -0x7fdf9687
+ SIOCIF_ATM_SVC = -0x7fdf9684
+ SIOCIF_ATM_UBR = -0x7fdf9688
+ SIOCIF_DEVHEALTH = -0x7ffb966c
+ SIOCIF_IB_ARP_INCOMP = -0x7fdf9677
+ SIOCIF_IB_ARP_TIMER = -0x7fdf9678
+ SIOCIF_IB_CLEAR_PINFO = -0x3fdf966f
+ SIOCIF_IB_DEL_ARP = -0x7fdf967f
+ SIOCIF_IB_DEL_PINFO = -0x3fdf9670
+ SIOCIF_IB_DUMP_ARP = -0x7fdf9680
+ SIOCIF_IB_GET_ARP = -0x7fdf967e
+ SIOCIF_IB_GET_INFO = -0x3f879675
+ SIOCIF_IB_GET_STATS = -0x3f879672
+ SIOCIF_IB_NOTIFY_ADDR_REM = -0x3f87966a
+ SIOCIF_IB_RESET_STATS = -0x3f879671
+ SIOCIF_IB_RESIZE_CQ = -0x7fdf9679
+ SIOCIF_IB_SET_ARP = -0x7fdf967d
+ SIOCIF_IB_SET_PKEY = -0x7fdf967c
+ SIOCIF_IB_SET_PORT = -0x7fdf967b
+ SIOCIF_IB_SET_QKEY = -0x7fdf9676
+ SIOCIF_IB_SET_QSIZE = -0x7fdf967a
+ SIOCLISTIFVIPA = 0x20006944
+ SIOCSARP = -0x7fb396e2
+ SIOCSHIWAT = 0xffffffff80047300
+ SIOCSIFADDR = -0x7fd796f4
+ SIOCSIFADDRORI = -0x7fdb9673
+ SIOCSIFBRDADDR = -0x7fd796ed
+ SIOCSIFDSTADDR = -0x7fd796f2
+ SIOCSIFFLAGS = -0x7fd796f0
+ SIOCSIFGIDLIST = 0x20006969
+ SIOCSIFMETRIC = -0x7fd796e8
+ SIOCSIFMTU = -0x7fd796a8
+ SIOCSIFNETDUMP = -0x7fd796e4
+ SIOCSIFNETMASK = -0x7fd796ea
+ SIOCSIFOPTIONS = -0x7fd796d7
+ SIOCSIFSUBCHAN = -0x7fd796e5
+ SIOCSISNO = -0x7fd79694
+ SIOCSLOADF = -0x3ffb967d
+ SIOCSLOWAT = 0xffffffff80047302
+ SIOCSNETOPT = -0x7ffe96a6
+ SIOCSPGRP = 0xffffffff80047308
+ SIOCSX25XLATE = -0x7fd7969d
+ SOCK_CONN_DGRAM = 0x6
+ SOCK_DGRAM = 0x2
+ SOCK_RAW = 0x3
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0xffff
+ SOMAXCONN = 0x400
+ SO_ACCEPTCONN = 0x2
+ SO_AUDIT = 0x8000
+ SO_BROADCAST = 0x20
+ SO_CKSUMRECV = 0x800
+ SO_DEBUG = 0x1
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_KEEPALIVE = 0x8
+ SO_KERNACCEPT = 0x2000
+ SO_LINGER = 0x80
+ SO_NOMULTIPATH = 0x4000
+ SO_NOREUSEADDR = 0x1000
+ SO_OOBINLINE = 0x100
+ SO_PEERID = 0x1009
+ SO_RCVBUF = 0x1002
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_SNDBUF = 0x1001
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_TIMESTAMPNS = 0x100a
+ SO_TYPE = 0x1008
+ SO_USELOOPBACK = 0x40
+ SO_USE_IFBUFS = 0x400
+ S_BANDURG = 0x400
+ S_EMODFMT = 0x3c000000
+ S_ENFMT = 0x400
+ S_ERROR = 0x100
+ S_HANGUP = 0x200
+ S_HIPRI = 0x2
+ S_ICRYPTO = 0x80000
+ S_IEXEC = 0x40
+ S_IFBLK = 0x6000
+ S_IFCHR = 0x2000
+ S_IFDIR = 0x4000
+ S_IFIFO = 0x1000
+ S_IFJOURNAL = 0x10000
+ S_IFLNK = 0xa000
+ S_IFMPX = 0x2200
+ S_IFMT = 0xf000
+ S_IFPDIR = 0x4000000
+ S_IFPSDIR = 0x8000000
+ S_IFPSSDIR = 0xc000000
+ S_IFREG = 0x8000
+ S_IFSOCK = 0xc000
+ S_IFSYSEA = 0x30000000
+ S_INPUT = 0x1
+ S_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ S_ISUID = 0x800
+ S_ISVTX = 0x200
+ S_ITCB = 0x1000000
+ S_ITP = 0x800000
+ S_IWGRP = 0x10
+ S_IWOTH = 0x2
+ S_IWRITE = 0x80
+ S_IWUSR = 0x80
+ S_IXACL = 0x2000000
+ S_IXATTR = 0x40000
+ S_IXGRP = 0x8
+ S_IXINTERFACE = 0x100000
+ S_IXMOD = 0x40000000
+ S_IXOTH = 0x1
+ S_IXUSR = 0x40
+ S_MSG = 0x8
+ S_OUTPUT = 0x4
+ S_RDBAND = 0x20
+ S_RDNORM = 0x10
+ S_RESERVED1 = 0x20000
+ S_RESERVED2 = 0x200000
+ S_RESERVED3 = 0x400000
+ S_RESERVED4 = 0x80000000
+ S_RESFMT1 = 0x10000000
+ S_RESFMT10 = 0x34000000
+ S_RESFMT11 = 0x38000000
+ S_RESFMT12 = 0x3c000000
+ S_RESFMT2 = 0x14000000
+ S_RESFMT3 = 0x18000000
+ S_RESFMT4 = 0x1c000000
+ S_RESFMT5 = 0x20000000
+ S_RESFMT6 = 0x24000000
+ S_RESFMT7 = 0x28000000
+ S_RESFMT8 = 0x2c000000
+ S_WRBAND = 0x80
+ S_WRNORM = 0x40
+ TAB0 = 0x0
+ TAB1 = 0x400
+ TAB2 = 0x800
+ TAB3 = 0xc00
+ TABDLY = 0xc00
+ TCFLSH = 0x540c
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCIFLUSH = 0x0
+ TCIOFF = 0x2
+ TCIOFLUSH = 0x2
+ TCION = 0x3
+ TCOFLUSH = 0x1
+ TCOOFF = 0x0
+ TCOON = 0x1
+ TCP_24DAYS_WORTH_OF_SLOWTICKS = 0x3f4800
+ TCP_ACLADD = 0x23
+ TCP_ACLBIND = 0x26
+ TCP_ACLCLEAR = 0x22
+ TCP_ACLDEL = 0x24
+ TCP_ACLDENY = 0x8
+ TCP_ACLFLUSH = 0x21
+ TCP_ACLGID = 0x1
+ TCP_ACLLS = 0x25
+ TCP_ACLSUBNET = 0x4
+ TCP_ACLUID = 0x2
+ TCP_CWND_DF = 0x16
+ TCP_CWND_IF = 0x15
+ TCP_DELAY_ACK_FIN = 0x2
+ TCP_DELAY_ACK_SYN = 0x1
+ TCP_FASTNAME = 0x101080a
+ TCP_KEEPCNT = 0x13
+ TCP_KEEPIDLE = 0x11
+ TCP_KEEPINTVL = 0x12
+ TCP_LSPRIV = 0x29
+ TCP_LUID = 0x20
+ TCP_MAXBURST = 0x8
+ TCP_MAXDF = 0x64
+ TCP_MAXIF = 0x64
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAXWINDOWSCALE = 0xe
+ TCP_MAX_SACK = 0x4
+ TCP_MSS = 0x5b4
+ TCP_NODELAY = 0x1
+ TCP_NODELAYACK = 0x14
+ TCP_NOREDUCE_CWND_EXIT_FRXMT = 0x19
+ TCP_NOREDUCE_CWND_IN_FRXMT = 0x18
+ TCP_NOTENTER_SSTART = 0x17
+ TCP_OPT = 0x19
+ TCP_RFC1323 = 0x4
+ TCP_SETPRIV = 0x27
+ TCP_STDURG = 0x10
+ TCP_TIMESTAMP_OPTLEN = 0xc
+ TCP_UNSETPRIV = 0x28
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETSF = 0x5404
+ TCSETSW = 0x5403
+ TCXONC = 0x540b
+ TIOC = 0x5400
+ TIOCCBRK = 0x2000747a
+ TIOCCDTR = 0x20007478
+ TIOCCONS = 0xffffffff80047462
+ TIOCEXCL = 0x2000740d
+ TIOCFLUSH = 0xffffffff80047410
+ TIOCGETC = 0x40067412
+ TIOCGETD = 0x40047400
+ TIOCGETP = 0x40067408
+ TIOCGLTC = 0x40067474
+ TIOCGPGRP = 0x40047477
+ TIOCGSID = 0x40047448
+ TIOCGSIZE = 0x40087468
+ TIOCGWINSZ = 0x40087468
+ TIOCHPCL = 0x20007402
+ TIOCLBIC = 0xffffffff8004747e
+ TIOCLBIS = 0xffffffff8004747f
+ TIOCLGET = 0x4004747c
+ TIOCLSET = 0xffffffff8004747d
+ TIOCMBIC = 0xffffffff8004746b
+ TIOCMBIS = 0xffffffff8004746c
+ TIOCMGET = 0x4004746a
+ TIOCMIWAIT = 0xffffffff80047464
+ TIOCMODG = 0x40047403
+ TIOCMODS = 0xffffffff80047404
+ TIOCMSET = 0xffffffff8004746d
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_RTS = 0x4
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x20007471
+ TIOCNXCL = 0x2000740e
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0xffffffff80047470
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIOCREMOTE = 0xffffffff80047469
+ TIOCSBRK = 0x2000747b
+ TIOCSDTR = 0x20007479
+ TIOCSETC = 0xffffffff80067411
+ TIOCSETD = 0xffffffff80047401
+ TIOCSETN = 0xffffffff8006740a
+ TIOCSETP = 0xffffffff80067409
+ TIOCSLTC = 0xffffffff80067475
+ TIOCSPGRP = 0xffffffff80047476
+ TIOCSSIZE = 0xffffffff80087467
+ TIOCSTART = 0x2000746e
+ TIOCSTI = 0xffffffff80017472
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0xffffffff80087467
+ TIOCUCNTL = 0xffffffff80047466
+ TOSTOP = 0x10000
+ UTIME_NOW = -0x2
+ UTIME_OMIT = -0x3
+ VDISCRD = 0xc
+ VDSUSP = 0xa
+ VEOF = 0x4
+ VEOL = 0x5
+ VEOL2 = 0x6
+ VERASE = 0x2
+ VINTR = 0x0
+ VKILL = 0x3
+ VLNEXT = 0xe
+ VMIN = 0x4
+ VQUIT = 0x1
+ VREPRINT = 0xb
+ VSTART = 0x7
+ VSTOP = 0x8
+ VSTRT = 0x7
+ VSUSP = 0x9
+ VT0 = 0x0
+ VT1 = 0x8000
+ VTDELAY = 0x2000
+ VTDLY = 0x8000
+ VTIME = 0x5
+ VWERSE = 0xd
+ WPARSTART = 0x1
+ WPARSTOP = 0x2
+ WPARTTYNAME = "Global"
+ XCASE = 0x4
+ XTABS = 0xc00
+ _FDATAFLUSH = 0x2000000000
+)
+
+// Errors
+const (
+ E2BIG = syscall.Errno(0x7)
+ EACCES = syscall.Errno(0xd)
+ EADDRINUSE = syscall.Errno(0x43)
+ EADDRNOTAVAIL = syscall.Errno(0x44)
+ EAFNOSUPPORT = syscall.Errno(0x42)
+ EAGAIN = syscall.Errno(0xb)
+ EALREADY = syscall.Errno(0x38)
+ EBADF = syscall.Errno(0x9)
+ EBADMSG = syscall.Errno(0x78)
+ EBUSY = syscall.Errno(0x10)
+ ECANCELED = syscall.Errno(0x75)
+ ECHILD = syscall.Errno(0xa)
+ ECHRNG = syscall.Errno(0x25)
+ ECLONEME = syscall.Errno(0x52)
+ ECONNABORTED = syscall.Errno(0x48)
+ ECONNREFUSED = syscall.Errno(0x4f)
+ ECONNRESET = syscall.Errno(0x49)
+ ECORRUPT = syscall.Errno(0x59)
+ EDEADLK = syscall.Errno(0x2d)
+ EDESTADDREQ = syscall.Errno(0x3a)
+ EDESTADDRREQ = syscall.Errno(0x3a)
+ EDIST = syscall.Errno(0x35)
+ EDOM = syscall.Errno(0x21)
+ EDQUOT = syscall.Errno(0x58)
+ EEXIST = syscall.Errno(0x11)
+ EFAULT = syscall.Errno(0xe)
+ EFBIG = syscall.Errno(0x1b)
+ EFORMAT = syscall.Errno(0x30)
+ EHOSTDOWN = syscall.Errno(0x50)
+ EHOSTUNREACH = syscall.Errno(0x51)
+ EIDRM = syscall.Errno(0x24)
+ EILSEQ = syscall.Errno(0x74)
+ EINPROGRESS = syscall.Errno(0x37)
+ EINTR = syscall.Errno(0x4)
+ EINVAL = syscall.Errno(0x16)
+ EIO = syscall.Errno(0x5)
+ EISCONN = syscall.Errno(0x4b)
+ EISDIR = syscall.Errno(0x15)
+ EL2HLT = syscall.Errno(0x2c)
+ EL2NSYNC = syscall.Errno(0x26)
+ EL3HLT = syscall.Errno(0x27)
+ EL3RST = syscall.Errno(0x28)
+ ELNRNG = syscall.Errno(0x29)
+ ELOOP = syscall.Errno(0x55)
+ EMEDIA = syscall.Errno(0x6e)
+ EMFILE = syscall.Errno(0x18)
+ EMLINK = syscall.Errno(0x1f)
+ EMSGSIZE = syscall.Errno(0x3b)
+ EMULTIHOP = syscall.Errno(0x7d)
+ ENAMETOOLONG = syscall.Errno(0x56)
+ ENETDOWN = syscall.Errno(0x45)
+ ENETRESET = syscall.Errno(0x47)
+ ENETUNREACH = syscall.Errno(0x46)
+ ENFILE = syscall.Errno(0x17)
+ ENOATTR = syscall.Errno(0x70)
+ ENOBUFS = syscall.Errno(0x4a)
+ ENOCONNECT = syscall.Errno(0x32)
+ ENOCSI = syscall.Errno(0x2b)
+ ENODATA = syscall.Errno(0x7a)
+ ENODEV = syscall.Errno(0x13)
+ ENOENT = syscall.Errno(0x2)
+ ENOEXEC = syscall.Errno(0x8)
+ ENOLCK = syscall.Errno(0x31)
+ ENOLINK = syscall.Errno(0x7e)
+ ENOMEM = syscall.Errno(0xc)
+ ENOMSG = syscall.Errno(0x23)
+ ENOPROTOOPT = syscall.Errno(0x3d)
+ ENOSPC = syscall.Errno(0x1c)
+ ENOSR = syscall.Errno(0x76)
+ ENOSTR = syscall.Errno(0x7b)
+ ENOSYS = syscall.Errno(0x6d)
+ ENOTBLK = syscall.Errno(0xf)
+ ENOTCONN = syscall.Errno(0x4c)
+ ENOTDIR = syscall.Errno(0x14)
+ ENOTEMPTY = syscall.Errno(0x11)
+ ENOTREADY = syscall.Errno(0x2e)
+ ENOTRECOVERABLE = syscall.Errno(0x5e)
+ ENOTRUST = syscall.Errno(0x72)
+ ENOTSOCK = syscall.Errno(0x39)
+ ENOTSUP = syscall.Errno(0x7c)
+ ENOTTY = syscall.Errno(0x19)
+ ENXIO = syscall.Errno(0x6)
+ EOPNOTSUPP = syscall.Errno(0x40)
+ EOVERFLOW = syscall.Errno(0x7f)
+ EOWNERDEAD = syscall.Errno(0x5f)
+ EPERM = syscall.Errno(0x1)
+ EPFNOSUPPORT = syscall.Errno(0x41)
+ EPIPE = syscall.Errno(0x20)
+ EPROCLIM = syscall.Errno(0x53)
+ EPROTO = syscall.Errno(0x79)
+ EPROTONOSUPPORT = syscall.Errno(0x3e)
+ EPROTOTYPE = syscall.Errno(0x3c)
+ ERANGE = syscall.Errno(0x22)
+ EREMOTE = syscall.Errno(0x5d)
+ ERESTART = syscall.Errno(0x52)
+ EROFS = syscall.Errno(0x1e)
+ ESAD = syscall.Errno(0x71)
+ ESHUTDOWN = syscall.Errno(0x4d)
+ ESOCKTNOSUPPORT = syscall.Errno(0x3f)
+ ESOFT = syscall.Errno(0x6f)
+ ESPIPE = syscall.Errno(0x1d)
+ ESRCH = syscall.Errno(0x3)
+ ESTALE = syscall.Errno(0x34)
+ ESYSERROR = syscall.Errno(0x5a)
+ ETIME = syscall.Errno(0x77)
+ ETIMEDOUT = syscall.Errno(0x4e)
+ ETOOMANYREFS = syscall.Errno(0x73)
+ ETXTBSY = syscall.Errno(0x1a)
+ EUNATCH = syscall.Errno(0x2a)
+ EUSERS = syscall.Errno(0x54)
+ EWOULDBLOCK = syscall.Errno(0xb)
+ EWRPROTECT = syscall.Errno(0x2f)
+ EXDEV = syscall.Errno(0x12)
+)
+
+// Signals
+const (
+ SIGABRT = syscall.Signal(0x6)
+ SIGAIO = syscall.Signal(0x17)
+ SIGALRM = syscall.Signal(0xe)
+ SIGALRM1 = syscall.Signal(0x26)
+ SIGBUS = syscall.Signal(0xa)
+ SIGCAPI = syscall.Signal(0x31)
+ SIGCHLD = syscall.Signal(0x14)
+ SIGCLD = syscall.Signal(0x14)
+ SIGCONT = syscall.Signal(0x13)
+ SIGCPUFAIL = syscall.Signal(0x3b)
+ SIGDANGER = syscall.Signal(0x21)
+ SIGEMT = syscall.Signal(0x7)
+ SIGFPE = syscall.Signal(0x8)
+ SIGGRANT = syscall.Signal(0x3c)
+ SIGHUP = syscall.Signal(0x1)
+ SIGILL = syscall.Signal(0x4)
+ SIGINT = syscall.Signal(0x2)
+ SIGIO = syscall.Signal(0x17)
+ SIGIOINT = syscall.Signal(0x10)
+ SIGIOT = syscall.Signal(0x6)
+ SIGKAP = syscall.Signal(0x3c)
+ SIGKILL = syscall.Signal(0x9)
+ SIGLOST = syscall.Signal(0x6)
+ SIGMAX = syscall.Signal(0xff)
+ SIGMAX32 = syscall.Signal(0x3f)
+ SIGMIGRATE = syscall.Signal(0x23)
+ SIGMSG = syscall.Signal(0x1b)
+ SIGPIPE = syscall.Signal(0xd)
+ SIGPOLL = syscall.Signal(0x17)
+ SIGPRE = syscall.Signal(0x24)
+ SIGPROF = syscall.Signal(0x20)
+ SIGPTY = syscall.Signal(0x17)
+ SIGPWR = syscall.Signal(0x1d)
+ SIGQUIT = syscall.Signal(0x3)
+ SIGRECONFIG = syscall.Signal(0x3a)
+ SIGRETRACT = syscall.Signal(0x3d)
+ SIGSAK = syscall.Signal(0x3f)
+ SIGSEGV = syscall.Signal(0xb)
+ SIGSOUND = syscall.Signal(0x3e)
+ SIGSTOP = syscall.Signal(0x11)
+ SIGSYS = syscall.Signal(0xc)
+ SIGSYSERROR = syscall.Signal(0x30)
+ SIGTALRM = syscall.Signal(0x26)
+ SIGTERM = syscall.Signal(0xf)
+ SIGTRAP = syscall.Signal(0x5)
+ SIGTSTP = syscall.Signal(0x12)
+ SIGTTIN = syscall.Signal(0x15)
+ SIGTTOU = syscall.Signal(0x16)
+ SIGURG = syscall.Signal(0x10)
+ SIGUSR1 = syscall.Signal(0x1e)
+ SIGUSR2 = syscall.Signal(0x1f)
+ SIGVIRT = syscall.Signal(0x25)
+ SIGVTALRM = syscall.Signal(0x22)
+ SIGWAITING = syscall.Signal(0x27)
+ SIGWINCH = syscall.Signal(0x1c)
+ SIGXCPU = syscall.Signal(0x18)
+ SIGXFSZ = syscall.Signal(0x19)
+)
+
+// Error table
+var errorList = [...]struct {
+ num syscall.Errno
+ name string
+ desc string
+}{
+ {1, "EPERM", "not owner"},
+ {2, "ENOENT", "no such file or directory"},
+ {3, "ESRCH", "no such process"},
+ {4, "EINTR", "interrupted system call"},
+ {5, "EIO", "I/O error"},
+ {6, "ENXIO", "no such device or address"},
+ {7, "E2BIG", "arg list too long"},
+ {8, "ENOEXEC", "exec format error"},
+ {9, "EBADF", "bad file number"},
+ {10, "ECHILD", "no child processes"},
+ {11, "EWOULDBLOCK", "resource temporarily unavailable"},
+ {12, "ENOMEM", "not enough space"},
+ {13, "EACCES", "permission denied"},
+ {14, "EFAULT", "bad address"},
+ {15, "ENOTBLK", "block device required"},
+ {16, "EBUSY", "device busy"},
+ {17, "ENOTEMPTY", "file exists"},
+ {18, "EXDEV", "cross-device link"},
+ {19, "ENODEV", "no such device"},
+ {20, "ENOTDIR", "not a directory"},
+ {21, "EISDIR", "is a directory"},
+ {22, "EINVAL", "invalid argument"},
+ {23, "ENFILE", "file table overflow"},
+ {24, "EMFILE", "too many open files"},
+ {25, "ENOTTY", "not a typewriter"},
+ {26, "ETXTBSY", "text file busy"},
+ {27, "EFBIG", "file too large"},
+ {28, "ENOSPC", "no space left on device"},
+ {29, "ESPIPE", "illegal seek"},
+ {30, "EROFS", "read-only file system"},
+ {31, "EMLINK", "too many links"},
+ {32, "EPIPE", "broken pipe"},
+ {33, "EDOM", "argument out of domain"},
+ {34, "ERANGE", "result too large"},
+ {35, "ENOMSG", "no message of desired type"},
+ {36, "EIDRM", "identifier removed"},
+ {37, "ECHRNG", "channel number out of range"},
+ {38, "EL2NSYNC", "level 2 not synchronized"},
+ {39, "EL3HLT", "level 3 halted"},
+ {40, "EL3RST", "level 3 reset"},
+ {41, "ELNRNG", "link number out of range"},
+ {42, "EUNATCH", "protocol driver not attached"},
+ {43, "ENOCSI", "no CSI structure available"},
+ {44, "EL2HLT", "level 2 halted"},
+ {45, "EDEADLK", "deadlock condition if locked"},
+ {46, "ENOTREADY", "device not ready"},
+ {47, "EWRPROTECT", "write-protected media"},
+ {48, "EFORMAT", "unformatted or incompatible media"},
+ {49, "ENOLCK", "no locks available"},
+ {50, "ENOCONNECT", "cannot Establish Connection"},
+ {52, "ESTALE", "missing file or filesystem"},
+ {53, "EDIST", "requests blocked by Administrator"},
+ {55, "EINPROGRESS", "operation now in progress"},
+ {56, "EALREADY", "operation already in progress"},
+ {57, "ENOTSOCK", "socket operation on non-socket"},
+ {58, "EDESTADDREQ", "destination address required"},
+ {59, "EMSGSIZE", "message too long"},
+ {60, "EPROTOTYPE", "protocol wrong type for socket"},
+ {61, "ENOPROTOOPT", "protocol not available"},
+ {62, "EPROTONOSUPPORT", "protocol not supported"},
+ {63, "ESOCKTNOSUPPORT", "socket type not supported"},
+ {64, "EOPNOTSUPP", "operation not supported on socket"},
+ {65, "EPFNOSUPPORT", "protocol family not supported"},
+ {66, "EAFNOSUPPORT", "addr family not supported by protocol"},
+ {67, "EADDRINUSE", "address already in use"},
+ {68, "EADDRNOTAVAIL", "can't assign requested address"},
+ {69, "ENETDOWN", "network is down"},
+ {70, "ENETUNREACH", "network is unreachable"},
+ {71, "ENETRESET", "network dropped connection on reset"},
+ {72, "ECONNABORTED", "software caused connection abort"},
+ {73, "ECONNRESET", "connection reset by peer"},
+ {74, "ENOBUFS", "no buffer space available"},
+ {75, "EISCONN", "socket is already connected"},
+ {76, "ENOTCONN", "socket is not connected"},
+ {77, "ESHUTDOWN", "can't send after socket shutdown"},
+ {78, "ETIMEDOUT", "connection timed out"},
+ {79, "ECONNREFUSED", "connection refused"},
+ {80, "EHOSTDOWN", "host is down"},
+ {81, "EHOSTUNREACH", "no route to host"},
+ {82, "ERESTART", "restart the system call"},
+ {83, "EPROCLIM", "too many processes"},
+ {84, "EUSERS", "too many users"},
+ {85, "ELOOP", "too many levels of symbolic links"},
+ {86, "ENAMETOOLONG", "file name too long"},
+ {88, "EDQUOT", "disk quota exceeded"},
+ {89, "ECORRUPT", "invalid file system control data detected"},
+ {90, "ESYSERROR", "for future use "},
+ {93, "EREMOTE", "item is not local to host"},
+ {94, "ENOTRECOVERABLE", "state not recoverable "},
+ {95, "EOWNERDEAD", "previous owner died "},
+ {109, "ENOSYS", "function not implemented"},
+ {110, "EMEDIA", "media surface error"},
+ {111, "ESOFT", "I/O completed, but needs relocation"},
+ {112, "ENOATTR", "no attribute found"},
+ {113, "ESAD", "security Authentication Denied"},
+ {114, "ENOTRUST", "not a Trusted Program"},
+ {115, "ETOOMANYREFS", "too many references: can't splice"},
+ {116, "EILSEQ", "invalid wide character"},
+ {117, "ECANCELED", "asynchronous I/O cancelled"},
+ {118, "ENOSR", "out of STREAMS resources"},
+ {119, "ETIME", "system call timed out"},
+ {120, "EBADMSG", "next message has wrong type"},
+ {121, "EPROTO", "error in protocol"},
+ {122, "ENODATA", "no message on stream head read q"},
+ {123, "ENOSTR", "fd not associated with a stream"},
+ {124, "ENOTSUP", "unsupported attribute value"},
+ {125, "EMULTIHOP", "multihop is not allowed"},
+ {126, "ENOLINK", "the server link has been severed"},
+ {127, "EOVERFLOW", "value too large to be stored in data type"},
+}
+
+// Signal table
+var signalList = [...]struct {
+ num syscall.Signal
+ name string
+ desc string
+}{
+ {1, "SIGHUP", "hangup"},
+ {2, "SIGINT", "interrupt"},
+ {3, "SIGQUIT", "quit"},
+ {4, "SIGILL", "illegal instruction"},
+ {5, "SIGTRAP", "trace/BPT trap"},
+ {6, "SIGIOT", "IOT/Abort trap"},
+ {7, "SIGEMT", "EMT trap"},
+ {8, "SIGFPE", "floating point exception"},
+ {9, "SIGKILL", "killed"},
+ {10, "SIGBUS", "bus error"},
+ {11, "SIGSEGV", "segmentation fault"},
+ {12, "SIGSYS", "bad system call"},
+ {13, "SIGPIPE", "broken pipe"},
+ {14, "SIGALRM", "alarm clock"},
+ {15, "SIGTERM", "terminated"},
+ {16, "SIGURG", "urgent I/O condition"},
+ {17, "SIGSTOP", "stopped (signal)"},
+ {18, "SIGTSTP", "stopped"},
+ {19, "SIGCONT", "continued"},
+ {20, "SIGCHLD", "child exited"},
+ {21, "SIGTTIN", "stopped (tty input)"},
+ {22, "SIGTTOU", "stopped (tty output)"},
+ {23, "SIGIO", "I/O possible/complete"},
+ {24, "SIGXCPU", "cputime limit exceeded"},
+ {25, "SIGXFSZ", "filesize limit exceeded"},
+ {27, "SIGMSG", "input device data"},
+ {28, "SIGWINCH", "window size changes"},
+ {29, "SIGPWR", "power-failure"},
+ {30, "SIGUSR1", "user defined signal 1"},
+ {31, "SIGUSR2", "user defined signal 2"},
+ {32, "SIGPROF", "profiling timer expired"},
+ {33, "SIGDANGER", "paging space low"},
+ {34, "SIGVTALRM", "virtual timer expired"},
+ {35, "SIGMIGRATE", "signal 35"},
+ {36, "SIGPRE", "signal 36"},
+ {37, "SIGVIRT", "signal 37"},
+ {38, "SIGTALRM", "signal 38"},
+ {39, "SIGWAITING", "signal 39"},
+ {48, "SIGSYSERROR", "signal 48"},
+ {49, "SIGCAPI", "signal 49"},
+ {58, "SIGRECONFIG", "signal 58"},
+ {59, "SIGCPUFAIL", "CPU Failure Predicted"},
+ {60, "SIGGRANT", "monitor mode granted"},
+ {61, "SIGRETRACT", "monitor mode retracted"},
+ {62, "SIGSOUND", "sound completed"},
+ {63, "SIGMAX32", "secure attention"},
+ {255, "SIGMAX", "signal 255"},
+}
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 1de699894..bbe6089bb 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
@@ -880,6 +880,40 @@ const (
MAP_VPAGETABLE = 0x2000
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_AUTOMOUNTED = 0x20
+ MNT_CMDFLAGS = 0xf0000
+ MNT_DEFEXPORTED = 0x200
+ MNT_DELEXPORT = 0x20000
+ MNT_EXKERB = 0x800
+ MNT_EXPORTANON = 0x400
+ MNT_EXPORTED = 0x100
+ MNT_EXPUBLIC = 0x20000000
+ MNT_EXRDONLY = 0x80
+ MNT_FORCE = 0x80000
+ MNT_IGNORE = 0x800000
+ MNT_LAZY = 0x4
+ MNT_LOCAL = 0x1000
+ MNT_NOATIME = 0x10000000
+ MNT_NOCLUSTERR = 0x40000000
+ MNT_NOCLUSTERW = 0x80000000
+ MNT_NODEV = 0x10
+ MNT_NOEXEC = 0x4
+ MNT_NOSUID = 0x8
+ MNT_NOSYMFOLLOW = 0x400000
+ MNT_NOWAIT = 0x2
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELOAD = 0x40000
+ MNT_ROOTFS = 0x4000
+ MNT_SOFTDEP = 0x200000
+ MNT_SUIDDIR = 0x100000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_TRIM = 0x1000000
+ MNT_UPDATE = 0x10000
+ MNT_USER = 0x8000
+ MNT_VISFLAGMASK = 0xf1f0ffff
+ MNT_WAIT = 0x1
MSG_CMSG_CLOEXEC = 0x1000
MSG_CTRUNC = 0x20
MSG_DONTROUTE = 0x4
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 a1699fb72..fe564160b 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -64,6 +64,7 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ AF_XDP = 0x2c
ALG_OP_DECRYPT = 0x0
ALG_OP_ENCRYPT = 0x1
ALG_SET_AEAD_ASSOCLEN = 0x4
@@ -977,6 +978,21 @@ const (
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MCL_ONFAULT = 0x4
+ MFD_ALLOW_SEALING = 0x2
+ MFD_CLOEXEC = 0x1
+ MFD_HUGETLB = 0x4
+ MFD_HUGE_16GB = -0x78000000
+ MFD_HUGE_16MB = 0x60000000
+ MFD_HUGE_1GB = 0x78000000
+ MFD_HUGE_1MB = 0x50000000
+ MFD_HUGE_256MB = 0x70000000
+ MFD_HUGE_2GB = 0x7c000000
+ MFD_HUGE_2MB = 0x54000000
+ MFD_HUGE_512KB = 0x4c000000
+ MFD_HUGE_64KB = 0x40000000
+ MFD_HUGE_8MB = 0x5c000000
+ MFD_HUGE_MASK = 0x3f
+ MFD_HUGE_SHIFT = 0x1a
MINIX2_SUPER_MAGIC = 0x2468
MINIX2_SUPER_MAGIC2 = 0x2478
MINIX3_SUPER_MAGIC = 0x4d5a
@@ -1796,6 +1812,7 @@ const (
SOL_TIPC = 0x10f
SOL_TLS = 0x11a
SOL_X25 = 0x106
+ SOL_XDP = 0x11b
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1e
SO_ATTACH_BPF = 0x32
@@ -1891,6 +1908,9 @@ const (
STATX_TYPE = 0x1
STATX_UID = 0x8
STATX__RESERVED = 0x80000000
+ SYNC_FILE_RANGE_WAIT_AFTER = 0x4
+ SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
+ SYNC_FILE_RANGE_WRITE = 0x2
SYSFS_MAGIC = 0x62656572
S_BLKSIZE = 0x200
S_IEXEC = 0x40
@@ -2275,6 +2295,26 @@ const (
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
+ XDP_COPY = 0x2
+ XDP_FLAGS_DRV_MODE = 0x4
+ XDP_FLAGS_HW_MODE = 0x8
+ XDP_FLAGS_MASK = 0xf
+ XDP_FLAGS_MODES = 0xe
+ XDP_FLAGS_SKB_MODE = 0x2
+ XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MMAP_OFFSETS = 0x1
+ XDP_PGOFF_RX_RING = 0x0
+ XDP_PGOFF_TX_RING = 0x80000000
+ XDP_RX_RING = 0x2
+ XDP_SHARED_UMEM = 0x1
+ XDP_STATISTICS = 0x7
+ XDP_TX_RING = 0x3
+ XDP_UMEM_COMPLETION_RING = 0x6
+ XDP_UMEM_FILL_RING = 0x5
+ XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
+ XDP_UMEM_PGOFF_FILL_RING = 0x100000000
+ XDP_UMEM_REG = 0x4
+ XDP_ZEROCOPY = 0x4
XENFS_SUPER_MAGIC = 0xabba1974
XTABS = 0x1800
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 8653d8604..dcfa66749 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -64,6 +64,7 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ AF_XDP = 0x2c
ALG_OP_DECRYPT = 0x0
ALG_OP_ENCRYPT = 0x1
ALG_SET_AEAD_ASSOCLEN = 0x4
@@ -977,6 +978,21 @@ const (
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MCL_ONFAULT = 0x4
+ MFD_ALLOW_SEALING = 0x2
+ MFD_CLOEXEC = 0x1
+ MFD_HUGETLB = 0x4
+ MFD_HUGE_16GB = -0x78000000
+ MFD_HUGE_16MB = 0x60000000
+ MFD_HUGE_1GB = 0x78000000
+ MFD_HUGE_1MB = 0x50000000
+ MFD_HUGE_256MB = 0x70000000
+ MFD_HUGE_2GB = 0x7c000000
+ MFD_HUGE_2MB = 0x54000000
+ MFD_HUGE_512KB = 0x4c000000
+ MFD_HUGE_64KB = 0x40000000
+ MFD_HUGE_8MB = 0x5c000000
+ MFD_HUGE_MASK = 0x3f
+ MFD_HUGE_SHIFT = 0x1a
MINIX2_SUPER_MAGIC = 0x2468
MINIX2_SUPER_MAGIC2 = 0x2478
MINIX3_SUPER_MAGIC = 0x4d5a
@@ -1797,6 +1813,7 @@ const (
SOL_TIPC = 0x10f
SOL_TLS = 0x11a
SOL_X25 = 0x106
+ SOL_XDP = 0x11b
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1e
SO_ATTACH_BPF = 0x32
@@ -1892,6 +1909,9 @@ const (
STATX_TYPE = 0x1
STATX_UID = 0x8
STATX__RESERVED = 0x80000000
+ SYNC_FILE_RANGE_WAIT_AFTER = 0x4
+ SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
+ SYNC_FILE_RANGE_WRITE = 0x2
SYSFS_MAGIC = 0x62656572
S_BLKSIZE = 0x200
S_IEXEC = 0x40
@@ -2275,6 +2295,26 @@ const (
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
+ XDP_COPY = 0x2
+ XDP_FLAGS_DRV_MODE = 0x4
+ XDP_FLAGS_HW_MODE = 0x8
+ XDP_FLAGS_MASK = 0xf
+ XDP_FLAGS_MODES = 0xe
+ XDP_FLAGS_SKB_MODE = 0x2
+ XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MMAP_OFFSETS = 0x1
+ XDP_PGOFF_RX_RING = 0x0
+ XDP_PGOFF_TX_RING = 0x80000000
+ XDP_RX_RING = 0x2
+ XDP_SHARED_UMEM = 0x1
+ XDP_STATISTICS = 0x7
+ XDP_TX_RING = 0x3
+ XDP_UMEM_COMPLETION_RING = 0x6
+ XDP_UMEM_FILL_RING = 0x5
+ XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
+ XDP_UMEM_PGOFF_FILL_RING = 0x100000000
+ XDP_UMEM_REG = 0x4
+ XDP_ZEROCOPY = 0x4
XENFS_SUPER_MAGIC = 0xabba1974
XTABS = 0x1800
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 e1595b3e1..c2ef50c65 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -64,6 +64,7 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ AF_XDP = 0x2c
ALG_OP_DECRYPT = 0x0
ALG_OP_ENCRYPT = 0x1
ALG_SET_AEAD_ASSOCLEN = 0x4
@@ -975,6 +976,21 @@ const (
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MCL_ONFAULT = 0x4
+ MFD_ALLOW_SEALING = 0x2
+ MFD_CLOEXEC = 0x1
+ MFD_HUGETLB = 0x4
+ MFD_HUGE_16GB = -0x78000000
+ MFD_HUGE_16MB = 0x60000000
+ MFD_HUGE_1GB = 0x78000000
+ MFD_HUGE_1MB = 0x50000000
+ MFD_HUGE_256MB = 0x70000000
+ MFD_HUGE_2GB = 0x7c000000
+ MFD_HUGE_2MB = 0x54000000
+ MFD_HUGE_512KB = 0x4c000000
+ MFD_HUGE_64KB = 0x40000000
+ MFD_HUGE_8MB = 0x5c000000
+ MFD_HUGE_MASK = 0x3f
+ MFD_HUGE_SHIFT = 0x1a
MINIX2_SUPER_MAGIC = 0x2468
MINIX2_SUPER_MAGIC2 = 0x2478
MINIX3_SUPER_MAGIC = 0x4d5a
@@ -1803,6 +1819,7 @@ const (
SOL_TIPC = 0x10f
SOL_TLS = 0x11a
SOL_X25 = 0x106
+ SOL_XDP = 0x11b
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1e
SO_ATTACH_BPF = 0x32
@@ -1898,6 +1915,9 @@ const (
STATX_TYPE = 0x1
STATX_UID = 0x8
STATX__RESERVED = 0x80000000
+ SYNC_FILE_RANGE_WAIT_AFTER = 0x4
+ SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
+ SYNC_FILE_RANGE_WRITE = 0x2
SYSFS_MAGIC = 0x62656572
S_BLKSIZE = 0x200
S_IEXEC = 0x40
@@ -2281,6 +2301,26 @@ const (
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
+ XDP_COPY = 0x2
+ XDP_FLAGS_DRV_MODE = 0x4
+ XDP_FLAGS_HW_MODE = 0x8
+ XDP_FLAGS_MASK = 0xf
+ XDP_FLAGS_MODES = 0xe
+ XDP_FLAGS_SKB_MODE = 0x2
+ XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MMAP_OFFSETS = 0x1
+ XDP_PGOFF_RX_RING = 0x0
+ XDP_PGOFF_TX_RING = 0x80000000
+ XDP_RX_RING = 0x2
+ XDP_SHARED_UMEM = 0x1
+ XDP_STATISTICS = 0x7
+ XDP_TX_RING = 0x3
+ XDP_UMEM_COMPLETION_RING = 0x6
+ XDP_UMEM_FILL_RING = 0x5
+ XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
+ XDP_UMEM_PGOFF_FILL_RING = 0x100000000
+ XDP_UMEM_REG = 0x4
+ XDP_ZEROCOPY = 0x4
XENFS_SUPER_MAGIC = 0xabba1974
XTABS = 0x1800
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 fe43d1798..1a820d668 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -64,6 +64,7 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ AF_XDP = 0x2c
ALG_OP_DECRYPT = 0x0
ALG_OP_ENCRYPT = 0x1
ALG_SET_AEAD_ASSOCLEN = 0x4
@@ -978,6 +979,21 @@ const (
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MCL_ONFAULT = 0x4
+ MFD_ALLOW_SEALING = 0x2
+ MFD_CLOEXEC = 0x1
+ MFD_HUGETLB = 0x4
+ MFD_HUGE_16GB = -0x78000000
+ MFD_HUGE_16MB = 0x60000000
+ MFD_HUGE_1GB = 0x78000000
+ MFD_HUGE_1MB = 0x50000000
+ MFD_HUGE_256MB = 0x70000000
+ MFD_HUGE_2GB = 0x7c000000
+ MFD_HUGE_2MB = 0x54000000
+ MFD_HUGE_512KB = 0x4c000000
+ MFD_HUGE_64KB = 0x40000000
+ MFD_HUGE_8MB = 0x5c000000
+ MFD_HUGE_MASK = 0x3f
+ MFD_HUGE_SHIFT = 0x1a
MINIX2_SUPER_MAGIC = 0x2468
MINIX2_SUPER_MAGIC2 = 0x2478
MINIX3_SUPER_MAGIC = 0x4d5a
@@ -1787,6 +1803,7 @@ const (
SOL_TIPC = 0x10f
SOL_TLS = 0x11a
SOL_X25 = 0x106
+ SOL_XDP = 0x11b
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1e
SO_ATTACH_BPF = 0x32
@@ -1883,6 +1900,9 @@ const (
STATX_UID = 0x8
STATX__RESERVED = 0x80000000
SVE_MAGIC = 0x53564501
+ SYNC_FILE_RANGE_WAIT_AFTER = 0x4
+ SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
+ SYNC_FILE_RANGE_WRITE = 0x2
SYSFS_MAGIC = 0x62656572
S_BLKSIZE = 0x200
S_IEXEC = 0x40
@@ -2266,6 +2286,26 @@ const (
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
+ XDP_COPY = 0x2
+ XDP_FLAGS_DRV_MODE = 0x4
+ XDP_FLAGS_HW_MODE = 0x8
+ XDP_FLAGS_MASK = 0xf
+ XDP_FLAGS_MODES = 0xe
+ XDP_FLAGS_SKB_MODE = 0x2
+ XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MMAP_OFFSETS = 0x1
+ XDP_PGOFF_RX_RING = 0x0
+ XDP_PGOFF_TX_RING = 0x80000000
+ XDP_RX_RING = 0x2
+ XDP_SHARED_UMEM = 0x1
+ XDP_STATISTICS = 0x7
+ XDP_TX_RING = 0x3
+ XDP_UMEM_COMPLETION_RING = 0x6
+ XDP_UMEM_FILL_RING = 0x5
+ XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
+ XDP_UMEM_PGOFF_FILL_RING = 0x100000000
+ XDP_UMEM_REG = 0x4
+ XDP_ZEROCOPY = 0x4
XENFS_SUPER_MAGIC = 0xabba1974
XTABS = 0x1800
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 845c04975..b515b2a63 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -64,6 +64,7 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ AF_XDP = 0x2c
ALG_OP_DECRYPT = 0x0
ALG_OP_ENCRYPT = 0x1
ALG_SET_AEAD_ASSOCLEN = 0x4
@@ -975,6 +976,21 @@ const (
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MCL_ONFAULT = 0x4
+ MFD_ALLOW_SEALING = 0x2
+ MFD_CLOEXEC = 0x1
+ MFD_HUGETLB = 0x4
+ MFD_HUGE_16GB = -0x78000000
+ MFD_HUGE_16MB = 0x60000000
+ MFD_HUGE_1GB = 0x78000000
+ MFD_HUGE_1MB = 0x50000000
+ MFD_HUGE_256MB = 0x70000000
+ MFD_HUGE_2GB = 0x7c000000
+ MFD_HUGE_2MB = 0x54000000
+ MFD_HUGE_512KB = 0x4c000000
+ MFD_HUGE_64KB = 0x40000000
+ MFD_HUGE_8MB = 0x5c000000
+ MFD_HUGE_MASK = 0x3f
+ MFD_HUGE_SHIFT = 0x1a
MINIX2_SUPER_MAGIC = 0x2468
MINIX2_SUPER_MAGIC2 = 0x2478
MINIX3_SUPER_MAGIC = 0x4d5a
@@ -1796,6 +1812,7 @@ const (
SOL_TIPC = 0x10f
SOL_TLS = 0x11a
SOL_X25 = 0x106
+ SOL_XDP = 0x11b
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1009
SO_ATTACH_BPF = 0x32
@@ -1892,6 +1909,9 @@ const (
STATX_TYPE = 0x1
STATX_UID = 0x8
STATX__RESERVED = 0x80000000
+ SYNC_FILE_RANGE_WAIT_AFTER = 0x4
+ SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
+ SYNC_FILE_RANGE_WRITE = 0x2
SYSFS_MAGIC = 0x62656572
S_BLKSIZE = 0x200
S_IEXEC = 0x40
@@ -2277,6 +2297,26 @@ const (
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
+ XDP_COPY = 0x2
+ XDP_FLAGS_DRV_MODE = 0x4
+ XDP_FLAGS_HW_MODE = 0x8
+ XDP_FLAGS_MASK = 0xf
+ XDP_FLAGS_MODES = 0xe
+ XDP_FLAGS_SKB_MODE = 0x2
+ XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MMAP_OFFSETS = 0x1
+ XDP_PGOFF_RX_RING = 0x0
+ XDP_PGOFF_TX_RING = 0x80000000
+ XDP_RX_RING = 0x2
+ XDP_SHARED_UMEM = 0x1
+ XDP_STATISTICS = 0x7
+ XDP_TX_RING = 0x3
+ XDP_UMEM_COMPLETION_RING = 0x6
+ XDP_UMEM_FILL_RING = 0x5
+ XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
+ XDP_UMEM_PGOFF_FILL_RING = 0x100000000
+ XDP_UMEM_REG = 0x4
+ XDP_ZEROCOPY = 0x4
XENFS_SUPER_MAGIC = 0xabba1974
XTABS = 0x1800
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 b791d8696..29a88f0e5 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -64,6 +64,7 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ AF_XDP = 0x2c
ALG_OP_DECRYPT = 0x0
ALG_OP_ENCRYPT = 0x1
ALG_SET_AEAD_ASSOCLEN = 0x4
@@ -975,6 +976,21 @@ const (
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MCL_ONFAULT = 0x4
+ MFD_ALLOW_SEALING = 0x2
+ MFD_CLOEXEC = 0x1
+ MFD_HUGETLB = 0x4
+ MFD_HUGE_16GB = -0x78000000
+ MFD_HUGE_16MB = 0x60000000
+ MFD_HUGE_1GB = 0x78000000
+ MFD_HUGE_1MB = 0x50000000
+ MFD_HUGE_256MB = 0x70000000
+ MFD_HUGE_2GB = 0x7c000000
+ MFD_HUGE_2MB = 0x54000000
+ MFD_HUGE_512KB = 0x4c000000
+ MFD_HUGE_64KB = 0x40000000
+ MFD_HUGE_8MB = 0x5c000000
+ MFD_HUGE_MASK = 0x3f
+ MFD_HUGE_SHIFT = 0x1a
MINIX2_SUPER_MAGIC = 0x2468
MINIX2_SUPER_MAGIC2 = 0x2478
MINIX3_SUPER_MAGIC = 0x4d5a
@@ -1796,6 +1812,7 @@ const (
SOL_TIPC = 0x10f
SOL_TLS = 0x11a
SOL_X25 = 0x106
+ SOL_XDP = 0x11b
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1009
SO_ATTACH_BPF = 0x32
@@ -1892,6 +1909,9 @@ const (
STATX_TYPE = 0x1
STATX_UID = 0x8
STATX__RESERVED = 0x80000000
+ SYNC_FILE_RANGE_WAIT_AFTER = 0x4
+ SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
+ SYNC_FILE_RANGE_WRITE = 0x2
SYSFS_MAGIC = 0x62656572
S_BLKSIZE = 0x200
S_IEXEC = 0x40
@@ -2277,6 +2297,26 @@ const (
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
+ XDP_COPY = 0x2
+ XDP_FLAGS_DRV_MODE = 0x4
+ XDP_FLAGS_HW_MODE = 0x8
+ XDP_FLAGS_MASK = 0xf
+ XDP_FLAGS_MODES = 0xe
+ XDP_FLAGS_SKB_MODE = 0x2
+ XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MMAP_OFFSETS = 0x1
+ XDP_PGOFF_RX_RING = 0x0
+ XDP_PGOFF_TX_RING = 0x80000000
+ XDP_RX_RING = 0x2
+ XDP_SHARED_UMEM = 0x1
+ XDP_STATISTICS = 0x7
+ XDP_TX_RING = 0x3
+ XDP_UMEM_COMPLETION_RING = 0x6
+ XDP_UMEM_FILL_RING = 0x5
+ XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
+ XDP_UMEM_PGOFF_FILL_RING = 0x100000000
+ XDP_UMEM_REG = 0x4
+ XDP_ZEROCOPY = 0x4
XENFS_SUPER_MAGIC = 0xabba1974
XTABS = 0x1800
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 d1b95684f..0767ac1b0 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -64,6 +64,7 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ AF_XDP = 0x2c
ALG_OP_DECRYPT = 0x0
ALG_OP_ENCRYPT = 0x1
ALG_SET_AEAD_ASSOCLEN = 0x4
@@ -975,6 +976,21 @@ const (
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MCL_ONFAULT = 0x4
+ MFD_ALLOW_SEALING = 0x2
+ MFD_CLOEXEC = 0x1
+ MFD_HUGETLB = 0x4
+ MFD_HUGE_16GB = -0x78000000
+ MFD_HUGE_16MB = 0x60000000
+ MFD_HUGE_1GB = 0x78000000
+ MFD_HUGE_1MB = 0x50000000
+ MFD_HUGE_256MB = 0x70000000
+ MFD_HUGE_2GB = 0x7c000000
+ MFD_HUGE_2MB = 0x54000000
+ MFD_HUGE_512KB = 0x4c000000
+ MFD_HUGE_64KB = 0x40000000
+ MFD_HUGE_8MB = 0x5c000000
+ MFD_HUGE_MASK = 0x3f
+ MFD_HUGE_SHIFT = 0x1a
MINIX2_SUPER_MAGIC = 0x2468
MINIX2_SUPER_MAGIC2 = 0x2478
MINIX3_SUPER_MAGIC = 0x4d5a
@@ -1796,6 +1812,7 @@ const (
SOL_TIPC = 0x10f
SOL_TLS = 0x11a
SOL_X25 = 0x106
+ SOL_XDP = 0x11b
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1009
SO_ATTACH_BPF = 0x32
@@ -1892,6 +1909,9 @@ const (
STATX_TYPE = 0x1
STATX_UID = 0x8
STATX__RESERVED = 0x80000000
+ SYNC_FILE_RANGE_WAIT_AFTER = 0x4
+ SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
+ SYNC_FILE_RANGE_WRITE = 0x2
SYSFS_MAGIC = 0x62656572
S_BLKSIZE = 0x200
S_IEXEC = 0x40
@@ -2277,6 +2297,26 @@ const (
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
+ XDP_COPY = 0x2
+ XDP_FLAGS_DRV_MODE = 0x4
+ XDP_FLAGS_HW_MODE = 0x8
+ XDP_FLAGS_MASK = 0xf
+ XDP_FLAGS_MODES = 0xe
+ XDP_FLAGS_SKB_MODE = 0x2
+ XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MMAP_OFFSETS = 0x1
+ XDP_PGOFF_RX_RING = 0x0
+ XDP_PGOFF_TX_RING = 0x80000000
+ XDP_RX_RING = 0x2
+ XDP_SHARED_UMEM = 0x1
+ XDP_STATISTICS = 0x7
+ XDP_TX_RING = 0x3
+ XDP_UMEM_COMPLETION_RING = 0x6
+ XDP_UMEM_FILL_RING = 0x5
+ XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
+ XDP_UMEM_PGOFF_FILL_RING = 0x100000000
+ XDP_UMEM_REG = 0x4
+ XDP_ZEROCOPY = 0x4
XENFS_SUPER_MAGIC = 0xabba1974
XTABS = 0x1800
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 2735466d8..269b81318 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -64,6 +64,7 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ AF_XDP = 0x2c
ALG_OP_DECRYPT = 0x0
ALG_OP_ENCRYPT = 0x1
ALG_SET_AEAD_ASSOCLEN = 0x4
@@ -975,6 +976,21 @@ const (
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MCL_ONFAULT = 0x4
+ MFD_ALLOW_SEALING = 0x2
+ MFD_CLOEXEC = 0x1
+ MFD_HUGETLB = 0x4
+ MFD_HUGE_16GB = -0x78000000
+ MFD_HUGE_16MB = 0x60000000
+ MFD_HUGE_1GB = 0x78000000
+ MFD_HUGE_1MB = 0x50000000
+ MFD_HUGE_256MB = 0x70000000
+ MFD_HUGE_2GB = 0x7c000000
+ MFD_HUGE_2MB = 0x54000000
+ MFD_HUGE_512KB = 0x4c000000
+ MFD_HUGE_64KB = 0x40000000
+ MFD_HUGE_8MB = 0x5c000000
+ MFD_HUGE_MASK = 0x3f
+ MFD_HUGE_SHIFT = 0x1a
MINIX2_SUPER_MAGIC = 0x2468
MINIX2_SUPER_MAGIC2 = 0x2478
MINIX3_SUPER_MAGIC = 0x4d5a
@@ -1796,6 +1812,7 @@ const (
SOL_TIPC = 0x10f
SOL_TLS = 0x11a
SOL_X25 = 0x106
+ SOL_XDP = 0x11b
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1009
SO_ATTACH_BPF = 0x32
@@ -1892,6 +1909,9 @@ const (
STATX_TYPE = 0x1
STATX_UID = 0x8
STATX__RESERVED = 0x80000000
+ SYNC_FILE_RANGE_WAIT_AFTER = 0x4
+ SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
+ SYNC_FILE_RANGE_WRITE = 0x2
SYSFS_MAGIC = 0x62656572
S_BLKSIZE = 0x200
S_IEXEC = 0x40
@@ -2277,6 +2297,26 @@ const (
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
+ XDP_COPY = 0x2
+ XDP_FLAGS_DRV_MODE = 0x4
+ XDP_FLAGS_HW_MODE = 0x8
+ XDP_FLAGS_MASK = 0xf
+ XDP_FLAGS_MODES = 0xe
+ XDP_FLAGS_SKB_MODE = 0x2
+ XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MMAP_OFFSETS = 0x1
+ XDP_PGOFF_RX_RING = 0x0
+ XDP_PGOFF_TX_RING = 0x80000000
+ XDP_RX_RING = 0x2
+ XDP_SHARED_UMEM = 0x1
+ XDP_STATISTICS = 0x7
+ XDP_TX_RING = 0x3
+ XDP_UMEM_COMPLETION_RING = 0x6
+ XDP_UMEM_FILL_RING = 0x5
+ XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
+ XDP_UMEM_PGOFF_FILL_RING = 0x100000000
+ XDP_UMEM_REG = 0x4
+ XDP_ZEROCOPY = 0x4
XENFS_SUPER_MAGIC = 0xabba1974
XTABS = 0x1800
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 506ba258c..eb52e9689 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -64,6 +64,7 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ AF_XDP = 0x2c
ALG_OP_DECRYPT = 0x0
ALG_OP_ENCRYPT = 0x1
ALG_SET_AEAD_ASSOCLEN = 0x4
@@ -974,6 +975,21 @@ const (
MCL_CURRENT = 0x2000
MCL_FUTURE = 0x4000
MCL_ONFAULT = 0x8000
+ MFD_ALLOW_SEALING = 0x2
+ MFD_CLOEXEC = 0x1
+ MFD_HUGETLB = 0x4
+ MFD_HUGE_16GB = -0x78000000
+ MFD_HUGE_16MB = 0x60000000
+ MFD_HUGE_1GB = 0x78000000
+ MFD_HUGE_1MB = 0x50000000
+ MFD_HUGE_256MB = 0x70000000
+ MFD_HUGE_2GB = 0x7c000000
+ MFD_HUGE_2MB = 0x54000000
+ MFD_HUGE_512KB = 0x4c000000
+ MFD_HUGE_64KB = 0x40000000
+ MFD_HUGE_8MB = 0x5c000000
+ MFD_HUGE_MASK = 0x3f
+ MFD_HUGE_SHIFT = 0x1a
MINIX2_SUPER_MAGIC = 0x2468
MINIX2_SUPER_MAGIC2 = 0x2478
MINIX3_SUPER_MAGIC = 0x4d5a
@@ -1852,6 +1868,7 @@ const (
SOL_TIPC = 0x10f
SOL_TLS = 0x11a
SOL_X25 = 0x106
+ SOL_XDP = 0x11b
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1e
SO_ATTACH_BPF = 0x32
@@ -1947,6 +1964,9 @@ const (
STATX_TYPE = 0x1
STATX_UID = 0x8
STATX__RESERVED = 0x80000000
+ SYNC_FILE_RANGE_WAIT_AFTER = 0x4
+ SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
+ SYNC_FILE_RANGE_WRITE = 0x2
SYSFS_MAGIC = 0x62656572
S_BLKSIZE = 0x200
S_IEXEC = 0x40
@@ -2334,6 +2354,26 @@ const (
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4000
+ XDP_COPY = 0x2
+ XDP_FLAGS_DRV_MODE = 0x4
+ XDP_FLAGS_HW_MODE = 0x8
+ XDP_FLAGS_MASK = 0xf
+ XDP_FLAGS_MODES = 0xe
+ XDP_FLAGS_SKB_MODE = 0x2
+ XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MMAP_OFFSETS = 0x1
+ XDP_PGOFF_RX_RING = 0x0
+ XDP_PGOFF_TX_RING = 0x80000000
+ XDP_RX_RING = 0x2
+ XDP_SHARED_UMEM = 0x1
+ XDP_STATISTICS = 0x7
+ XDP_TX_RING = 0x3
+ XDP_UMEM_COMPLETION_RING = 0x6
+ XDP_UMEM_FILL_RING = 0x5
+ XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
+ XDP_UMEM_PGOFF_FILL_RING = 0x100000000
+ XDP_UMEM_REG = 0x4
+ XDP_ZEROCOPY = 0x4
XENFS_SUPER_MAGIC = 0xabba1974
XTABS = 0xc00
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 b480cd109..0563d34b3 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -64,6 +64,7 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ AF_XDP = 0x2c
ALG_OP_DECRYPT = 0x0
ALG_OP_ENCRYPT = 0x1
ALG_SET_AEAD_ASSOCLEN = 0x4
@@ -974,6 +975,21 @@ const (
MCL_CURRENT = 0x2000
MCL_FUTURE = 0x4000
MCL_ONFAULT = 0x8000
+ MFD_ALLOW_SEALING = 0x2
+ MFD_CLOEXEC = 0x1
+ MFD_HUGETLB = 0x4
+ MFD_HUGE_16GB = -0x78000000
+ MFD_HUGE_16MB = 0x60000000
+ MFD_HUGE_1GB = 0x78000000
+ MFD_HUGE_1MB = 0x50000000
+ MFD_HUGE_256MB = 0x70000000
+ MFD_HUGE_2GB = 0x7c000000
+ MFD_HUGE_2MB = 0x54000000
+ MFD_HUGE_512KB = 0x4c000000
+ MFD_HUGE_64KB = 0x40000000
+ MFD_HUGE_8MB = 0x5c000000
+ MFD_HUGE_MASK = 0x3f
+ MFD_HUGE_SHIFT = 0x1a
MINIX2_SUPER_MAGIC = 0x2468
MINIX2_SUPER_MAGIC2 = 0x2478
MINIX3_SUPER_MAGIC = 0x4d5a
@@ -1852,6 +1868,7 @@ const (
SOL_TIPC = 0x10f
SOL_TLS = 0x11a
SOL_X25 = 0x106
+ SOL_XDP = 0x11b
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1e
SO_ATTACH_BPF = 0x32
@@ -1947,6 +1964,9 @@ const (
STATX_TYPE = 0x1
STATX_UID = 0x8
STATX__RESERVED = 0x80000000
+ SYNC_FILE_RANGE_WAIT_AFTER = 0x4
+ SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
+ SYNC_FILE_RANGE_WRITE = 0x2
SYSFS_MAGIC = 0x62656572
S_BLKSIZE = 0x200
S_IEXEC = 0x40
@@ -2334,6 +2354,26 @@ const (
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4000
+ XDP_COPY = 0x2
+ XDP_FLAGS_DRV_MODE = 0x4
+ XDP_FLAGS_HW_MODE = 0x8
+ XDP_FLAGS_MASK = 0xf
+ XDP_FLAGS_MODES = 0xe
+ XDP_FLAGS_SKB_MODE = 0x2
+ XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MMAP_OFFSETS = 0x1
+ XDP_PGOFF_RX_RING = 0x0
+ XDP_PGOFF_TX_RING = 0x80000000
+ XDP_RX_RING = 0x2
+ XDP_SHARED_UMEM = 0x1
+ XDP_STATISTICS = 0x7
+ XDP_TX_RING = 0x3
+ XDP_UMEM_COMPLETION_RING = 0x6
+ XDP_UMEM_FILL_RING = 0x5
+ XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
+ XDP_UMEM_PGOFF_FILL_RING = 0x100000000
+ XDP_UMEM_REG = 0x4
+ XDP_ZEROCOPY = 0x4
XENFS_SUPER_MAGIC = 0xabba1974
XTABS = 0xc00
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
new file mode 100644
index 000000000..e95e3f677
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
@@ -0,0 +1,2662 @@
+// mkerrors.sh -Wall -Werror -static -I/tmp/include
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build riscv64,linux
+
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+
+package unix
+
+import "syscall"
+
+const (
+ AAFS_MAGIC = 0x5a3c69f0
+ ADFS_SUPER_MAGIC = 0xadf5
+ AFFS_SUPER_MAGIC = 0xadff
+ AFS_FS_MAGIC = 0x6b414653
+ AFS_SUPER_MAGIC = 0x5346414f
+ AF_ALG = 0x26
+ AF_APPLETALK = 0x5
+ AF_ASH = 0x12
+ AF_ATMPVC = 0x8
+ AF_ATMSVC = 0x14
+ AF_AX25 = 0x3
+ AF_BLUETOOTH = 0x1f
+ AF_BRIDGE = 0x7
+ AF_CAIF = 0x25
+ AF_CAN = 0x1d
+ AF_DECnet = 0xc
+ AF_ECONET = 0x13
+ AF_FILE = 0x1
+ AF_IB = 0x1b
+ AF_IEEE802154 = 0x24
+ AF_INET = 0x2
+ AF_INET6 = 0xa
+ AF_IPX = 0x4
+ AF_IRDA = 0x17
+ AF_ISDN = 0x22
+ AF_IUCV = 0x20
+ AF_KCM = 0x29
+ AF_KEY = 0xf
+ AF_LLC = 0x1a
+ AF_LOCAL = 0x1
+ AF_MAX = 0x2c
+ AF_MPLS = 0x1c
+ AF_NETBEUI = 0xd
+ AF_NETLINK = 0x10
+ AF_NETROM = 0x6
+ AF_NFC = 0x27
+ AF_PACKET = 0x11
+ AF_PHONET = 0x23
+ AF_PPPOX = 0x18
+ AF_QIPCRTR = 0x2a
+ AF_RDS = 0x15
+ AF_ROSE = 0xb
+ AF_ROUTE = 0x10
+ AF_RXRPC = 0x21
+ AF_SECURITY = 0xe
+ AF_SMC = 0x2b
+ AF_SNA = 0x16
+ AF_TIPC = 0x1e
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ AF_VSOCK = 0x28
+ AF_WANPIPE = 0x19
+ AF_X25 = 0x9
+ AF_XDP = 0x2c
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
+ ANON_INODE_FS_MAGIC = 0x9041934
+ ARPHRD_6LOWPAN = 0x339
+ ARPHRD_ADAPT = 0x108
+ ARPHRD_APPLETLK = 0x8
+ ARPHRD_ARCNET = 0x7
+ ARPHRD_ASH = 0x30d
+ ARPHRD_ATM = 0x13
+ ARPHRD_AX25 = 0x3
+ ARPHRD_BIF = 0x307
+ ARPHRD_CAIF = 0x336
+ ARPHRD_CAN = 0x118
+ ARPHRD_CHAOS = 0x5
+ ARPHRD_CISCO = 0x201
+ ARPHRD_CSLIP = 0x101
+ ARPHRD_CSLIP6 = 0x103
+ ARPHRD_DDCMP = 0x205
+ ARPHRD_DLCI = 0xf
+ ARPHRD_ECONET = 0x30e
+ ARPHRD_EETHER = 0x2
+ ARPHRD_ETHER = 0x1
+ ARPHRD_EUI64 = 0x1b
+ ARPHRD_FCAL = 0x311
+ ARPHRD_FCFABRIC = 0x313
+ ARPHRD_FCPL = 0x312
+ ARPHRD_FCPP = 0x310
+ ARPHRD_FDDI = 0x306
+ ARPHRD_FRAD = 0x302
+ ARPHRD_HDLC = 0x201
+ ARPHRD_HIPPI = 0x30c
+ ARPHRD_HWX25 = 0x110
+ ARPHRD_IEEE1394 = 0x18
+ ARPHRD_IEEE802 = 0x6
+ ARPHRD_IEEE80211 = 0x321
+ ARPHRD_IEEE80211_PRISM = 0x322
+ ARPHRD_IEEE80211_RADIOTAP = 0x323
+ ARPHRD_IEEE802154 = 0x324
+ ARPHRD_IEEE802154_MONITOR = 0x325
+ ARPHRD_IEEE802_TR = 0x320
+ ARPHRD_INFINIBAND = 0x20
+ ARPHRD_IP6GRE = 0x337
+ ARPHRD_IPDDP = 0x309
+ ARPHRD_IPGRE = 0x30a
+ ARPHRD_IRDA = 0x30f
+ ARPHRD_LAPB = 0x204
+ ARPHRD_LOCALTLK = 0x305
+ ARPHRD_LOOPBACK = 0x304
+ ARPHRD_METRICOM = 0x17
+ ARPHRD_NETLINK = 0x338
+ ARPHRD_NETROM = 0x0
+ ARPHRD_NONE = 0xfffe
+ ARPHRD_PHONET = 0x334
+ ARPHRD_PHONET_PIPE = 0x335
+ ARPHRD_PIMREG = 0x30b
+ ARPHRD_PPP = 0x200
+ ARPHRD_PRONET = 0x4
+ ARPHRD_RAWHDLC = 0x206
+ ARPHRD_RAWIP = 0x207
+ ARPHRD_ROSE = 0x10e
+ ARPHRD_RSRVD = 0x104
+ ARPHRD_SIT = 0x308
+ ARPHRD_SKIP = 0x303
+ ARPHRD_SLIP = 0x100
+ ARPHRD_SLIP6 = 0x102
+ ARPHRD_TUNNEL = 0x300
+ ARPHRD_TUNNEL6 = 0x301
+ ARPHRD_VOID = 0xffff
+ ARPHRD_VSOCKMON = 0x33a
+ ARPHRD_X25 = 0x10f
+ AUTOFS_SUPER_MAGIC = 0x187
+ B0 = 0x0
+ B1000000 = 0x1008
+ B110 = 0x3
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1200 = 0x9
+ B134 = 0x4
+ B150 = 0x5
+ B1500000 = 0x100a
+ B1800 = 0xa
+ B19200 = 0xe
+ B200 = 0x6
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2400 = 0xb
+ B2500000 = 0x100c
+ B300 = 0x7
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B38400 = 0xf
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B4800 = 0xc
+ B50 = 0x1
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B600 = 0x8
+ B75 = 0x2
+ B921600 = 0x1007
+ B9600 = 0xd
+ BALLOON_KVM_MAGIC = 0x13661366
+ BDEVFS_MAGIC = 0x62646576
+ BINFMTFS_MAGIC = 0x42494e4d
+ BLKBSZGET = 0x80081270
+ BLKBSZSET = 0x40081271
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80081272
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKRRPART = 0x125f
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BOTHER = 0x1000
+ BPF_A = 0x10
+ BPF_ABS = 0x20
+ BPF_ADD = 0x0
+ BPF_ALU = 0x4
+ BPF_AND = 0x50
+ BPF_B = 0x10
+ BPF_DIV = 0x30
+ BPF_FS_MAGIC = 0xcafe4a11
+ BPF_H = 0x8
+ BPF_IMM = 0x0
+ BPF_IND = 0x40
+ BPF_JA = 0x0
+ BPF_JEQ = 0x10
+ BPF_JGE = 0x30
+ BPF_JGT = 0x20
+ BPF_JMP = 0x5
+ BPF_JSET = 0x40
+ BPF_K = 0x0
+ BPF_LD = 0x0
+ BPF_LDX = 0x1
+ BPF_LEN = 0x80
+ BPF_LL_OFF = -0x200000
+ BPF_LSH = 0x60
+ BPF_MAJOR_VERSION = 0x1
+ BPF_MAXINSNS = 0x1000
+ BPF_MEM = 0x60
+ BPF_MEMWORDS = 0x10
+ BPF_MINOR_VERSION = 0x1
+ BPF_MISC = 0x7
+ BPF_MOD = 0x90
+ BPF_MSH = 0xa0
+ BPF_MUL = 0x20
+ BPF_NEG = 0x80
+ BPF_NET_OFF = -0x100000
+ BPF_OR = 0x40
+ BPF_RET = 0x6
+ BPF_RSH = 0x70
+ BPF_ST = 0x2
+ BPF_STX = 0x3
+ BPF_SUB = 0x10
+ BPF_TAX = 0x0
+ BPF_TXA = 0x80
+ BPF_W = 0x0
+ BPF_X = 0x8
+ BPF_XOR = 0xa0
+ BRKINT = 0x2
+ BS0 = 0x0
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ BTRFS_SUPER_MAGIC = 0x9123683e
+ BTRFS_TEST_MAGIC = 0x73727279
+ CAN_BCM = 0x2
+ CAN_EFF_FLAG = 0x80000000
+ CAN_EFF_ID_BITS = 0x1d
+ CAN_EFF_MASK = 0x1fffffff
+ CAN_ERR_FLAG = 0x20000000
+ CAN_ERR_MASK = 0x1fffffff
+ CAN_INV_FILTER = 0x20000000
+ CAN_ISOTP = 0x6
+ CAN_MAX_DLC = 0x8
+ CAN_MAX_DLEN = 0x8
+ CAN_MCNET = 0x5
+ CAN_MTU = 0x10
+ CAN_NPROTO = 0x7
+ CAN_RAW = 0x1
+ CAN_RAW_FILTER_MAX = 0x200
+ CAN_RTR_FLAG = 0x40000000
+ CAN_SFF_ID_BITS = 0xb
+ CAN_SFF_MASK = 0x7ff
+ CAN_TP16 = 0x3
+ CAN_TP20 = 0x4
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CFLUSH = 0xf
+ CGROUP2_SUPER_MAGIC = 0x63677270
+ CGROUP_SUPER_MAGIC = 0x27e0eb
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CLOCK_BOOTTIME = 0x7
+ CLOCK_BOOTTIME_ALARM = 0x9
+ CLOCK_DEFAULT = 0x0
+ CLOCK_EXT = 0x1
+ CLOCK_INT = 0x2
+ CLOCK_MONOTONIC = 0x1
+ CLOCK_MONOTONIC_COARSE = 0x6
+ CLOCK_MONOTONIC_RAW = 0x4
+ CLOCK_PROCESS_CPUTIME_ID = 0x2
+ CLOCK_REALTIME = 0x0
+ CLOCK_REALTIME_ALARM = 0x8
+ CLOCK_REALTIME_COARSE = 0x5
+ CLOCK_TAI = 0xb
+ CLOCK_THREAD_CPUTIME_ID = 0x3
+ CLOCK_TXFROMRX = 0x4
+ CLOCK_TXINT = 0x3
+ CLONE_CHILD_CLEARTID = 0x200000
+ CLONE_CHILD_SETTID = 0x1000000
+ CLONE_DETACHED = 0x400000
+ CLONE_FILES = 0x400
+ CLONE_FS = 0x200
+ CLONE_IO = 0x80000000
+ CLONE_NEWCGROUP = 0x2000000
+ CLONE_NEWIPC = 0x8000000
+ CLONE_NEWNET = 0x40000000
+ CLONE_NEWNS = 0x20000
+ CLONE_NEWPID = 0x20000000
+ CLONE_NEWUSER = 0x10000000
+ CLONE_NEWUTS = 0x4000000
+ CLONE_PARENT = 0x8000
+ CLONE_PARENT_SETTID = 0x100000
+ CLONE_PTRACE = 0x2000
+ CLONE_SETTLS = 0x80000
+ CLONE_SIGHAND = 0x800
+ CLONE_SYSVSEM = 0x40000
+ CLONE_THREAD = 0x10000
+ CLONE_UNTRACED = 0x800000
+ CLONE_VFORK = 0x4000
+ CLONE_VM = 0x100
+ CMSPAR = 0x40000000
+ CODA_SUPER_MAGIC = 0x73757245
+ CR0 = 0x0
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRAMFS_MAGIC = 0x28cd3d45
+ CRDLY = 0x600
+ CREAD = 0x80
+ CRTSCTS = 0x80000000
+ CS5 = 0x0
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIGNAL = 0xff
+ CSIZE = 0x30
+ CSTART = 0x11
+ CSTATUS = 0x0
+ CSTOP = 0x13
+ CSTOPB = 0x40
+ CSUSP = 0x1a
+ DAXFS_MAGIC = 0x64646178
+ DEBUGFS_MAGIC = 0x64626720
+ DEVPTS_SUPER_MAGIC = 0x1cd1
+ DT_BLK = 0x6
+ DT_CHR = 0x2
+ DT_DIR = 0x4
+ DT_FIFO = 0x1
+ DT_LNK = 0xa
+ DT_REG = 0x8
+ DT_SOCK = 0xc
+ DT_UNKNOWN = 0x0
+ DT_WHT = 0xe
+ ECHO = 0x8
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ ECRYPTFS_SUPER_MAGIC = 0xf15f
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EFD_SEMAPHORE = 0x1
+ EFIVARFS_MAGIC = 0xde5e81e4
+ EFS_SUPER_MAGIC = 0x414a53
+ ENCODING_DEFAULT = 0x0
+ ENCODING_FM_MARK = 0x3
+ ENCODING_FM_SPACE = 0x4
+ ENCODING_MANCHESTER = 0x5
+ ENCODING_NRZ = 0x1
+ ENCODING_NRZI = 0x2
+ EPOLLERR = 0x8
+ EPOLLET = 0x80000000
+ EPOLLEXCLUSIVE = 0x10000000
+ EPOLLHUP = 0x10
+ EPOLLIN = 0x1
+ EPOLLMSG = 0x400
+ EPOLLONESHOT = 0x40000000
+ EPOLLOUT = 0x4
+ EPOLLPRI = 0x2
+ EPOLLRDBAND = 0x80
+ EPOLLRDHUP = 0x2000
+ EPOLLRDNORM = 0x40
+ EPOLLWAKEUP = 0x20000000
+ EPOLLWRBAND = 0x200
+ EPOLLWRNORM = 0x100
+ EPOLL_CLOEXEC = 0x80000
+ EPOLL_CTL_ADD = 0x1
+ EPOLL_CTL_DEL = 0x2
+ EPOLL_CTL_MOD = 0x3
+ ETH_P_1588 = 0x88f7
+ ETH_P_8021AD = 0x88a8
+ ETH_P_8021AH = 0x88e7
+ ETH_P_8021Q = 0x8100
+ ETH_P_80221 = 0x8917
+ ETH_P_802_2 = 0x4
+ ETH_P_802_3 = 0x1
+ ETH_P_802_3_MIN = 0x600
+ ETH_P_802_EX1 = 0x88b5
+ ETH_P_AARP = 0x80f3
+ ETH_P_AF_IUCV = 0xfbfb
+ ETH_P_ALL = 0x3
+ ETH_P_AOE = 0x88a2
+ ETH_P_ARCNET = 0x1a
+ ETH_P_ARP = 0x806
+ ETH_P_ATALK = 0x809b
+ ETH_P_ATMFATE = 0x8884
+ ETH_P_ATMMPOA = 0x884c
+ ETH_P_AX25 = 0x2
+ ETH_P_BATMAN = 0x4305
+ ETH_P_BPQ = 0x8ff
+ ETH_P_CAIF = 0xf7
+ ETH_P_CAN = 0xc
+ ETH_P_CANFD = 0xd
+ ETH_P_CONTROL = 0x16
+ ETH_P_CUST = 0x6006
+ ETH_P_DDCMP = 0x6
+ ETH_P_DEC = 0x6000
+ ETH_P_DIAG = 0x6005
+ ETH_P_DNA_DL = 0x6001
+ ETH_P_DNA_RC = 0x6002
+ ETH_P_DNA_RT = 0x6003
+ ETH_P_DSA = 0x1b
+ ETH_P_ECONET = 0x18
+ ETH_P_EDSA = 0xdada
+ ETH_P_ERSPAN = 0x88be
+ ETH_P_ERSPAN2 = 0x22eb
+ ETH_P_FCOE = 0x8906
+ ETH_P_FIP = 0x8914
+ ETH_P_HDLC = 0x19
+ ETH_P_HSR = 0x892f
+ ETH_P_IBOE = 0x8915
+ ETH_P_IEEE802154 = 0xf6
+ ETH_P_IEEEPUP = 0xa00
+ ETH_P_IEEEPUPAT = 0xa01
+ ETH_P_IFE = 0xed3e
+ ETH_P_IP = 0x800
+ ETH_P_IPV6 = 0x86dd
+ ETH_P_IPX = 0x8137
+ ETH_P_IRDA = 0x17
+ ETH_P_LAT = 0x6004
+ ETH_P_LINK_CTL = 0x886c
+ ETH_P_LOCALTALK = 0x9
+ ETH_P_LOOP = 0x60
+ ETH_P_LOOPBACK = 0x9000
+ ETH_P_MACSEC = 0x88e5
+ ETH_P_MAP = 0xf9
+ ETH_P_MOBITEX = 0x15
+ ETH_P_MPLS_MC = 0x8848
+ ETH_P_MPLS_UC = 0x8847
+ ETH_P_MVRP = 0x88f5
+ ETH_P_NCSI = 0x88f8
+ ETH_P_NSH = 0x894f
+ ETH_P_PAE = 0x888e
+ ETH_P_PAUSE = 0x8808
+ ETH_P_PHONET = 0xf5
+ ETH_P_PPPTALK = 0x10
+ ETH_P_PPP_DISC = 0x8863
+ ETH_P_PPP_MP = 0x8
+ ETH_P_PPP_SES = 0x8864
+ ETH_P_PREAUTH = 0x88c7
+ ETH_P_PRP = 0x88fb
+ ETH_P_PUP = 0x200
+ ETH_P_PUPAT = 0x201
+ ETH_P_QINQ1 = 0x9100
+ ETH_P_QINQ2 = 0x9200
+ ETH_P_QINQ3 = 0x9300
+ ETH_P_RARP = 0x8035
+ ETH_P_SCA = 0x6007
+ ETH_P_SLOW = 0x8809
+ ETH_P_SNAP = 0x5
+ ETH_P_TDLS = 0x890d
+ ETH_P_TEB = 0x6558
+ ETH_P_TIPC = 0x88ca
+ ETH_P_TRAILER = 0x1c
+ ETH_P_TR_802_2 = 0x11
+ ETH_P_TSN = 0x22f0
+ ETH_P_WAN_PPP = 0x7
+ ETH_P_WCCP = 0x883e
+ ETH_P_X25 = 0x805
+ ETH_P_XDSA = 0xf8
+ EXABYTE_ENABLE_NEST = 0xf0
+ EXT2_SUPER_MAGIC = 0xef53
+ EXT3_SUPER_MAGIC = 0xef53
+ EXT4_SUPER_MAGIC = 0xef53
+ EXTA = 0xe
+ EXTB = 0xf
+ EXTPROC = 0x10000
+ F2FS_SUPER_MAGIC = 0xf2f52010
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_UNSHARE_RANGE = 0x40
+ FALLOC_FL_ZERO_RANGE = 0x10
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0x400
+ FF0 = 0x0
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FLUSHO = 0x1000
+ FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
+ FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
+ FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
+ FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
+ FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
+ FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
+ FS_ENCRYPTION_MODE_INVALID = 0x0
+ FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
+ FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ FS_KEY_DESCRIPTOR_SIZE = 0x8
+ FS_KEY_DESC_PREFIX = "fscrypt:"
+ FS_KEY_DESC_PREFIX_SIZE = 0x8
+ FS_MAX_KEY_SIZE = 0x40
+ FS_POLICY_FLAGS_PAD_16 = 0x2
+ FS_POLICY_FLAGS_PAD_32 = 0x3
+ FS_POLICY_FLAGS_PAD_4 = 0x0
+ FS_POLICY_FLAGS_PAD_8 = 0x1
+ FS_POLICY_FLAGS_PAD_MASK = 0x3
+ FS_POLICY_FLAGS_VALID = 0x3
+ FUTEXFS_SUPER_MAGIC = 0xbad1dea
+ F_ADD_SEALS = 0x409
+ F_DUPFD = 0x0
+ F_DUPFD_CLOEXEC = 0x406
+ F_EXLCK = 0x4
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLEASE = 0x401
+ F_GETLK = 0x5
+ F_GETLK64 = 0x5
+ F_GETOWN = 0x9
+ F_GETOWN_EX = 0x10
+ F_GETPIPE_SZ = 0x408
+ F_GETSIG = 0xb
+ F_GET_FILE_RW_HINT = 0x40d
+ F_GET_RW_HINT = 0x40b
+ F_GET_SEALS = 0x40a
+ F_LOCK = 0x1
+ F_NOTIFY = 0x402
+ F_OFD_GETLK = 0x24
+ F_OFD_SETLK = 0x25
+ F_OFD_SETLKW = 0x26
+ F_OK = 0x0
+ F_RDLCK = 0x0
+ F_SEAL_GROW = 0x4
+ F_SEAL_SEAL = 0x1
+ F_SEAL_SHRINK = 0x2
+ F_SEAL_WRITE = 0x8
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLEASE = 0x400
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x8
+ F_SETOWN_EX = 0xf
+ F_SETPIPE_SZ = 0x407
+ F_SETSIG = 0xa
+ F_SET_FILE_RW_HINT = 0x40e
+ F_SET_RW_HINT = 0x40c
+ F_SHLCK = 0x8
+ F_TEST = 0x3
+ F_TLOCK = 0x2
+ F_ULOCK = 0x0
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ GENL_ADMIN_PERM = 0x1
+ GENL_CMD_CAP_DO = 0x2
+ GENL_CMD_CAP_DUMP = 0x4
+ GENL_CMD_CAP_HASPOL = 0x8
+ GENL_HDRLEN = 0x4
+ GENL_ID_CTRL = 0x10
+ GENL_ID_PMCRAID = 0x12
+ GENL_ID_VFS_DQUOT = 0x11
+ GENL_MAX_ID = 0x3ff
+ GENL_MIN_ID = 0x10
+ GENL_NAMSIZ = 0x10
+ GENL_START_ALLOC = 0x13
+ GENL_UNS_ADMIN_PERM = 0x10
+ GRND_NONBLOCK = 0x1
+ GRND_RANDOM = 0x2
+ HDIO_DRIVE_CMD = 0x31f
+ HDIO_DRIVE_CMD_AEB = 0x31e
+ HDIO_DRIVE_CMD_HDR_SIZE = 0x4
+ HDIO_DRIVE_HOB_HDR_SIZE = 0x8
+ HDIO_DRIVE_RESET = 0x31c
+ HDIO_DRIVE_TASK = 0x31e
+ HDIO_DRIVE_TASKFILE = 0x31d
+ HDIO_DRIVE_TASK_HDR_SIZE = 0x8
+ HDIO_GETGEO = 0x301
+ HDIO_GET_32BIT = 0x309
+ HDIO_GET_ACOUSTIC = 0x30f
+ HDIO_GET_ADDRESS = 0x310
+ HDIO_GET_BUSSTATE = 0x31a
+ HDIO_GET_DMA = 0x30b
+ HDIO_GET_IDENTITY = 0x30d
+ HDIO_GET_KEEPSETTINGS = 0x308
+ HDIO_GET_MULTCOUNT = 0x304
+ HDIO_GET_NICE = 0x30c
+ HDIO_GET_NOWERR = 0x30a
+ HDIO_GET_QDMA = 0x305
+ HDIO_GET_UNMASKINTR = 0x302
+ HDIO_GET_WCACHE = 0x30e
+ HDIO_OBSOLETE_IDENTITY = 0x307
+ HDIO_SCAN_HWIF = 0x328
+ HDIO_SET_32BIT = 0x324
+ HDIO_SET_ACOUSTIC = 0x32c
+ HDIO_SET_ADDRESS = 0x32f
+ HDIO_SET_BUSSTATE = 0x32d
+ HDIO_SET_DMA = 0x326
+ HDIO_SET_KEEPSETTINGS = 0x323
+ HDIO_SET_MULTCOUNT = 0x321
+ HDIO_SET_NICE = 0x329
+ HDIO_SET_NOWERR = 0x325
+ HDIO_SET_PIO_MODE = 0x327
+ HDIO_SET_QDMA = 0x32e
+ HDIO_SET_UNMASKINTR = 0x322
+ HDIO_SET_WCACHE = 0x32b
+ HDIO_SET_XFER = 0x306
+ HDIO_TRISTATE_HWIF = 0x31b
+ HDIO_UNREGISTER_HWIF = 0x32a
+ HOSTFS_SUPER_MAGIC = 0xc0ffee
+ HPFS_SUPER_MAGIC = 0xf995e849
+ HUGETLBFS_MAGIC = 0x958458f6
+ HUPCL = 0x400
+ IBSHIFT = 0x10
+ ICANON = 0x2
+ ICMPV6_FILTER = 0x1
+ ICRNL = 0x100
+ IEXTEN = 0x8000
+ IFA_F_DADFAILED = 0x8
+ IFA_F_DEPRECATED = 0x20
+ IFA_F_HOMEADDRESS = 0x10
+ IFA_F_MANAGETEMPADDR = 0x100
+ IFA_F_MCAUTOJOIN = 0x400
+ IFA_F_NODAD = 0x2
+ IFA_F_NOPREFIXROUTE = 0x200
+ IFA_F_OPTIMISTIC = 0x4
+ IFA_F_PERMANENT = 0x80
+ IFA_F_SECONDARY = 0x1
+ IFA_F_STABLE_PRIVACY = 0x800
+ IFA_F_TEMPORARY = 0x1
+ IFA_F_TENTATIVE = 0x40
+ IFA_MAX = 0x9
+ IFF_ALLMULTI = 0x200
+ IFF_ATTACH_QUEUE = 0x200
+ IFF_AUTOMEDIA = 0x4000
+ IFF_BROADCAST = 0x2
+ IFF_DEBUG = 0x4
+ IFF_DETACH_QUEUE = 0x400
+ IFF_DORMANT = 0x20000
+ IFF_DYNAMIC = 0x8000
+ IFF_ECHO = 0x40000
+ IFF_LOOPBACK = 0x8
+ IFF_LOWER_UP = 0x10000
+ IFF_MASTER = 0x400
+ IFF_MULTICAST = 0x1000
+ IFF_MULTI_QUEUE = 0x100
+ IFF_NAPI = 0x10
+ IFF_NAPI_FRAGS = 0x20
+ IFF_NOARP = 0x80
+ IFF_NOFILTER = 0x1000
+ IFF_NOTRAILERS = 0x20
+ IFF_NO_PI = 0x1000
+ IFF_ONE_QUEUE = 0x2000
+ IFF_PERSIST = 0x800
+ IFF_POINTOPOINT = 0x10
+ IFF_PORTSEL = 0x2000
+ IFF_PROMISC = 0x100
+ IFF_RUNNING = 0x40
+ IFF_SLAVE = 0x800
+ IFF_TAP = 0x2
+ IFF_TUN = 0x1
+ IFF_TUN_EXCL = 0x8000
+ IFF_UP = 0x1
+ IFF_VNET_HDR = 0x4000
+ IFF_VOLATILE = 0x70c5a
+ IFNAMSIZ = 0x10
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x2000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_ACCESS = 0x1
+ IN_ALL_EVENTS = 0xfff
+ IN_ATTRIB = 0x4
+ IN_CLASSA_HOST = 0xffffff
+ IN_CLASSA_MAX = 0x80
+ IN_CLASSA_NET = 0xff000000
+ IN_CLASSA_NSHIFT = 0x18
+ IN_CLASSB_HOST = 0xffff
+ IN_CLASSB_MAX = 0x10000
+ IN_CLASSB_NET = 0xffff0000
+ IN_CLASSB_NSHIFT = 0x10
+ IN_CLASSC_HOST = 0xff
+ IN_CLASSC_NET = 0xffffff00
+ IN_CLASSC_NSHIFT = 0x8
+ IN_CLOEXEC = 0x80000
+ IN_CLOSE = 0x18
+ IN_CLOSE_NOWRITE = 0x10
+ IN_CLOSE_WRITE = 0x8
+ IN_CREATE = 0x100
+ IN_DELETE = 0x200
+ IN_DELETE_SELF = 0x400
+ IN_DONT_FOLLOW = 0x2000000
+ IN_EXCL_UNLINK = 0x4000000
+ IN_IGNORED = 0x8000
+ IN_ISDIR = 0x40000000
+ IN_LOOPBACKNET = 0x7f
+ IN_MASK_ADD = 0x20000000
+ IN_MODIFY = 0x2
+ IN_MOVE = 0xc0
+ IN_MOVED_FROM = 0x40
+ IN_MOVED_TO = 0x80
+ IN_MOVE_SELF = 0x800
+ IN_NONBLOCK = 0x800
+ IN_ONESHOT = 0x80000000
+ IN_ONLYDIR = 0x1000000
+ IN_OPEN = 0x20
+ IN_Q_OVERFLOW = 0x4000
+ IN_UNMOUNT = 0x2000
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ IPPROTO_AH = 0x33
+ IPPROTO_BEETPH = 0x5e
+ IPPROTO_COMP = 0x6c
+ IPPROTO_DCCP = 0x21
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_ENCAP = 0x62
+ IPPROTO_ESP = 0x32
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IP = 0x0
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_MH = 0x87
+ IPPROTO_MPLS = 0x89
+ IPPROTO_MTP = 0x5c
+ IPPROTO_NONE = 0x3b
+ IPPROTO_PIM = 0x67
+ IPPROTO_PUP = 0xc
+ IPPROTO_RAW = 0xff
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_SCTP = 0x84
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_UDP = 0x11
+ IPPROTO_UDPLITE = 0x88
+ IPV6_2292DSTOPTS = 0x4
+ IPV6_2292HOPLIMIT = 0x8
+ IPV6_2292HOPOPTS = 0x3
+ IPV6_2292PKTINFO = 0x2
+ IPV6_2292PKTOPTIONS = 0x6
+ IPV6_2292RTHDR = 0x5
+ IPV6_ADDRFORM = 0x1
+ IPV6_ADDR_PREFERENCES = 0x48
+ IPV6_ADD_MEMBERSHIP = 0x14
+ IPV6_AUTHHDR = 0xa
+ IPV6_AUTOFLOWLABEL = 0x46
+ IPV6_CHECKSUM = 0x7
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DROP_MEMBERSHIP = 0x15
+ IPV6_DSTOPTS = 0x3b
+ IPV6_FREEBIND = 0x4e
+ IPV6_HDRINCL = 0x24
+ IPV6_HOPLIMIT = 0x34
+ IPV6_HOPOPTS = 0x36
+ IPV6_IPSEC_POLICY = 0x22
+ IPV6_JOIN_ANYCAST = 0x1b
+ IPV6_JOIN_GROUP = 0x14
+ IPV6_LEAVE_ANYCAST = 0x1c
+ IPV6_LEAVE_GROUP = 0x15
+ IPV6_MINHOPCOUNT = 0x49
+ IPV6_MTU = 0x18
+ IPV6_MTU_DISCOVER = 0x17
+ IPV6_MULTICAST_HOPS = 0x12
+ IPV6_MULTICAST_IF = 0x11
+ IPV6_MULTICAST_LOOP = 0x13
+ IPV6_NEXTHOP = 0x9
+ IPV6_ORIGDSTADDR = 0x4a
+ IPV6_PATHMTU = 0x3d
+ IPV6_PKTINFO = 0x32
+ IPV6_PMTUDISC_DO = 0x2
+ IPV6_PMTUDISC_DONT = 0x0
+ IPV6_PMTUDISC_INTERFACE = 0x4
+ IPV6_PMTUDISC_OMIT = 0x5
+ IPV6_PMTUDISC_PROBE = 0x3
+ IPV6_PMTUDISC_WANT = 0x1
+ IPV6_RECVDSTOPTS = 0x3a
+ IPV6_RECVERR = 0x19
+ IPV6_RECVFRAGSIZE = 0x4d
+ IPV6_RECVHOPLIMIT = 0x33
+ IPV6_RECVHOPOPTS = 0x35
+ IPV6_RECVORIGDSTADDR = 0x4a
+ IPV6_RECVPATHMTU = 0x3c
+ IPV6_RECVPKTINFO = 0x31
+ IPV6_RECVRTHDR = 0x38
+ IPV6_RECVTCLASS = 0x42
+ IPV6_ROUTER_ALERT = 0x16
+ IPV6_RTHDR = 0x39
+ IPV6_RTHDRDSTOPTS = 0x37
+ IPV6_RTHDR_LOOSE = 0x0
+ IPV6_RTHDR_STRICT = 0x1
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_RXDSTOPTS = 0x3b
+ IPV6_RXHOPOPTS = 0x36
+ IPV6_TCLASS = 0x43
+ IPV6_TRANSPARENT = 0x4b
+ IPV6_UNICAST_HOPS = 0x10
+ IPV6_UNICAST_IF = 0x4c
+ IPV6_V6ONLY = 0x1a
+ IPV6_XFRM_POLICY = 0x23
+ IP_ADD_MEMBERSHIP = 0x23
+ IP_ADD_SOURCE_MEMBERSHIP = 0x27
+ IP_BIND_ADDRESS_NO_PORT = 0x18
+ IP_BLOCK_SOURCE = 0x26
+ IP_CHECKSUM = 0x17
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DROP_MEMBERSHIP = 0x24
+ IP_DROP_SOURCE_MEMBERSHIP = 0x28
+ IP_FREEBIND = 0xf
+ IP_HDRINCL = 0x3
+ IP_IPSEC_POLICY = 0x10
+ IP_MAXPACKET = 0xffff
+ IP_MAX_MEMBERSHIPS = 0x14
+ IP_MF = 0x2000
+ IP_MINTTL = 0x15
+ IP_MSFILTER = 0x29
+ IP_MSS = 0x240
+ IP_MTU = 0xe
+ IP_MTU_DISCOVER = 0xa
+ IP_MULTICAST_ALL = 0x31
+ IP_MULTICAST_IF = 0x20
+ IP_MULTICAST_LOOP = 0x22
+ IP_MULTICAST_TTL = 0x21
+ IP_NODEFRAG = 0x16
+ IP_OFFMASK = 0x1fff
+ IP_OPTIONS = 0x4
+ IP_ORIGDSTADDR = 0x14
+ IP_PASSSEC = 0x12
+ IP_PKTINFO = 0x8
+ IP_PKTOPTIONS = 0x9
+ IP_PMTUDISC = 0xa
+ IP_PMTUDISC_DO = 0x2
+ IP_PMTUDISC_DONT = 0x0
+ IP_PMTUDISC_INTERFACE = 0x4
+ IP_PMTUDISC_OMIT = 0x5
+ IP_PMTUDISC_PROBE = 0x3
+ IP_PMTUDISC_WANT = 0x1
+ IP_RECVERR = 0xb
+ IP_RECVFRAGSIZE = 0x19
+ IP_RECVOPTS = 0x6
+ IP_RECVORIGDSTADDR = 0x14
+ IP_RECVRETOPTS = 0x7
+ IP_RECVTOS = 0xd
+ IP_RECVTTL = 0xc
+ IP_RETOPTS = 0x7
+ IP_RF = 0x8000
+ IP_ROUTER_ALERT = 0x5
+ IP_TOS = 0x1
+ IP_TRANSPARENT = 0x13
+ IP_TTL = 0x2
+ IP_UNBLOCK_SOURCE = 0x25
+ IP_UNICAST_IF = 0x32
+ IP_XFRM_POLICY = 0x11
+ ISIG = 0x1
+ ISOFS_SUPER_MAGIC = 0x9660
+ ISTRIP = 0x20
+ IUCLC = 0x200
+ IUTF8 = 0x4000
+ IXANY = 0x800
+ IXOFF = 0x1000
+ IXON = 0x400
+ JFFS2_SUPER_MAGIC = 0x72b6
+ KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CHOWN = 0x4
+ KEYCTL_CLEAR = 0x7
+ KEYCTL_DESCRIBE = 0x6
+ KEYCTL_DH_COMPUTE = 0x17
+ KEYCTL_GET_KEYRING_ID = 0x0
+ KEYCTL_GET_PERSISTENT = 0x16
+ KEYCTL_GET_SECURITY = 0x11
+ KEYCTL_INSTANTIATE = 0xc
+ KEYCTL_INSTANTIATE_IOV = 0x14
+ KEYCTL_INVALIDATE = 0x15
+ KEYCTL_JOIN_SESSION_KEYRING = 0x1
+ KEYCTL_LINK = 0x8
+ KEYCTL_NEGATE = 0xd
+ KEYCTL_READ = 0xb
+ KEYCTL_REJECT = 0x13
+ KEYCTL_RESTRICT_KEYRING = 0x1d
+ KEYCTL_REVOKE = 0x3
+ KEYCTL_SEARCH = 0xa
+ KEYCTL_SESSION_TO_PARENT = 0x12
+ KEYCTL_SETPERM = 0x5
+ KEYCTL_SET_REQKEY_KEYRING = 0xe
+ KEYCTL_SET_TIMEOUT = 0xf
+ KEYCTL_UNLINK = 0x9
+ KEYCTL_UPDATE = 0x2
+ KEY_REQKEY_DEFL_DEFAULT = 0x0
+ KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
+ KEY_REQKEY_DEFL_NO_CHANGE = -0x1
+ KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
+ KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
+ KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
+ KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
+ KEY_REQKEY_DEFL_USER_KEYRING = 0x4
+ KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
+ KEY_SPEC_GROUP_KEYRING = -0x6
+ KEY_SPEC_PROCESS_KEYRING = -0x2
+ KEY_SPEC_REQKEY_AUTH_KEY = -0x7
+ KEY_SPEC_REQUESTOR_KEYRING = -0x8
+ KEY_SPEC_SESSION_KEYRING = -0x3
+ KEY_SPEC_THREAD_KEYRING = -0x1
+ KEY_SPEC_USER_KEYRING = -0x4
+ KEY_SPEC_USER_SESSION_KEYRING = -0x5
+ LINUX_REBOOT_CMD_CAD_OFF = 0x0
+ LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
+ LINUX_REBOOT_CMD_HALT = 0xcdef0123
+ LINUX_REBOOT_CMD_KEXEC = 0x45584543
+ LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
+ LINUX_REBOOT_CMD_RESTART = 0x1234567
+ LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
+ LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
+ LINUX_REBOOT_MAGIC1 = 0xfee1dead
+ LINUX_REBOOT_MAGIC2 = 0x28121969
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ MADV_DODUMP = 0x11
+ MADV_DOFORK = 0xb
+ MADV_DONTDUMP = 0x10
+ MADV_DONTFORK = 0xa
+ MADV_DONTNEED = 0x4
+ MADV_FREE = 0x8
+ MADV_HUGEPAGE = 0xe
+ MADV_HWPOISON = 0x64
+ MADV_KEEPONFORK = 0x13
+ MADV_MERGEABLE = 0xc
+ MADV_NOHUGEPAGE = 0xf
+ MADV_NORMAL = 0x0
+ MADV_RANDOM = 0x1
+ MADV_REMOVE = 0x9
+ MADV_SEQUENTIAL = 0x2
+ MADV_UNMERGEABLE = 0xd
+ MADV_WILLNEED = 0x3
+ MADV_WIPEONFORK = 0x12
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x10
+ MAP_FIXED_NOREPLACE = 0x100000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_HUGE_MASK = 0x3f
+ MAP_HUGE_SHIFT = 0x1a
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_PRIVATE = 0x2
+ MAP_SHARED = 0x1
+ MAP_SHARED_VALIDATE = 0x3
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MAP_TYPE = 0xf
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ MFD_ALLOW_SEALING = 0x2
+ MFD_CLOEXEC = 0x1
+ MFD_HUGETLB = 0x4
+ MFD_HUGE_16GB = -0x78000000
+ MFD_HUGE_16MB = 0x60000000
+ MFD_HUGE_1GB = 0x78000000
+ MFD_HUGE_1MB = 0x50000000
+ MFD_HUGE_256MB = 0x70000000
+ MFD_HUGE_2GB = 0x7c000000
+ MFD_HUGE_2MB = 0x54000000
+ MFD_HUGE_512KB = 0x4c000000
+ MFD_HUGE_64KB = 0x40000000
+ MFD_HUGE_8MB = 0x5c000000
+ MFD_HUGE_MASK = 0x3f
+ MFD_HUGE_SHIFT = 0x1a
+ MINIX2_SUPER_MAGIC = 0x2468
+ MINIX2_SUPER_MAGIC2 = 0x2478
+ MINIX3_SUPER_MAGIC = 0x4d5a
+ MINIX_SUPER_MAGIC = 0x137f
+ MINIX_SUPER_MAGIC2 = 0x138f
+ MNT_DETACH = 0x2
+ MNT_EXPIRE = 0x4
+ MNT_FORCE = 0x1
+ MSDOS_SUPER_MAGIC = 0x4d44
+ MSG_BATCH = 0x40000
+ MSG_CMSG_CLOEXEC = 0x40000000
+ MSG_CONFIRM = 0x800
+ MSG_CTRUNC = 0x8
+ MSG_DONTROUTE = 0x4
+ MSG_DONTWAIT = 0x40
+ MSG_EOR = 0x80
+ MSG_ERRQUEUE = 0x2000
+ MSG_FASTOPEN = 0x20000000
+ MSG_FIN = 0x200
+ MSG_MORE = 0x8000
+ MSG_NOSIGNAL = 0x4000
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_PROXY = 0x10
+ MSG_RST = 0x1000
+ MSG_SYN = 0x400
+ MSG_TRUNC = 0x20
+ MSG_TRYHARD = 0x4
+ MSG_WAITALL = 0x100
+ MSG_WAITFORONE = 0x10000
+ MSG_ZEROCOPY = 0x4000000
+ MS_ACTIVE = 0x40000000
+ MS_ASYNC = 0x1
+ MS_BIND = 0x1000
+ MS_BORN = 0x20000000
+ MS_DIRSYNC = 0x80
+ MS_INVALIDATE = 0x2
+ MS_I_VERSION = 0x800000
+ MS_KERNMOUNT = 0x400000
+ MS_LAZYTIME = 0x2000000
+ MS_MANDLOCK = 0x40
+ MS_MGC_MSK = 0xffff0000
+ MS_MGC_VAL = 0xc0ed0000
+ MS_MOVE = 0x2000
+ MS_NOATIME = 0x400
+ MS_NODEV = 0x4
+ MS_NODIRATIME = 0x800
+ MS_NOEXEC = 0x8
+ MS_NOREMOTELOCK = 0x8000000
+ MS_NOSEC = 0x10000000
+ MS_NOSUID = 0x2
+ MS_NOUSER = -0x80000000
+ MS_POSIXACL = 0x10000
+ MS_PRIVATE = 0x40000
+ MS_RDONLY = 0x1
+ MS_REC = 0x4000
+ MS_RELATIME = 0x200000
+ MS_REMOUNT = 0x20
+ MS_RMT_MASK = 0x2800051
+ MS_SHARED = 0x100000
+ MS_SILENT = 0x8000
+ MS_SLAVE = 0x80000
+ MS_STRICTATIME = 0x1000000
+ MS_SUBMOUNT = 0x4000000
+ MS_SYNC = 0x4
+ MS_SYNCHRONOUS = 0x10
+ MS_UNBINDABLE = 0x20000
+ MS_VERBOSE = 0x8000
+ MTD_INODE_FS_MAGIC = 0x11307854
+ NAME_MAX = 0xff
+ NCP_SUPER_MAGIC = 0x564c
+ NETLINK_ADD_MEMBERSHIP = 0x1
+ NETLINK_AUDIT = 0x9
+ NETLINK_BROADCAST_ERROR = 0x4
+ NETLINK_CAP_ACK = 0xa
+ NETLINK_CONNECTOR = 0xb
+ NETLINK_CRYPTO = 0x15
+ NETLINK_DNRTMSG = 0xe
+ NETLINK_DROP_MEMBERSHIP = 0x2
+ NETLINK_ECRYPTFS = 0x13
+ NETLINK_EXT_ACK = 0xb
+ NETLINK_FIB_LOOKUP = 0xa
+ NETLINK_FIREWALL = 0x3
+ NETLINK_GENERIC = 0x10
+ NETLINK_INET_DIAG = 0x4
+ NETLINK_IP6_FW = 0xd
+ NETLINK_ISCSI = 0x8
+ NETLINK_KOBJECT_UEVENT = 0xf
+ NETLINK_LISTEN_ALL_NSID = 0x8
+ NETLINK_LIST_MEMBERSHIPS = 0x9
+ NETLINK_NETFILTER = 0xc
+ NETLINK_NFLOG = 0x5
+ NETLINK_NO_ENOBUFS = 0x5
+ NETLINK_PKTINFO = 0x3
+ NETLINK_RDMA = 0x14
+ NETLINK_ROUTE = 0x0
+ NETLINK_RX_RING = 0x6
+ NETLINK_SCSITRANSPORT = 0x12
+ NETLINK_SELINUX = 0x7
+ NETLINK_SMC = 0x16
+ NETLINK_SOCK_DIAG = 0x4
+ NETLINK_TX_RING = 0x7
+ NETLINK_UNUSED = 0x1
+ NETLINK_USERSOCK = 0x2
+ NETLINK_XFRM = 0x6
+ NETNSA_MAX = 0x3
+ NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFNETLINK_V0 = 0x0
+ NFNLGRP_ACCT_QUOTA = 0x8
+ NFNLGRP_CONNTRACK_DESTROY = 0x3
+ NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
+ NFNLGRP_CONNTRACK_EXP_NEW = 0x4
+ NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
+ NFNLGRP_CONNTRACK_NEW = 0x1
+ NFNLGRP_CONNTRACK_UPDATE = 0x2
+ NFNLGRP_MAX = 0x9
+ NFNLGRP_NFTABLES = 0x7
+ NFNLGRP_NFTRACE = 0x9
+ NFNLGRP_NONE = 0x0
+ NFNL_BATCH_MAX = 0x1
+ NFNL_MSG_BATCH_BEGIN = 0x10
+ NFNL_MSG_BATCH_END = 0x11
+ NFNL_NFA_NEST = 0x8000
+ NFNL_SUBSYS_ACCT = 0x7
+ NFNL_SUBSYS_COUNT = 0xc
+ NFNL_SUBSYS_CTHELPER = 0x9
+ NFNL_SUBSYS_CTNETLINK = 0x1
+ NFNL_SUBSYS_CTNETLINK_EXP = 0x2
+ NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
+ NFNL_SUBSYS_IPSET = 0x6
+ NFNL_SUBSYS_NFTABLES = 0xa
+ NFNL_SUBSYS_NFT_COMPAT = 0xb
+ NFNL_SUBSYS_NONE = 0x0
+ NFNL_SUBSYS_OSF = 0x5
+ NFNL_SUBSYS_QUEUE = 0x3
+ NFNL_SUBSYS_ULOG = 0x4
+ NFS_SUPER_MAGIC = 0x6969
+ NILFS_SUPER_MAGIC = 0x3434
+ NL0 = 0x0
+ NL1 = 0x100
+ NLA_ALIGNTO = 0x4
+ NLA_F_NESTED = 0x8000
+ NLA_F_NET_BYTEORDER = 0x4000
+ NLA_HDRLEN = 0x4
+ NLDLY = 0x100
+ NLMSG_ALIGNTO = 0x4
+ NLMSG_DONE = 0x3
+ NLMSG_ERROR = 0x2
+ NLMSG_HDRLEN = 0x10
+ NLMSG_MIN_TYPE = 0x10
+ NLMSG_NOOP = 0x1
+ NLMSG_OVERRUN = 0x4
+ NLM_F_ACK = 0x4
+ NLM_F_ACK_TLVS = 0x200
+ NLM_F_APPEND = 0x800
+ NLM_F_ATOMIC = 0x400
+ NLM_F_CAPPED = 0x100
+ NLM_F_CREATE = 0x400
+ NLM_F_DUMP = 0x300
+ NLM_F_DUMP_FILTERED = 0x20
+ NLM_F_DUMP_INTR = 0x10
+ NLM_F_ECHO = 0x8
+ NLM_F_EXCL = 0x200
+ NLM_F_MATCH = 0x200
+ NLM_F_MULTI = 0x2
+ NLM_F_NONREC = 0x100
+ NLM_F_REPLACE = 0x100
+ NLM_F_REQUEST = 0x1
+ NLM_F_ROOT = 0x100
+ NOFLSH = 0x80
+ NSFS_MAGIC = 0x6e736673
+ OCFS2_SUPER_MAGIC = 0x7461636f
+ OCRNL = 0x8
+ OFDEL = 0x80
+ OFILL = 0x40
+ OLCUC = 0x2
+ ONLCR = 0x4
+ ONLRET = 0x20
+ ONOCR = 0x10
+ OPENPROM_SUPER_MAGIC = 0x9fa1
+ OPOST = 0x1
+ OVERLAYFS_SUPER_MAGIC = 0x794c7630
+ O_ACCMODE = 0x3
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x4000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ O_WRONLY = 0x1
+ PACKET_ADD_MEMBERSHIP = 0x1
+ PACKET_AUXDATA = 0x8
+ PACKET_BROADCAST = 0x1
+ PACKET_COPY_THRESH = 0x7
+ PACKET_DROP_MEMBERSHIP = 0x2
+ PACKET_FANOUT = 0x12
+ PACKET_FANOUT_CBPF = 0x6
+ PACKET_FANOUT_CPU = 0x2
+ PACKET_FANOUT_DATA = 0x16
+ PACKET_FANOUT_EBPF = 0x7
+ PACKET_FANOUT_FLAG_DEFRAG = 0x8000
+ PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
+ PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
+ PACKET_FANOUT_HASH = 0x0
+ PACKET_FANOUT_LB = 0x1
+ PACKET_FANOUT_QM = 0x5
+ PACKET_FANOUT_RND = 0x4
+ PACKET_FANOUT_ROLLOVER = 0x3
+ PACKET_FASTROUTE = 0x6
+ PACKET_HDRLEN = 0xb
+ PACKET_HOST = 0x0
+ PACKET_KERNEL = 0x7
+ PACKET_LOOPBACK = 0x5
+ PACKET_LOSS = 0xe
+ PACKET_MR_ALLMULTI = 0x2
+ PACKET_MR_MULTICAST = 0x0
+ PACKET_MR_PROMISC = 0x1
+ PACKET_MR_UNICAST = 0x3
+ PACKET_MULTICAST = 0x2
+ PACKET_ORIGDEV = 0x9
+ PACKET_OTHERHOST = 0x3
+ PACKET_OUTGOING = 0x4
+ PACKET_QDISC_BYPASS = 0x14
+ PACKET_RECV_OUTPUT = 0x3
+ PACKET_RESERVE = 0xc
+ PACKET_ROLLOVER_STATS = 0x15
+ PACKET_RX_RING = 0x5
+ PACKET_STATISTICS = 0x6
+ PACKET_TIMESTAMP = 0x11
+ PACKET_TX_HAS_OFF = 0x13
+ PACKET_TX_RING = 0xd
+ PACKET_TX_TIMESTAMP = 0x10
+ PACKET_USER = 0x6
+ PACKET_VERSION = 0xa
+ PACKET_VNET_HDR = 0xf
+ PARENB = 0x100
+ PARITY_CRC16_PR0 = 0x2
+ PARITY_CRC16_PR0_CCITT = 0x4
+ PARITY_CRC16_PR1 = 0x3
+ PARITY_CRC16_PR1_CCITT = 0x5
+ PARITY_CRC32_PR0_CCITT = 0x6
+ PARITY_CRC32_PR1_CCITT = 0x7
+ PARITY_DEFAULT = 0x0
+ PARITY_NONE = 0x1
+ PARMRK = 0x8
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PIPEFS_MAGIC = 0x50495045
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROC_SUPER_MAGIC = 0x9fa0
+ PROT_EXEC = 0x4
+ PROT_GROWSDOWN = 0x1000000
+ PROT_GROWSUP = 0x2000000
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ PR_CAPBSET_DROP = 0x18
+ PR_CAPBSET_READ = 0x17
+ PR_CAP_AMBIENT = 0x2f
+ PR_CAP_AMBIENT_CLEAR_ALL = 0x4
+ PR_CAP_AMBIENT_IS_SET = 0x1
+ PR_CAP_AMBIENT_LOWER = 0x3
+ PR_CAP_AMBIENT_RAISE = 0x2
+ PR_ENDIAN_BIG = 0x0
+ PR_ENDIAN_LITTLE = 0x1
+ PR_ENDIAN_PPC_LITTLE = 0x2
+ PR_FPEMU_NOPRINT = 0x1
+ PR_FPEMU_SIGFPE = 0x2
+ PR_FP_EXC_ASYNC = 0x2
+ PR_FP_EXC_DISABLED = 0x0
+ PR_FP_EXC_DIV = 0x10000
+ PR_FP_EXC_INV = 0x100000
+ PR_FP_EXC_NONRECOV = 0x1
+ PR_FP_EXC_OVF = 0x20000
+ PR_FP_EXC_PRECISE = 0x3
+ PR_FP_EXC_RES = 0x80000
+ PR_FP_EXC_SW_ENABLE = 0x80
+ PR_FP_EXC_UND = 0x40000
+ PR_FP_MODE_FR = 0x1
+ PR_FP_MODE_FRE = 0x2
+ PR_GET_CHILD_SUBREAPER = 0x25
+ PR_GET_DUMPABLE = 0x3
+ PR_GET_ENDIAN = 0x13
+ PR_GET_FPEMU = 0x9
+ PR_GET_FPEXC = 0xb
+ PR_GET_FP_MODE = 0x2e
+ PR_GET_KEEPCAPS = 0x7
+ PR_GET_NAME = 0x10
+ PR_GET_NO_NEW_PRIVS = 0x27
+ PR_GET_PDEATHSIG = 0x2
+ PR_GET_SECCOMP = 0x15
+ PR_GET_SECUREBITS = 0x1b
+ PR_GET_SPECULATION_CTRL = 0x34
+ PR_GET_THP_DISABLE = 0x2a
+ PR_GET_TID_ADDRESS = 0x28
+ PR_GET_TIMERSLACK = 0x1e
+ PR_GET_TIMING = 0xd
+ PR_GET_TSC = 0x19
+ PR_GET_UNALIGN = 0x5
+ PR_MCE_KILL = 0x21
+ PR_MCE_KILL_CLEAR = 0x0
+ PR_MCE_KILL_DEFAULT = 0x2
+ PR_MCE_KILL_EARLY = 0x1
+ PR_MCE_KILL_GET = 0x22
+ PR_MCE_KILL_LATE = 0x0
+ PR_MCE_KILL_SET = 0x1
+ PR_MPX_DISABLE_MANAGEMENT = 0x2c
+ PR_MPX_ENABLE_MANAGEMENT = 0x2b
+ PR_SET_CHILD_SUBREAPER = 0x24
+ PR_SET_DUMPABLE = 0x4
+ PR_SET_ENDIAN = 0x14
+ PR_SET_FPEMU = 0xa
+ PR_SET_FPEXC = 0xc
+ PR_SET_FP_MODE = 0x2d
+ PR_SET_KEEPCAPS = 0x8
+ PR_SET_MM = 0x23
+ PR_SET_MM_ARG_END = 0x9
+ PR_SET_MM_ARG_START = 0x8
+ PR_SET_MM_AUXV = 0xc
+ PR_SET_MM_BRK = 0x7
+ PR_SET_MM_END_CODE = 0x2
+ PR_SET_MM_END_DATA = 0x4
+ PR_SET_MM_ENV_END = 0xb
+ PR_SET_MM_ENV_START = 0xa
+ PR_SET_MM_EXE_FILE = 0xd
+ PR_SET_MM_MAP = 0xe
+ PR_SET_MM_MAP_SIZE = 0xf
+ PR_SET_MM_START_BRK = 0x6
+ PR_SET_MM_START_CODE = 0x1
+ PR_SET_MM_START_DATA = 0x3
+ PR_SET_MM_START_STACK = 0x5
+ PR_SET_NAME = 0xf
+ PR_SET_NO_NEW_PRIVS = 0x26
+ PR_SET_PDEATHSIG = 0x1
+ PR_SET_PTRACER = 0x59616d61
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PR_SET_SECCOMP = 0x16
+ PR_SET_SECUREBITS = 0x1c
+ PR_SET_SPECULATION_CTRL = 0x35
+ PR_SET_THP_DISABLE = 0x29
+ PR_SET_TIMERSLACK = 0x1d
+ PR_SET_TIMING = 0xe
+ PR_SET_TSC = 0x1a
+ PR_SET_UNALIGN = 0x6
+ PR_SPEC_DISABLE = 0x4
+ PR_SPEC_ENABLE = 0x2
+ PR_SPEC_FORCE_DISABLE = 0x8
+ PR_SPEC_NOT_AFFECTED = 0x0
+ PR_SPEC_PRCTL = 0x1
+ PR_SPEC_STORE_BYPASS = 0x0
+ PR_SVE_GET_VL = 0x33
+ PR_SVE_SET_VL = 0x32
+ PR_SVE_SET_VL_ONEXEC = 0x40000
+ PR_SVE_VL_INHERIT = 0x20000
+ PR_SVE_VL_LEN_MASK = 0xffff
+ PR_TASK_PERF_EVENTS_DISABLE = 0x1f
+ PR_TASK_PERF_EVENTS_ENABLE = 0x20
+ PR_TIMING_STATISTICAL = 0x0
+ PR_TIMING_TIMESTAMP = 0x1
+ PR_TSC_ENABLE = 0x1
+ PR_TSC_SIGSEGV = 0x2
+ PR_UNALIGN_NOPRINT = 0x1
+ PR_UNALIGN_SIGBUS = 0x2
+ PSTOREFS_MAGIC = 0x6165676c
+ PTRACE_ATTACH = 0x10
+ PTRACE_CONT = 0x7
+ PTRACE_DETACH = 0x11
+ PTRACE_EVENT_CLONE = 0x3
+ PTRACE_EVENT_EXEC = 0x4
+ PTRACE_EVENT_EXIT = 0x6
+ PTRACE_EVENT_FORK = 0x1
+ PTRACE_EVENT_SECCOMP = 0x7
+ PTRACE_EVENT_STOP = 0x80
+ PTRACE_EVENT_VFORK = 0x2
+ PTRACE_EVENT_VFORK_DONE = 0x5
+ PTRACE_GETEVENTMSG = 0x4201
+ PTRACE_GETREGS = 0xc
+ PTRACE_GETREGSET = 0x4204
+ PTRACE_GETSIGINFO = 0x4202
+ PTRACE_GETSIGMASK = 0x420a
+ PTRACE_INTERRUPT = 0x4207
+ PTRACE_KILL = 0x8
+ PTRACE_LISTEN = 0x4208
+ PTRACE_O_EXITKILL = 0x100000
+ PTRACE_O_MASK = 0x3000ff
+ PTRACE_O_SUSPEND_SECCOMP = 0x200000
+ PTRACE_O_TRACECLONE = 0x8
+ PTRACE_O_TRACEEXEC = 0x10
+ PTRACE_O_TRACEEXIT = 0x40
+ PTRACE_O_TRACEFORK = 0x2
+ PTRACE_O_TRACESECCOMP = 0x80
+ PTRACE_O_TRACESYSGOOD = 0x1
+ PTRACE_O_TRACEVFORK = 0x4
+ PTRACE_O_TRACEVFORKDONE = 0x20
+ PTRACE_PEEKDATA = 0x2
+ PTRACE_PEEKSIGINFO = 0x4209
+ PTRACE_PEEKSIGINFO_SHARED = 0x1
+ PTRACE_PEEKTEXT = 0x1
+ PTRACE_PEEKUSR = 0x3
+ PTRACE_POKEDATA = 0x5
+ PTRACE_POKETEXT = 0x4
+ PTRACE_POKEUSR = 0x6
+ PTRACE_SECCOMP_GET_FILTER = 0x420c
+ PTRACE_SECCOMP_GET_METADATA = 0x420d
+ PTRACE_SEIZE = 0x4206
+ PTRACE_SETOPTIONS = 0x4200
+ PTRACE_SETREGS = 0xd
+ PTRACE_SETREGSET = 0x4205
+ PTRACE_SETSIGINFO = 0x4203
+ PTRACE_SETSIGMASK = 0x420b
+ PTRACE_SINGLESTEP = 0x9
+ PTRACE_SYSCALL = 0x18
+ PTRACE_TRACEME = 0x0
+ QNX4_SUPER_MAGIC = 0x2f
+ QNX6_SUPER_MAGIC = 0x68191122
+ RAMFS_MAGIC = 0x858458f6
+ RDTGROUP_SUPER_MAGIC = 0x7655821
+ REISERFS_SUPER_MAGIC = 0x52654973
+ RENAME_EXCHANGE = 0x2
+ RENAME_NOREPLACE = 0x1
+ RENAME_WHITEOUT = 0x4
+ RLIMIT_AS = 0x9
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_LOCKS = 0xa
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_MSGQUEUE = 0xc
+ RLIMIT_NICE = 0xd
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RLIMIT_RTPRIO = 0xe
+ RLIMIT_RTTIME = 0xf
+ RLIMIT_SIGPENDING = 0xb
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = 0xffffffffffffffff
+ RTAX_ADVMSS = 0x8
+ RTAX_CC_ALGO = 0x10
+ RTAX_CWND = 0x7
+ RTAX_FASTOPEN_NO_COOKIE = 0x11
+ RTAX_FEATURES = 0xc
+ RTAX_FEATURE_ALLFRAG = 0x8
+ RTAX_FEATURE_ECN = 0x1
+ RTAX_FEATURE_MASK = 0xf
+ RTAX_FEATURE_SACK = 0x2
+ RTAX_FEATURE_TIMESTAMP = 0x4
+ RTAX_HOPLIMIT = 0xa
+ RTAX_INITCWND = 0xb
+ RTAX_INITRWND = 0xe
+ RTAX_LOCK = 0x1
+ RTAX_MAX = 0x11
+ RTAX_MTU = 0x2
+ RTAX_QUICKACK = 0xf
+ RTAX_REORDERING = 0x9
+ RTAX_RTO_MIN = 0xd
+ RTAX_RTT = 0x4
+ RTAX_RTTVAR = 0x5
+ RTAX_SSTHRESH = 0x6
+ RTAX_UNSPEC = 0x0
+ RTAX_WINDOW = 0x3
+ RTA_ALIGNTO = 0x4
+ RTA_MAX = 0x1d
+ RTCF_DIRECTSRC = 0x4000000
+ RTCF_DOREDIRECT = 0x1000000
+ RTCF_LOG = 0x2000000
+ RTCF_MASQ = 0x400000
+ RTCF_NAT = 0x800000
+ RTCF_VALVE = 0x200000
+ RTC_AF = 0x20
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8008700d
+ RTC_EPOCH_SET = 0x4008700e
+ RTC_IRQF = 0x80
+ RTC_IRQP_READ = 0x8008700b
+ RTC_IRQP_SET = 0x4008700c
+ RTC_MAX_FREQ = 0x2000
+ RTC_PF = 0x40
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x80207011
+ RTC_PLL_SET = 0x40207012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UF = 0x10
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ RTF_ADDRCLASSMASK = 0xf8000000
+ RTF_ADDRCONF = 0x40000
+ RTF_ALLONLINK = 0x20000
+ RTF_BROADCAST = 0x10000000
+ RTF_CACHE = 0x1000000
+ RTF_DEFAULT = 0x10000
+ RTF_DYNAMIC = 0x10
+ RTF_FLOW = 0x2000000
+ RTF_GATEWAY = 0x2
+ RTF_HOST = 0x4
+ RTF_INTERFACE = 0x40000000
+ RTF_IRTT = 0x100
+ RTF_LINKRT = 0x100000
+ RTF_LOCAL = 0x80000000
+ RTF_MODIFIED = 0x20
+ RTF_MSS = 0x40
+ RTF_MTU = 0x40
+ RTF_MULTICAST = 0x20000000
+ RTF_NAT = 0x8000000
+ RTF_NOFORWARD = 0x1000
+ RTF_NONEXTHOP = 0x200000
+ RTF_NOPMTUDISC = 0x4000
+ RTF_POLICY = 0x4000000
+ RTF_REINSTATE = 0x8
+ RTF_REJECT = 0x200
+ RTF_STATIC = 0x400
+ RTF_THROW = 0x2000
+ RTF_UP = 0x1
+ RTF_WINDOW = 0x80
+ RTF_XRESOLVE = 0x800
+ RTM_BASE = 0x10
+ RTM_DELACTION = 0x31
+ RTM_DELADDR = 0x15
+ RTM_DELADDRLABEL = 0x49
+ RTM_DELLINK = 0x11
+ RTM_DELMDB = 0x55
+ RTM_DELNEIGH = 0x1d
+ RTM_DELNETCONF = 0x51
+ RTM_DELNSID = 0x59
+ RTM_DELQDISC = 0x25
+ RTM_DELROUTE = 0x19
+ RTM_DELRULE = 0x21
+ RTM_DELTCLASS = 0x29
+ RTM_DELTFILTER = 0x2d
+ RTM_F_CLONED = 0x200
+ RTM_F_EQUALIZE = 0x400
+ RTM_F_FIB_MATCH = 0x2000
+ RTM_F_LOOKUP_TABLE = 0x1000
+ RTM_F_NOTIFY = 0x100
+ RTM_F_PREFIX = 0x800
+ RTM_GETACTION = 0x32
+ RTM_GETADDR = 0x16
+ RTM_GETADDRLABEL = 0x4a
+ RTM_GETANYCAST = 0x3e
+ RTM_GETDCB = 0x4e
+ RTM_GETLINK = 0x12
+ RTM_GETMDB = 0x56
+ RTM_GETMULTICAST = 0x3a
+ RTM_GETNEIGH = 0x1e
+ RTM_GETNEIGHTBL = 0x42
+ RTM_GETNETCONF = 0x52
+ RTM_GETNSID = 0x5a
+ RTM_GETQDISC = 0x26
+ RTM_GETROUTE = 0x1a
+ RTM_GETRULE = 0x22
+ RTM_GETSTATS = 0x5e
+ RTM_GETTCLASS = 0x2a
+ RTM_GETTFILTER = 0x2e
+ RTM_MAX = 0x63
+ RTM_NEWACTION = 0x30
+ RTM_NEWADDR = 0x14
+ RTM_NEWADDRLABEL = 0x48
+ RTM_NEWCACHEREPORT = 0x60
+ RTM_NEWLINK = 0x10
+ RTM_NEWMDB = 0x54
+ RTM_NEWNDUSEROPT = 0x44
+ RTM_NEWNEIGH = 0x1c
+ RTM_NEWNEIGHTBL = 0x40
+ RTM_NEWNETCONF = 0x50
+ RTM_NEWNSID = 0x58
+ RTM_NEWPREFIX = 0x34
+ RTM_NEWQDISC = 0x24
+ RTM_NEWROUTE = 0x18
+ RTM_NEWRULE = 0x20
+ RTM_NEWSTATS = 0x5c
+ RTM_NEWTCLASS = 0x28
+ RTM_NEWTFILTER = 0x2c
+ RTM_NR_FAMILIES = 0x15
+ RTM_NR_MSGTYPES = 0x54
+ RTM_SETDCB = 0x4f
+ RTM_SETLINK = 0x13
+ RTM_SETNEIGHTBL = 0x43
+ RTNH_ALIGNTO = 0x4
+ RTNH_COMPARE_MASK = 0x19
+ RTNH_F_DEAD = 0x1
+ RTNH_F_LINKDOWN = 0x10
+ RTNH_F_OFFLOAD = 0x8
+ RTNH_F_ONLINK = 0x4
+ RTNH_F_PERVASIVE = 0x2
+ RTNH_F_UNRESOLVED = 0x20
+ RTN_MAX = 0xb
+ RTPROT_BABEL = 0x2a
+ RTPROT_BGP = 0xba
+ RTPROT_BIRD = 0xc
+ RTPROT_BOOT = 0x3
+ RTPROT_DHCP = 0x10
+ RTPROT_DNROUTED = 0xd
+ RTPROT_EIGRP = 0xc0
+ RTPROT_GATED = 0x8
+ RTPROT_ISIS = 0xbb
+ RTPROT_KERNEL = 0x2
+ RTPROT_MROUTED = 0x11
+ RTPROT_MRT = 0xa
+ RTPROT_NTK = 0xf
+ RTPROT_OSPF = 0xbc
+ RTPROT_RA = 0x9
+ RTPROT_REDIRECT = 0x1
+ RTPROT_RIP = 0xbd
+ RTPROT_STATIC = 0x4
+ RTPROT_UNSPEC = 0x0
+ RTPROT_XORP = 0xe
+ RTPROT_ZEBRA = 0xb
+ RT_CLASS_DEFAULT = 0xfd
+ RT_CLASS_LOCAL = 0xff
+ RT_CLASS_MAIN = 0xfe
+ RT_CLASS_MAX = 0xff
+ RT_CLASS_UNSPEC = 0x0
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ RUSAGE_THREAD = 0x1
+ SCM_CREDENTIALS = 0x2
+ SCM_RIGHTS = 0x1
+ SCM_TIMESTAMP = 0x1d
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_WIFI_STATUS = 0x29
+ SECCOMP_MODE_DISABLED = 0x0
+ SECCOMP_MODE_FILTER = 0x2
+ SECCOMP_MODE_STRICT = 0x1
+ SECURITYFS_MAGIC = 0x73636673
+ SELINUX_MAGIC = 0xf97cff8c
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIOCADDDLCI = 0x8980
+ SIOCADDMULTI = 0x8931
+ SIOCADDRT = 0x890b
+ SIOCATMARK = 0x8905
+ SIOCBONDCHANGEACTIVE = 0x8995
+ SIOCBONDENSLAVE = 0x8990
+ SIOCBONDINFOQUERY = 0x8994
+ SIOCBONDRELEASE = 0x8991
+ SIOCBONDSETHWADDR = 0x8992
+ SIOCBONDSLAVEINFOQUERY = 0x8993
+ SIOCBRADDBR = 0x89a0
+ SIOCBRADDIF = 0x89a2
+ SIOCBRDELBR = 0x89a1
+ SIOCBRDELIF = 0x89a3
+ SIOCDARP = 0x8953
+ SIOCDELDLCI = 0x8981
+ SIOCDELMULTI = 0x8932
+ SIOCDELRT = 0x890c
+ SIOCDEVPRIVATE = 0x89f0
+ SIOCDIFADDR = 0x8936
+ SIOCDRARP = 0x8960
+ SIOCETHTOOL = 0x8946
+ SIOCGARP = 0x8954
+ SIOCGHWTSTAMP = 0x89b1
+ SIOCGIFADDR = 0x8915
+ SIOCGIFBR = 0x8940
+ SIOCGIFBRDADDR = 0x8919
+ SIOCGIFCONF = 0x8912
+ SIOCGIFCOUNT = 0x8938
+ SIOCGIFDSTADDR = 0x8917
+ SIOCGIFENCAP = 0x8925
+ SIOCGIFFLAGS = 0x8913
+ SIOCGIFHWADDR = 0x8927
+ SIOCGIFINDEX = 0x8933
+ SIOCGIFMAP = 0x8970
+ SIOCGIFMEM = 0x891f
+ SIOCGIFMETRIC = 0x891d
+ SIOCGIFMTU = 0x8921
+ SIOCGIFNAME = 0x8910
+ SIOCGIFNETMASK = 0x891b
+ SIOCGIFPFLAGS = 0x8935
+ SIOCGIFSLAVE = 0x8929
+ SIOCGIFTXQLEN = 0x8942
+ SIOCGIFVLAN = 0x8982
+ SIOCGMIIPHY = 0x8947
+ SIOCGMIIREG = 0x8948
+ SIOCGPGRP = 0x8904
+ SIOCGRARP = 0x8961
+ SIOCGSKNS = 0x894c
+ SIOCGSTAMP = 0x8906
+ SIOCGSTAMPNS = 0x8907
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCOUTQNSD = 0x894b
+ SIOCPROTOPRIVATE = 0x89e0
+ SIOCRTMSG = 0x890d
+ SIOCSARP = 0x8955
+ SIOCSHWTSTAMP = 0x89b0
+ SIOCSIFADDR = 0x8916
+ SIOCSIFBR = 0x8941
+ SIOCSIFBRDADDR = 0x891a
+ SIOCSIFDSTADDR = 0x8918
+ SIOCSIFENCAP = 0x8926
+ SIOCSIFFLAGS = 0x8914
+ SIOCSIFHWADDR = 0x8924
+ SIOCSIFHWBROADCAST = 0x8937
+ SIOCSIFLINK = 0x8911
+ SIOCSIFMAP = 0x8971
+ SIOCSIFMEM = 0x8920
+ SIOCSIFMETRIC = 0x891e
+ SIOCSIFMTU = 0x8922
+ SIOCSIFNAME = 0x8923
+ SIOCSIFNETMASK = 0x891c
+ SIOCSIFPFLAGS = 0x8934
+ SIOCSIFSLAVE = 0x8930
+ SIOCSIFTXQLEN = 0x8943
+ SIOCSIFVLAN = 0x8983
+ SIOCSMIIREG = 0x8949
+ SIOCSPGRP = 0x8902
+ SIOCSRARP = 0x8962
+ SIOCWANDEV = 0x894a
+ SMACK_MAGIC = 0x43415d53
+ SMART_AUTOSAVE = 0xd2
+ SMART_AUTO_OFFLINE = 0xdb
+ SMART_DISABLE = 0xd9
+ SMART_ENABLE = 0xd8
+ SMART_HCYL_PASS = 0xc2
+ SMART_IMMEDIATE_OFFLINE = 0xd4
+ SMART_LCYL_PASS = 0x4f
+ SMART_READ_LOG_SECTOR = 0xd5
+ SMART_READ_THRESHOLDS = 0xd1
+ SMART_READ_VALUES = 0xd0
+ SMART_SAVE = 0xd3
+ SMART_STATUS = 0xda
+ SMART_WRITE_LOG_SECTOR = 0xd6
+ SMART_WRITE_THRESHOLDS = 0xd7
+ SMB_SUPER_MAGIC = 0x517b
+ SOCKFS_MAGIC = 0x534f434b
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DCCP = 0x6
+ SOCK_DGRAM = 0x2
+ SOCK_IOC_TYPE = 0x89
+ SOCK_NONBLOCK = 0x800
+ SOCK_PACKET = 0xa
+ SOCK_RAW = 0x3
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOCK_STREAM = 0x1
+ SOL_AAL = 0x109
+ SOL_ALG = 0x117
+ SOL_ATM = 0x108
+ SOL_CAIF = 0x116
+ SOL_CAN_BASE = 0x64
+ SOL_DCCP = 0x10d
+ SOL_DECNET = 0x105
+ SOL_ICMPV6 = 0x3a
+ SOL_IP = 0x0
+ SOL_IPV6 = 0x29
+ SOL_IRDA = 0x10a
+ SOL_IUCV = 0x115
+ SOL_KCM = 0x119
+ SOL_LLC = 0x10c
+ SOL_NETBEUI = 0x10b
+ SOL_NETLINK = 0x10e
+ SOL_NFC = 0x118
+ SOL_PACKET = 0x107
+ SOL_PNPIPE = 0x113
+ SOL_PPPOL2TP = 0x111
+ SOL_RAW = 0xff
+ SOL_RDS = 0x114
+ SOL_RXRPC = 0x110
+ SOL_SOCKET = 0x1
+ SOL_TCP = 0x6
+ SOL_TIPC = 0x10f
+ SOL_TLS = 0x11a
+ SOL_X25 = 0x106
+ SOL_XDP = 0x11b
+ SOMAXCONN = 0x80
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_FILTER = 0x1a
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUSY_POLL = 0x2e
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DEBUG = 0x1
+ SO_DETACH_BPF = 0x1b
+ SO_DETACH_FILTER = 0x1b
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_GET_FILTER = 0x1a
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NOFCS = 0x2b
+ SO_NO_CHECK = 0xb
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERNAME = 0x1c
+ SO_PEERSEC = 0x1f
+ SO_PRIORITY = 0xc
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_TIMESTAMP = 0x1d
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TYPE = 0x3
+ SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
+ SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
+ SO_VM_SOCKETS_BUFFER_SIZE = 0x0
+ SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
+ SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
+ SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
+ SO_VM_SOCKETS_TRUSTED = 0x5
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
+ SQUASHFS_MAGIC = 0x73717368
+ STACK_END_MAGIC = 0x57ac6e9d
+ STATX_ALL = 0xfff
+ STATX_ATIME = 0x20
+ STATX_ATTR_APPEND = 0x20
+ STATX_ATTR_AUTOMOUNT = 0x1000
+ STATX_ATTR_COMPRESSED = 0x4
+ STATX_ATTR_ENCRYPTED = 0x800
+ STATX_ATTR_IMMUTABLE = 0x10
+ STATX_ATTR_NODUMP = 0x40
+ STATX_BASIC_STATS = 0x7ff
+ STATX_BLOCKS = 0x400
+ STATX_BTIME = 0x800
+ STATX_CTIME = 0x80
+ STATX_GID = 0x10
+ STATX_INO = 0x100
+ STATX_MODE = 0x2
+ STATX_MTIME = 0x40
+ STATX_NLINK = 0x4
+ STATX_SIZE = 0x200
+ STATX_TYPE = 0x1
+ STATX_UID = 0x8
+ STATX__RESERVED = 0x80000000
+ SYNC_FILE_RANGE_WAIT_AFTER = 0x4
+ SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
+ SYNC_FILE_RANGE_WRITE = 0x2
+ SYSFS_MAGIC = 0x62656572
+ S_BLKSIZE = 0x200
+ S_IEXEC = 0x40
+ S_IFBLK = 0x6000
+ S_IFCHR = 0x2000
+ S_IFDIR = 0x4000
+ S_IFIFO = 0x1000
+ S_IFLNK = 0xa000
+ S_IFMT = 0xf000
+ S_IFREG = 0x8000
+ S_IFSOCK = 0xc000
+ S_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ S_ISUID = 0x800
+ S_ISVTX = 0x200
+ S_IWGRP = 0x10
+ S_IWOTH = 0x2
+ S_IWRITE = 0x80
+ S_IWUSR = 0x80
+ S_IXGRP = 0x8
+ S_IXOTH = 0x1
+ S_IXUSR = 0x40
+ TAB0 = 0x0
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TASKSTATS_CMD_ATTR_MAX = 0x4
+ TASKSTATS_CMD_MAX = 0x2
+ TASKSTATS_GENL_NAME = "TASKSTATS"
+ TASKSTATS_GENL_VERSION = 0x1
+ TASKSTATS_TYPE_MAX = 0x6
+ TASKSTATS_VERSION = 0x8
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCIFLUSH = 0x0
+ TCIOFF = 0x2
+ TCIOFLUSH = 0x2
+ TCION = 0x3
+ TCOFLUSH = 0x1
+ TCOOFF = 0x0
+ TCOON = 0x1
+ TCP_CC_INFO = 0x1a
+ TCP_CONGESTION = 0xd
+ TCP_COOKIE_IN_ALWAYS = 0x1
+ TCP_COOKIE_MAX = 0x10
+ TCP_COOKIE_MIN = 0x8
+ TCP_COOKIE_OUT_NEVER = 0x2
+ TCP_COOKIE_PAIR_SIZE = 0x20
+ TCP_COOKIE_TRANSACTIONS = 0xf
+ TCP_CORK = 0x3
+ TCP_DEFER_ACCEPT = 0x9
+ TCP_FASTOPEN = 0x17
+ TCP_FASTOPEN_CONNECT = 0x1e
+ TCP_FASTOPEN_KEY = 0x21
+ TCP_FASTOPEN_NO_COOKIE = 0x22
+ TCP_INFO = 0xb
+ TCP_KEEPCNT = 0x6
+ TCP_KEEPIDLE = 0x4
+ TCP_KEEPINTVL = 0x5
+ TCP_LINGER2 = 0x8
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAX_WINSHIFT = 0xe
+ TCP_MD5SIG = 0xe
+ TCP_MD5SIG_EXT = 0x20
+ TCP_MD5SIG_FLAG_PREFIX = 0x1
+ TCP_MD5SIG_MAXKEYLEN = 0x50
+ TCP_MSS = 0x200
+ TCP_MSS_DEFAULT = 0x218
+ TCP_MSS_DESIRED = 0x4c4
+ TCP_NODELAY = 0x1
+ TCP_NOTSENT_LOWAT = 0x19
+ TCP_QUEUE_SEQ = 0x15
+ TCP_QUICKACK = 0xc
+ TCP_REPAIR = 0x13
+ TCP_REPAIR_OPTIONS = 0x16
+ TCP_REPAIR_QUEUE = 0x14
+ TCP_REPAIR_WINDOW = 0x1d
+ TCP_SAVED_SYN = 0x1c
+ TCP_SAVE_SYN = 0x1b
+ TCP_SYNCNT = 0x7
+ TCP_S_DATA_IN = 0x4
+ TCP_S_DATA_OUT = 0x8
+ TCP_THIN_DUPACK = 0x11
+ TCP_THIN_LINEAR_TIMEOUTS = 0x10
+ TCP_TIMESTAMP = 0x18
+ TCP_ULP = 0x1f
+ TCP_USER_TIMEOUT = 0x12
+ TCP_WINDOW_CLAMP = 0xa
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_RTS = 0x4
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_IOCTL = 0x40
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TMPFS_MAGIC = 0x1021994
+ TOSTOP = 0x100
+ TPACKET_ALIGNMENT = 0x10
+ TPACKET_HDRLEN = 0x34
+ TP_STATUS_AVAILABLE = 0x0
+ TP_STATUS_BLK_TMO = 0x20
+ TP_STATUS_COPY = 0x2
+ TP_STATUS_CSUMNOTREADY = 0x8
+ TP_STATUS_CSUM_VALID = 0x80
+ TP_STATUS_KERNEL = 0x0
+ TP_STATUS_LOSING = 0x4
+ TP_STATUS_SENDING = 0x2
+ TP_STATUS_SEND_REQUEST = 0x1
+ TP_STATUS_TS_RAW_HARDWARE = -0x80000000
+ TP_STATUS_TS_SOFTWARE = 0x20000000
+ TP_STATUS_TS_SYS_HARDWARE = 0x40000000
+ TP_STATUS_USER = 0x1
+ TP_STATUS_VLAN_TPID_VALID = 0x40
+ TP_STATUS_VLAN_VALID = 0x10
+ TP_STATUS_WRONG_FORMAT = 0x4
+ TRACEFS_MAGIC = 0x74726163
+ TS_COMM_LEN = 0x20
+ TUNATTACHFILTER = 0x401054d5
+ TUNDETACHFILTER = 0x401054d6
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x801054db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ UDF_SUPER_MAGIC = 0x15013346
+ UMOUNT_NOFOLLOW = 0x8
+ USBDEVICE_SUPER_MAGIC = 0x9fa2
+ UTIME_NOW = 0x3fffffff
+ UTIME_OMIT = 0x3ffffffe
+ V9FS_MAGIC = 0x1021997
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VERASE = 0x2
+ VINTR = 0x0
+ VKILL = 0x3
+ VLNEXT = 0xf
+ VMADDR_CID_ANY = 0xffffffff
+ VMADDR_CID_HOST = 0x2
+ VMADDR_CID_HYPERVISOR = 0x0
+ VMADDR_CID_RESERVED = 0x1
+ VMADDR_PORT_ANY = 0xffffffff
+ VMIN = 0x6
+ VM_SOCKETS_INVALID_VERSION = 0xffffffff
+ VQUIT = 0x1
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT0 = 0x0
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WALL = 0x40000000
+ WCLONE = 0x80000000
+ WCONTINUED = 0x8
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WDIOC_SETPRETIMEOUT = 0xc0045708
+ WDIOC_SETTIMEOUT = 0xc0045706
+ WEXITED = 0x4
+ WIN_ACKMEDIACHANGE = 0xdb
+ WIN_CHECKPOWERMODE1 = 0xe5
+ WIN_CHECKPOWERMODE2 = 0x98
+ WIN_DEVICE_RESET = 0x8
+ WIN_DIAGNOSE = 0x90
+ WIN_DOORLOCK = 0xde
+ WIN_DOORUNLOCK = 0xdf
+ WIN_DOWNLOAD_MICROCODE = 0x92
+ WIN_FLUSH_CACHE = 0xe7
+ WIN_FLUSH_CACHE_EXT = 0xea
+ WIN_FORMAT = 0x50
+ WIN_GETMEDIASTATUS = 0xda
+ WIN_IDENTIFY = 0xec
+ WIN_IDENTIFY_DMA = 0xee
+ WIN_IDLEIMMEDIATE = 0xe1
+ WIN_INIT = 0x60
+ WIN_MEDIAEJECT = 0xed
+ WIN_MULTREAD = 0xc4
+ WIN_MULTREAD_EXT = 0x29
+ WIN_MULTWRITE = 0xc5
+ WIN_MULTWRITE_EXT = 0x39
+ WIN_NOP = 0x0
+ WIN_PACKETCMD = 0xa0
+ WIN_PIDENTIFY = 0xa1
+ WIN_POSTBOOT = 0xdc
+ WIN_PREBOOT = 0xdd
+ WIN_QUEUED_SERVICE = 0xa2
+ WIN_READ = 0x20
+ WIN_READDMA = 0xc8
+ WIN_READDMA_EXT = 0x25
+ WIN_READDMA_ONCE = 0xc9
+ WIN_READDMA_QUEUED = 0xc7
+ WIN_READDMA_QUEUED_EXT = 0x26
+ WIN_READ_BUFFER = 0xe4
+ WIN_READ_EXT = 0x24
+ WIN_READ_LONG = 0x22
+ WIN_READ_LONG_ONCE = 0x23
+ WIN_READ_NATIVE_MAX = 0xf8
+ WIN_READ_NATIVE_MAX_EXT = 0x27
+ WIN_READ_ONCE = 0x21
+ WIN_RECAL = 0x10
+ WIN_RESTORE = 0x10
+ WIN_SECURITY_DISABLE = 0xf6
+ WIN_SECURITY_ERASE_PREPARE = 0xf3
+ WIN_SECURITY_ERASE_UNIT = 0xf4
+ WIN_SECURITY_FREEZE_LOCK = 0xf5
+ WIN_SECURITY_SET_PASS = 0xf1
+ WIN_SECURITY_UNLOCK = 0xf2
+ WIN_SEEK = 0x70
+ WIN_SETFEATURES = 0xef
+ WIN_SETIDLE1 = 0xe3
+ WIN_SETIDLE2 = 0x97
+ WIN_SETMULT = 0xc6
+ WIN_SET_MAX = 0xf9
+ WIN_SET_MAX_EXT = 0x37
+ WIN_SLEEPNOW1 = 0xe6
+ WIN_SLEEPNOW2 = 0x99
+ WIN_SMART = 0xb0
+ WIN_SPECIFY = 0x91
+ WIN_SRST = 0x8
+ WIN_STANDBY = 0xe2
+ WIN_STANDBY2 = 0x96
+ WIN_STANDBYNOW1 = 0xe0
+ WIN_STANDBYNOW2 = 0x94
+ WIN_VERIFY = 0x40
+ WIN_VERIFY_EXT = 0x42
+ WIN_VERIFY_ONCE = 0x41
+ WIN_WRITE = 0x30
+ WIN_WRITEDMA = 0xca
+ WIN_WRITEDMA_EXT = 0x35
+ WIN_WRITEDMA_ONCE = 0xcb
+ WIN_WRITEDMA_QUEUED = 0xcc
+ WIN_WRITEDMA_QUEUED_EXT = 0x36
+ WIN_WRITE_BUFFER = 0xe8
+ WIN_WRITE_EXT = 0x34
+ WIN_WRITE_LONG = 0x32
+ WIN_WRITE_LONG_ONCE = 0x33
+ WIN_WRITE_ONCE = 0x31
+ WIN_WRITE_SAME = 0xe9
+ WIN_WRITE_VERIFY = 0x3c
+ WNOHANG = 0x1
+ WNOTHREAD = 0x20000000
+ WNOWAIT = 0x1000000
+ WORDSIZE = 0x40
+ WSTOPPED = 0x2
+ WUNTRACED = 0x2
+ XATTR_CREATE = 0x1
+ XATTR_REPLACE = 0x2
+ XCASE = 0x4
+ XDP_COPY = 0x2
+ XDP_FLAGS_DRV_MODE = 0x4
+ XDP_FLAGS_HW_MODE = 0x8
+ XDP_FLAGS_MASK = 0xf
+ XDP_FLAGS_MODES = 0xe
+ XDP_FLAGS_SKB_MODE = 0x2
+ XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MMAP_OFFSETS = 0x1
+ XDP_PGOFF_RX_RING = 0x0
+ XDP_PGOFF_TX_RING = 0x80000000
+ XDP_RX_RING = 0x2
+ XDP_SHARED_UMEM = 0x1
+ XDP_STATISTICS = 0x7
+ XDP_TX_RING = 0x3
+ XDP_UMEM_COMPLETION_RING = 0x6
+ XDP_UMEM_FILL_RING = 0x5
+ XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
+ XDP_UMEM_PGOFF_FILL_RING = 0x100000000
+ XDP_UMEM_REG = 0x4
+ XDP_ZEROCOPY = 0x4
+ XENFS_SUPER_MAGIC = 0xabba1974
+ XTABS = 0x1800
+ ZSMALLOC_MAGIC = 0x58295829
+)
+
+// Errors
+const (
+ E2BIG = syscall.Errno(0x7)
+ EACCES = syscall.Errno(0xd)
+ EADDRINUSE = syscall.Errno(0x62)
+ EADDRNOTAVAIL = syscall.Errno(0x63)
+ EADV = syscall.Errno(0x44)
+ EAFNOSUPPORT = syscall.Errno(0x61)
+ EAGAIN = syscall.Errno(0xb)
+ EALREADY = syscall.Errno(0x72)
+ EBADE = syscall.Errno(0x34)
+ EBADF = syscall.Errno(0x9)
+ EBADFD = syscall.Errno(0x4d)
+ EBADMSG = syscall.Errno(0x4a)
+ EBADR = syscall.Errno(0x35)
+ EBADRQC = syscall.Errno(0x38)
+ EBADSLT = syscall.Errno(0x39)
+ EBFONT = syscall.Errno(0x3b)
+ EBUSY = syscall.Errno(0x10)
+ ECANCELED = syscall.Errno(0x7d)
+ ECHILD = syscall.Errno(0xa)
+ ECHRNG = syscall.Errno(0x2c)
+ ECOMM = syscall.Errno(0x46)
+ ECONNABORTED = syscall.Errno(0x67)
+ ECONNREFUSED = syscall.Errno(0x6f)
+ ECONNRESET = syscall.Errno(0x68)
+ EDEADLK = syscall.Errno(0x23)
+ EDEADLOCK = syscall.Errno(0x23)
+ EDESTADDRREQ = syscall.Errno(0x59)
+ EDOM = syscall.Errno(0x21)
+ EDOTDOT = syscall.Errno(0x49)
+ EDQUOT = syscall.Errno(0x7a)
+ EEXIST = syscall.Errno(0x11)
+ EFAULT = syscall.Errno(0xe)
+ EFBIG = syscall.Errno(0x1b)
+ EHOSTDOWN = syscall.Errno(0x70)
+ EHOSTUNREACH = syscall.Errno(0x71)
+ EHWPOISON = syscall.Errno(0x85)
+ EIDRM = syscall.Errno(0x2b)
+ EILSEQ = syscall.Errno(0x54)
+ EINPROGRESS = syscall.Errno(0x73)
+ EINTR = syscall.Errno(0x4)
+ EINVAL = syscall.Errno(0x16)
+ EIO = syscall.Errno(0x5)
+ EISCONN = syscall.Errno(0x6a)
+ EISDIR = syscall.Errno(0x15)
+ EISNAM = syscall.Errno(0x78)
+ EKEYEXPIRED = syscall.Errno(0x7f)
+ EKEYREJECTED = syscall.Errno(0x81)
+ EKEYREVOKED = syscall.Errno(0x80)
+ EL2HLT = syscall.Errno(0x33)
+ EL2NSYNC = syscall.Errno(0x2d)
+ EL3HLT = syscall.Errno(0x2e)
+ EL3RST = syscall.Errno(0x2f)
+ ELIBACC = syscall.Errno(0x4f)
+ ELIBBAD = syscall.Errno(0x50)
+ ELIBEXEC = syscall.Errno(0x53)
+ ELIBMAX = syscall.Errno(0x52)
+ ELIBSCN = syscall.Errno(0x51)
+ ELNRNG = syscall.Errno(0x30)
+ ELOOP = syscall.Errno(0x28)
+ EMEDIUMTYPE = syscall.Errno(0x7c)
+ EMFILE = syscall.Errno(0x18)
+ EMLINK = syscall.Errno(0x1f)
+ EMSGSIZE = syscall.Errno(0x5a)
+ EMULTIHOP = syscall.Errno(0x48)
+ ENAMETOOLONG = syscall.Errno(0x24)
+ ENAVAIL = syscall.Errno(0x77)
+ ENETDOWN = syscall.Errno(0x64)
+ ENETRESET = syscall.Errno(0x66)
+ ENETUNREACH = syscall.Errno(0x65)
+ ENFILE = syscall.Errno(0x17)
+ ENOANO = syscall.Errno(0x37)
+ ENOBUFS = syscall.Errno(0x69)
+ ENOCSI = syscall.Errno(0x32)
+ ENODATA = syscall.Errno(0x3d)
+ ENODEV = syscall.Errno(0x13)
+ ENOENT = syscall.Errno(0x2)
+ ENOEXEC = syscall.Errno(0x8)
+ ENOKEY = syscall.Errno(0x7e)
+ ENOLCK = syscall.Errno(0x25)
+ ENOLINK = syscall.Errno(0x43)
+ ENOMEDIUM = syscall.Errno(0x7b)
+ ENOMEM = syscall.Errno(0xc)
+ ENOMSG = syscall.Errno(0x2a)
+ ENONET = syscall.Errno(0x40)
+ ENOPKG = syscall.Errno(0x41)
+ ENOPROTOOPT = syscall.Errno(0x5c)
+ ENOSPC = syscall.Errno(0x1c)
+ ENOSR = syscall.Errno(0x3f)
+ ENOSTR = syscall.Errno(0x3c)
+ ENOSYS = syscall.Errno(0x26)
+ ENOTBLK = syscall.Errno(0xf)
+ ENOTCONN = syscall.Errno(0x6b)
+ ENOTDIR = syscall.Errno(0x14)
+ ENOTEMPTY = syscall.Errno(0x27)
+ ENOTNAM = syscall.Errno(0x76)
+ ENOTRECOVERABLE = syscall.Errno(0x83)
+ ENOTSOCK = syscall.Errno(0x58)
+ ENOTSUP = syscall.Errno(0x5f)
+ ENOTTY = syscall.Errno(0x19)
+ ENOTUNIQ = syscall.Errno(0x4c)
+ ENXIO = syscall.Errno(0x6)
+ EOPNOTSUPP = syscall.Errno(0x5f)
+ EOVERFLOW = syscall.Errno(0x4b)
+ EOWNERDEAD = syscall.Errno(0x82)
+ EPERM = syscall.Errno(0x1)
+ EPFNOSUPPORT = syscall.Errno(0x60)
+ EPIPE = syscall.Errno(0x20)
+ EPROTO = syscall.Errno(0x47)
+ EPROTONOSUPPORT = syscall.Errno(0x5d)
+ EPROTOTYPE = syscall.Errno(0x5b)
+ ERANGE = syscall.Errno(0x22)
+ EREMCHG = syscall.Errno(0x4e)
+ EREMOTE = syscall.Errno(0x42)
+ EREMOTEIO = syscall.Errno(0x79)
+ ERESTART = syscall.Errno(0x55)
+ ERFKILL = syscall.Errno(0x84)
+ EROFS = syscall.Errno(0x1e)
+ ESHUTDOWN = syscall.Errno(0x6c)
+ ESOCKTNOSUPPORT = syscall.Errno(0x5e)
+ ESPIPE = syscall.Errno(0x1d)
+ ESRCH = syscall.Errno(0x3)
+ ESRMNT = syscall.Errno(0x45)
+ ESTALE = syscall.Errno(0x74)
+ ESTRPIPE = syscall.Errno(0x56)
+ ETIME = syscall.Errno(0x3e)
+ ETIMEDOUT = syscall.Errno(0x6e)
+ ETOOMANYREFS = syscall.Errno(0x6d)
+ ETXTBSY = syscall.Errno(0x1a)
+ EUCLEAN = syscall.Errno(0x75)
+ EUNATCH = syscall.Errno(0x31)
+ EUSERS = syscall.Errno(0x57)
+ EWOULDBLOCK = syscall.Errno(0xb)
+ EXDEV = syscall.Errno(0x12)
+ EXFULL = syscall.Errno(0x36)
+)
+
+// Signals
+const (
+ SIGABRT = syscall.Signal(0x6)
+ SIGALRM = syscall.Signal(0xe)
+ SIGBUS = syscall.Signal(0x7)
+ SIGCHLD = syscall.Signal(0x11)
+ SIGCLD = syscall.Signal(0x11)
+ SIGCONT = syscall.Signal(0x12)
+ SIGFPE = syscall.Signal(0x8)
+ SIGHUP = syscall.Signal(0x1)
+ SIGILL = syscall.Signal(0x4)
+ SIGINT = syscall.Signal(0x2)
+ SIGIO = syscall.Signal(0x1d)
+ SIGIOT = syscall.Signal(0x6)
+ SIGKILL = syscall.Signal(0x9)
+ SIGPIPE = syscall.Signal(0xd)
+ SIGPOLL = syscall.Signal(0x1d)
+ SIGPROF = syscall.Signal(0x1b)
+ SIGPWR = syscall.Signal(0x1e)
+ SIGQUIT = syscall.Signal(0x3)
+ SIGSEGV = syscall.Signal(0xb)
+ SIGSTKFLT = syscall.Signal(0x10)
+ SIGSTOP = syscall.Signal(0x13)
+ SIGSYS = syscall.Signal(0x1f)
+ SIGTERM = syscall.Signal(0xf)
+ SIGTRAP = syscall.Signal(0x5)
+ SIGTSTP = syscall.Signal(0x14)
+ SIGTTIN = syscall.Signal(0x15)
+ SIGTTOU = syscall.Signal(0x16)
+ SIGURG = syscall.Signal(0x17)
+ SIGUSR1 = syscall.Signal(0xa)
+ SIGUSR2 = syscall.Signal(0xc)
+ SIGVTALRM = syscall.Signal(0x1a)
+ SIGWINCH = syscall.Signal(0x1c)
+ SIGXCPU = syscall.Signal(0x18)
+ SIGXFSZ = syscall.Signal(0x19)
+)
+
+// Error table
+var errorList = [...]struct {
+ num syscall.Errno
+ name string
+ desc string
+}{
+ {1, "EPERM", "operation not permitted"},
+ {2, "ENOENT", "no such file or directory"},
+ {3, "ESRCH", "no such process"},
+ {4, "EINTR", "interrupted system call"},
+ {5, "EIO", "input/output error"},
+ {6, "ENXIO", "no such device or address"},
+ {7, "E2BIG", "argument list too long"},
+ {8, "ENOEXEC", "exec format error"},
+ {9, "EBADF", "bad file descriptor"},
+ {10, "ECHILD", "no child processes"},
+ {11, "EAGAIN", "resource temporarily unavailable"},
+ {12, "ENOMEM", "cannot allocate memory"},
+ {13, "EACCES", "permission denied"},
+ {14, "EFAULT", "bad address"},
+ {15, "ENOTBLK", "block device required"},
+ {16, "EBUSY", "device or resource busy"},
+ {17, "EEXIST", "file exists"},
+ {18, "EXDEV", "invalid cross-device link"},
+ {19, "ENODEV", "no such device"},
+ {20, "ENOTDIR", "not a directory"},
+ {21, "EISDIR", "is a directory"},
+ {22, "EINVAL", "invalid argument"},
+ {23, "ENFILE", "too many open files in system"},
+ {24, "EMFILE", "too many open files"},
+ {25, "ENOTTY", "inappropriate ioctl for device"},
+ {26, "ETXTBSY", "text file busy"},
+ {27, "EFBIG", "file too large"},
+ {28, "ENOSPC", "no space left on device"},
+ {29, "ESPIPE", "illegal seek"},
+ {30, "EROFS", "read-only file system"},
+ {31, "EMLINK", "too many links"},
+ {32, "EPIPE", "broken pipe"},
+ {33, "EDOM", "numerical argument out of domain"},
+ {34, "ERANGE", "numerical result out of range"},
+ {35, "EDEADLK", "resource deadlock avoided"},
+ {36, "ENAMETOOLONG", "file name too long"},
+ {37, "ENOLCK", "no locks available"},
+ {38, "ENOSYS", "function not implemented"},
+ {39, "ENOTEMPTY", "directory not empty"},
+ {40, "ELOOP", "too many levels of symbolic links"},
+ {42, "ENOMSG", "no message of desired type"},
+ {43, "EIDRM", "identifier removed"},
+ {44, "ECHRNG", "channel number out of range"},
+ {45, "EL2NSYNC", "level 2 not synchronized"},
+ {46, "EL3HLT", "level 3 halted"},
+ {47, "EL3RST", "level 3 reset"},
+ {48, "ELNRNG", "link number out of range"},
+ {49, "EUNATCH", "protocol driver not attached"},
+ {50, "ENOCSI", "no CSI structure available"},
+ {51, "EL2HLT", "level 2 halted"},
+ {52, "EBADE", "invalid exchange"},
+ {53, "EBADR", "invalid request descriptor"},
+ {54, "EXFULL", "exchange full"},
+ {55, "ENOANO", "no anode"},
+ {56, "EBADRQC", "invalid request code"},
+ {57, "EBADSLT", "invalid slot"},
+ {59, "EBFONT", "bad font file format"},
+ {60, "ENOSTR", "device not a stream"},
+ {61, "ENODATA", "no data available"},
+ {62, "ETIME", "timer expired"},
+ {63, "ENOSR", "out of streams resources"},
+ {64, "ENONET", "machine is not on the network"},
+ {65, "ENOPKG", "package not installed"},
+ {66, "EREMOTE", "object is remote"},
+ {67, "ENOLINK", "link has been severed"},
+ {68, "EADV", "advertise error"},
+ {69, "ESRMNT", "srmount error"},
+ {70, "ECOMM", "communication error on send"},
+ {71, "EPROTO", "protocol error"},
+ {72, "EMULTIHOP", "multihop attempted"},
+ {73, "EDOTDOT", "RFS specific error"},
+ {74, "EBADMSG", "bad message"},
+ {75, "EOVERFLOW", "value too large for defined data type"},
+ {76, "ENOTUNIQ", "name not unique on network"},
+ {77, "EBADFD", "file descriptor in bad state"},
+ {78, "EREMCHG", "remote address changed"},
+ {79, "ELIBACC", "can not access a needed shared library"},
+ {80, "ELIBBAD", "accessing a corrupted shared library"},
+ {81, "ELIBSCN", ".lib section in a.out corrupted"},
+ {82, "ELIBMAX", "attempting to link in too many shared libraries"},
+ {83, "ELIBEXEC", "cannot exec a shared library directly"},
+ {84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
+ {85, "ERESTART", "interrupted system call should be restarted"},
+ {86, "ESTRPIPE", "streams pipe error"},
+ {87, "EUSERS", "too many users"},
+ {88, "ENOTSOCK", "socket operation on non-socket"},
+ {89, "EDESTADDRREQ", "destination address required"},
+ {90, "EMSGSIZE", "message too long"},
+ {91, "EPROTOTYPE", "protocol wrong type for socket"},
+ {92, "ENOPROTOOPT", "protocol not available"},
+ {93, "EPROTONOSUPPORT", "protocol not supported"},
+ {94, "ESOCKTNOSUPPORT", "socket type not supported"},
+ {95, "ENOTSUP", "operation not supported"},
+ {96, "EPFNOSUPPORT", "protocol family not supported"},
+ {97, "EAFNOSUPPORT", "address family not supported by protocol"},
+ {98, "EADDRINUSE", "address already in use"},
+ {99, "EADDRNOTAVAIL", "cannot assign requested address"},
+ {100, "ENETDOWN", "network is down"},
+ {101, "ENETUNREACH", "network is unreachable"},
+ {102, "ENETRESET", "network dropped connection on reset"},
+ {103, "ECONNABORTED", "software caused connection abort"},
+ {104, "ECONNRESET", "connection reset by peer"},
+ {105, "ENOBUFS", "no buffer space available"},
+ {106, "EISCONN", "transport endpoint is already connected"},
+ {107, "ENOTCONN", "transport endpoint is not connected"},
+ {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
+ {109, "ETOOMANYREFS", "too many references: cannot splice"},
+ {110, "ETIMEDOUT", "connection timed out"},
+ {111, "ECONNREFUSED", "connection refused"},
+ {112, "EHOSTDOWN", "host is down"},
+ {113, "EHOSTUNREACH", "no route to host"},
+ {114, "EALREADY", "operation already in progress"},
+ {115, "EINPROGRESS", "operation now in progress"},
+ {116, "ESTALE", "stale file handle"},
+ {117, "EUCLEAN", "structure needs cleaning"},
+ {118, "ENOTNAM", "not a XENIX named type file"},
+ {119, "ENAVAIL", "no XENIX semaphores available"},
+ {120, "EISNAM", "is a named type file"},
+ {121, "EREMOTEIO", "remote I/O error"},
+ {122, "EDQUOT", "disk quota exceeded"},
+ {123, "ENOMEDIUM", "no medium found"},
+ {124, "EMEDIUMTYPE", "wrong medium type"},
+ {125, "ECANCELED", "operation canceled"},
+ {126, "ENOKEY", "required key not available"},
+ {127, "EKEYEXPIRED", "key has expired"},
+ {128, "EKEYREVOKED", "key has been revoked"},
+ {129, "EKEYREJECTED", "key was rejected by service"},
+ {130, "EOWNERDEAD", "owner died"},
+ {131, "ENOTRECOVERABLE", "state not recoverable"},
+ {132, "ERFKILL", "operation not possible due to RF-kill"},
+ {133, "EHWPOISON", "memory page has hardware error"},
+}
+
+// Signal table
+var signalList = [...]struct {
+ num syscall.Signal
+ name string
+ desc string
+}{
+ {1, "SIGHUP", "hangup"},
+ {2, "SIGINT", "interrupt"},
+ {3, "SIGQUIT", "quit"},
+ {4, "SIGILL", "illegal instruction"},
+ {5, "SIGTRAP", "trace/breakpoint trap"},
+ {6, "SIGABRT", "aborted"},
+ {7, "SIGBUS", "bus error"},
+ {8, "SIGFPE", "floating point exception"},
+ {9, "SIGKILL", "killed"},
+ {10, "SIGUSR1", "user defined signal 1"},
+ {11, "SIGSEGV", "segmentation fault"},
+ {12, "SIGUSR2", "user defined signal 2"},
+ {13, "SIGPIPE", "broken pipe"},
+ {14, "SIGALRM", "alarm clock"},
+ {15, "SIGTERM", "terminated"},
+ {16, "SIGSTKFLT", "stack fault"},
+ {17, "SIGCHLD", "child exited"},
+ {18, "SIGCONT", "continued"},
+ {19, "SIGSTOP", "stopped (signal)"},
+ {20, "SIGTSTP", "stopped"},
+ {21, "SIGTTIN", "stopped (tty input)"},
+ {22, "SIGTTOU", "stopped (tty output)"},
+ {23, "SIGURG", "urgent I/O condition"},
+ {24, "SIGXCPU", "CPU time limit exceeded"},
+ {25, "SIGXFSZ", "file size limit exceeded"},
+ {26, "SIGVTALRM", "virtual timer expired"},
+ {27, "SIGPROF", "profiling timer expired"},
+ {28, "SIGWINCH", "window changed"},
+ {29, "SIGIO", "I/O possible"},
+ {30, "SIGPWR", "power failure"},
+ {31, "SIGSYS", "bad system call"},
+}
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 fba68b8d4..bad17418e 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -64,6 +64,7 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ AF_XDP = 0x2c
ALG_OP_DECRYPT = 0x0
ALG_OP_ENCRYPT = 0x1
ALG_SET_AEAD_ASSOCLEN = 0x4
@@ -975,6 +976,21 @@ const (
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MCL_ONFAULT = 0x4
+ MFD_ALLOW_SEALING = 0x2
+ MFD_CLOEXEC = 0x1
+ MFD_HUGETLB = 0x4
+ MFD_HUGE_16GB = -0x78000000
+ MFD_HUGE_16MB = 0x60000000
+ MFD_HUGE_1GB = 0x78000000
+ MFD_HUGE_1MB = 0x50000000
+ MFD_HUGE_256MB = 0x70000000
+ MFD_HUGE_2GB = 0x7c000000
+ MFD_HUGE_2MB = 0x54000000
+ MFD_HUGE_512KB = 0x4c000000
+ MFD_HUGE_64KB = 0x40000000
+ MFD_HUGE_8MB = 0x5c000000
+ MFD_HUGE_MASK = 0x3f
+ MFD_HUGE_SHIFT = 0x1a
MINIX2_SUPER_MAGIC = 0x2468
MINIX2_SUPER_MAGIC2 = 0x2478
MINIX3_SUPER_MAGIC = 0x4d5a
@@ -1857,6 +1873,7 @@ const (
SOL_TIPC = 0x10f
SOL_TLS = 0x11a
SOL_X25 = 0x106
+ SOL_XDP = 0x11b
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1e
SO_ATTACH_BPF = 0x32
@@ -1952,6 +1969,9 @@ const (
STATX_TYPE = 0x1
STATX_UID = 0x8
STATX__RESERVED = 0x80000000
+ SYNC_FILE_RANGE_WAIT_AFTER = 0x4
+ SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
+ SYNC_FILE_RANGE_WRITE = 0x2
SYSFS_MAGIC = 0x62656572
S_BLKSIZE = 0x200
S_IEXEC = 0x40
@@ -2335,6 +2355,26 @@ const (
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
+ XDP_COPY = 0x2
+ XDP_FLAGS_DRV_MODE = 0x4
+ XDP_FLAGS_HW_MODE = 0x8
+ XDP_FLAGS_MASK = 0xf
+ XDP_FLAGS_MODES = 0xe
+ XDP_FLAGS_SKB_MODE = 0x2
+ XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MMAP_OFFSETS = 0x1
+ XDP_PGOFF_RX_RING = 0x0
+ XDP_PGOFF_TX_RING = 0x80000000
+ XDP_RX_RING = 0x2
+ XDP_SHARED_UMEM = 0x1
+ XDP_STATISTICS = 0x7
+ XDP_TX_RING = 0x3
+ XDP_UMEM_COMPLETION_RING = 0x6
+ XDP_UMEM_FILL_RING = 0x5
+ XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
+ XDP_UMEM_PGOFF_FILL_RING = 0x100000000
+ XDP_UMEM_REG = 0x4
+ XDP_ZEROCOPY = 0x4
XENFS_SUPER_MAGIC = 0xabba1974
XTABS = 0x1800
ZSMALLOC_MAGIC = 0x58295829
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 19316b1d0..78cc04ea6 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
@@ -1020,6 +1020,43 @@ const (
MAP_WIRED = 0x800
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_BASIC_FLAGS = 0xe782807f
+ MNT_DEFEXPORTED = 0x200
+ MNT_DISCARD = 0x800000
+ MNT_EXKERB = 0x800
+ MNT_EXNORESPORT = 0x8000000
+ MNT_EXPORTANON = 0x400
+ MNT_EXPORTED = 0x100
+ MNT_EXPUBLIC = 0x10000000
+ MNT_EXRDONLY = 0x80
+ MNT_EXTATTR = 0x1000000
+ MNT_FORCE = 0x80000
+ MNT_GETARGS = 0x400000
+ MNT_IGNORE = 0x100000
+ MNT_LAZY = 0x3
+ MNT_LOCAL = 0x1000
+ MNT_LOG = 0x2000000
+ MNT_NOATIME = 0x4000000
+ MNT_NOCOREDUMP = 0x8000
+ MNT_NODEV = 0x10
+ MNT_NODEVMTIME = 0x40000000
+ MNT_NOEXEC = 0x4
+ MNT_NOSUID = 0x8
+ MNT_NOWAIT = 0x2
+ MNT_OP_FLAGS = 0x4d0000
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELATIME = 0x20000
+ MNT_RELOAD = 0x40000
+ MNT_ROOTFS = 0x4000
+ MNT_SOFTDEP = 0x80000000
+ MNT_SYMPERM = 0x20000000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UNION = 0x20
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0xff90ffff
+ MNT_WAIT = 0x1
MSG_BCAST = 0x100
MSG_CMSG_CLOEXEC = 0x800
MSG_CONTROLMBUF = 0x2000000
@@ -1113,7 +1150,10 @@ const (
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
+ RLIMIT_MEMLOCK = 0x6
RLIMIT_NOFILE = 0x8
+ RLIMIT_NPROC = 0x7
+ RLIMIT_RSS = 0x5
RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6
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 f2cf500f5..92185e693 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
@@ -1010,6 +1010,43 @@ const (
MAP_WIRED = 0x800
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_BASIC_FLAGS = 0xe782807f
+ MNT_DEFEXPORTED = 0x200
+ MNT_DISCARD = 0x800000
+ MNT_EXKERB = 0x800
+ MNT_EXNORESPORT = 0x8000000
+ MNT_EXPORTANON = 0x400
+ MNT_EXPORTED = 0x100
+ MNT_EXPUBLIC = 0x10000000
+ MNT_EXRDONLY = 0x80
+ MNT_EXTATTR = 0x1000000
+ MNT_FORCE = 0x80000
+ MNT_GETARGS = 0x400000
+ MNT_IGNORE = 0x100000
+ MNT_LAZY = 0x3
+ MNT_LOCAL = 0x1000
+ MNT_LOG = 0x2000000
+ MNT_NOATIME = 0x4000000
+ MNT_NOCOREDUMP = 0x8000
+ MNT_NODEV = 0x10
+ MNT_NODEVMTIME = 0x40000000
+ MNT_NOEXEC = 0x4
+ MNT_NOSUID = 0x8
+ MNT_NOWAIT = 0x2
+ MNT_OP_FLAGS = 0x4d0000
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELATIME = 0x20000
+ MNT_RELOAD = 0x40000
+ MNT_ROOTFS = 0x4000
+ MNT_SOFTDEP = 0x80000000
+ MNT_SYMPERM = 0x20000000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UNION = 0x20
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0xff90ffff
+ MNT_WAIT = 0x1
MSG_BCAST = 0x100
MSG_CMSG_CLOEXEC = 0x800
MSG_CONTROLMBUF = 0x2000000
@@ -1103,7 +1140,10 @@ const (
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
+ RLIMIT_MEMLOCK = 0x6
RLIMIT_NOFILE = 0x8
+ RLIMIT_NPROC = 0x7
+ RLIMIT_RSS = 0x5
RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6
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 858e29998..373ad4543 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
@@ -1000,6 +1000,43 @@ const (
MAP_STACK = 0x2000
MAP_TRYFIXED = 0x400
MAP_WIRED = 0x800
+ MNT_ASYNC = 0x40
+ MNT_BASIC_FLAGS = 0xe782807f
+ MNT_DEFEXPORTED = 0x200
+ MNT_DISCARD = 0x800000
+ MNT_EXKERB = 0x800
+ MNT_EXNORESPORT = 0x8000000
+ MNT_EXPORTANON = 0x400
+ MNT_EXPORTED = 0x100
+ MNT_EXPUBLIC = 0x10000000
+ MNT_EXRDONLY = 0x80
+ MNT_EXTATTR = 0x1000000
+ MNT_FORCE = 0x80000
+ MNT_GETARGS = 0x400000
+ MNT_IGNORE = 0x100000
+ MNT_LAZY = 0x3
+ MNT_LOCAL = 0x1000
+ MNT_LOG = 0x2000000
+ MNT_NOATIME = 0x4000000
+ MNT_NOCOREDUMP = 0x8000
+ MNT_NODEV = 0x10
+ MNT_NODEVMTIME = 0x40000000
+ MNT_NOEXEC = 0x4
+ MNT_NOSUID = 0x8
+ MNT_NOWAIT = 0x2
+ MNT_OP_FLAGS = 0x4d0000
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELATIME = 0x20000
+ MNT_RELOAD = 0x40000
+ MNT_ROOTFS = 0x4000
+ MNT_SOFTDEP = 0x80000000
+ MNT_SYMPERM = 0x20000000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UNION = 0x20
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0xff90ffff
+ MNT_WAIT = 0x1
MSG_BCAST = 0x100
MSG_CMSG_CLOEXEC = 0x800
MSG_CONTROLMBUF = 0x2000000
@@ -1093,7 +1130,10 @@ const (
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
+ RLIMIT_MEMLOCK = 0x6
RLIMIT_NOFILE = 0x8
+ RLIMIT_NPROC = 0x7
+ RLIMIT_RSS = 0x5
RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6
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 7d92f2c53..d8be04518 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
@@ -899,6 +899,32 @@ const (
MAP_TRYFIXED = 0x400
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_DEFEXPORTED = 0x200
+ MNT_DELEXPORT = 0x20000
+ MNT_DOOMED = 0x8000000
+ MNT_EXPORTANON = 0x400
+ MNT_EXPORTED = 0x100
+ MNT_EXRDONLY = 0x80
+ MNT_FORCE = 0x80000
+ MNT_LAZY = 0x3
+ MNT_LOCAL = 0x1000
+ MNT_NOATIME = 0x8000
+ MNT_NODEV = 0x10
+ MNT_NOEXEC = 0x4
+ MNT_NOSUID = 0x8
+ MNT_NOWAIT = 0x2
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELOAD = 0x40000
+ MNT_ROOTFS = 0x4000
+ MNT_SOFTDEP = 0x4000000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0x400ffff
+ MNT_WAIT = 0x1
+ MNT_WANTRDWR = 0x2000000
+ MNT_WXALLOWED = 0x800
MSG_BCAST = 0x100
MSG_CTRUNC = 0x20
MSG_DONTROUTE = 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 b0a7ebafc..12261a562 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
@@ -939,6 +939,32 @@ const (
MAP_TRYFIXED = 0x0
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_DEFEXPORTED = 0x200
+ MNT_DELEXPORT = 0x20000
+ MNT_DOOMED = 0x8000000
+ MNT_EXPORTANON = 0x400
+ MNT_EXPORTED = 0x100
+ MNT_EXRDONLY = 0x80
+ MNT_FORCE = 0x80000
+ MNT_LAZY = 0x3
+ MNT_LOCAL = 0x1000
+ MNT_NOATIME = 0x8000
+ MNT_NODEV = 0x10
+ MNT_NOEXEC = 0x4
+ MNT_NOSUID = 0x8
+ MNT_NOWAIT = 0x2
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELOAD = 0x40000
+ MNT_ROOTFS = 0x4000
+ MNT_SOFTDEP = 0x4000000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0x400ffff
+ MNT_WAIT = 0x1
+ MNT_WANTRDWR = 0x2000000
+ MNT_WXALLOWED = 0x800
MSG_BCAST = 0x100
MSG_CMSG_CLOEXEC = 0x800
MSG_CTRUNC = 0x20
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 50c1d9f35..79d5695c3 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
@@ -899,6 +899,32 @@ const (
MAP_TRYFIXED = 0x0
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_DEFEXPORTED = 0x200
+ MNT_DELEXPORT = 0x20000
+ MNT_DOOMED = 0x8000000
+ MNT_EXPORTANON = 0x400
+ MNT_EXPORTED = 0x100
+ MNT_EXRDONLY = 0x80
+ MNT_FORCE = 0x80000
+ MNT_LAZY = 0x3
+ MNT_LOCAL = 0x1000
+ MNT_NOATIME = 0x8000
+ MNT_NODEV = 0x10
+ MNT_NOEXEC = 0x4
+ MNT_NOSUID = 0x8
+ MNT_NOWAIT = 0x2
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELOAD = 0x40000
+ MNT_ROOTFS = 0x4000
+ MNT_SOFTDEP = 0x4000000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0x400ffff
+ MNT_WAIT = 0x1
+ MNT_WANTRDWR = 0x2000000
+ MNT_WXALLOWED = 0x800
MSG_BCAST = 0x100
MSG_CMSG_CLOEXEC = 0x800
MSG_CTRUNC = 0x20
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
new file mode 100644
index 000000000..ab2f76122
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
@@ -0,0 +1,1519 @@
+// mksyscall_aix.pl -aix -tags aix,ppc syscall_aix.go syscall_aix_ppc.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build aix,ppc
+
+package unix
+
+/*
+#include <stdint.h>
+int utimes(uintptr_t, uintptr_t);
+int utimensat(int, uintptr_t, uintptr_t, int);
+int getcwd(uintptr_t, size_t);
+int accept(int, uintptr_t, uintptr_t);
+int getdirent(int, uintptr_t, size_t);
+int wait4(int, uintptr_t, int, uintptr_t);
+int ioctl(int, int, uintptr_t);
+int fcntl(uintptr_t, int, uintptr_t);
+int acct(uintptr_t);
+int chdir(uintptr_t);
+int chroot(uintptr_t);
+int close(int);
+int dup(int);
+int dup3(int, int, int);
+void exit(int);
+int faccessat(int, uintptr_t, unsigned int, int);
+int fallocate(int, unsigned int, long long, long long);
+int fchdir(int);
+int fchmod(int, unsigned int);
+int fchmodat(int, uintptr_t, unsigned int, int);
+int fchownat(int, uintptr_t, int, int, int);
+int fdatasync(int);
+int fsync(int);
+int getpgid(int);
+int getpgrp();
+int getpid();
+int getppid();
+int getpriority(int, int);
+int getrusage(int, uintptr_t);
+int getsid(int);
+int kill(int, int);
+int syslog(int, uintptr_t, size_t);
+int mkdir(int, uintptr_t, unsigned int);
+int mkdirat(int, uintptr_t, unsigned int);
+int mkfifo(uintptr_t, unsigned int);
+int mknod(uintptr_t, unsigned int, int);
+int mknodat(int, uintptr_t, unsigned int, int);
+int nanosleep(uintptr_t, uintptr_t);
+int open64(uintptr_t, int, unsigned int);
+int openat(int, uintptr_t, int, unsigned int);
+int read(int, uintptr_t, size_t);
+int readlink(uintptr_t, uintptr_t, size_t);
+int removexattr(uintptr_t, uintptr_t);
+int renameat(int, uintptr_t, int, uintptr_t);
+int setdomainname(uintptr_t, size_t);
+int sethostname(uintptr_t, size_t);
+int setpgid(int, int);
+int setsid();
+int settimeofday(uintptr_t);
+int setuid(int);
+int setgid(int);
+int setpriority(int, int, int);
+int statx(int, uintptr_t, int, int, uintptr_t);
+int sync();
+long long tee(int, int, int, int);
+uintptr_t times(uintptr_t);
+int umask(int);
+int uname(uintptr_t);
+int unlink(uintptr_t);
+int unlinkat(int, uintptr_t, int);
+int unshare(int);
+int ustat(int, uintptr_t);
+int write(int, uintptr_t, size_t);
+int dup2(int, int);
+int posix_fadvise64(int, long long, long long, int);
+int fchown(int, int, int);
+int fstat(int, uintptr_t);
+int fstatat(int, uintptr_t, uintptr_t, int);
+int fstatfs(int, uintptr_t);
+int ftruncate(int, long long);
+int getegid();
+int geteuid();
+int getgid();
+int getuid();
+int lchown(uintptr_t, int, int);
+int listen(int, int);
+int lstat(uintptr_t, uintptr_t);
+int pause();
+int pread64(int, uintptr_t, size_t, long long);
+int pwrite64(int, uintptr_t, size_t, long long);
+int pselect(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
+int setregid(int, int);
+int setreuid(int, int);
+int shutdown(int, int);
+long long splice(int, uintptr_t, int, uintptr_t, int, int);
+int stat(uintptr_t, uintptr_t);
+int statfs(uintptr_t, uintptr_t);
+int truncate(uintptr_t, long long);
+int bind(int, uintptr_t, uintptr_t);
+int connect(int, uintptr_t, uintptr_t);
+int getgroups(int, uintptr_t);
+int setgroups(int, uintptr_t);
+int getsockopt(int, int, int, uintptr_t, uintptr_t);
+int setsockopt(int, int, int, uintptr_t, uintptr_t);
+int socket(int, int, int);
+int socketpair(int, int, int, uintptr_t);
+int getpeername(int, uintptr_t, uintptr_t);
+int getsockname(int, uintptr_t, uintptr_t);
+int recvfrom(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);
+int sendto(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);
+int recvmsg(int, uintptr_t, int);
+int sendmsg(int, uintptr_t, int);
+int munmap(uintptr_t, uintptr_t);
+int madvise(uintptr_t, size_t, int);
+int mprotect(uintptr_t, size_t, int);
+int mlock(uintptr_t, size_t);
+int mlockall(int);
+int msync(uintptr_t, size_t, int);
+int munlock(uintptr_t, size_t);
+int munlockall();
+int pipe(uintptr_t);
+int pipe2(uintptr_t, int);
+int poll(uintptr_t, int, int);
+int gettimeofday(uintptr_t, uintptr_t);
+int time(uintptr_t);
+int utime(uintptr_t, uintptr_t);
+int getrlimit64(int, uintptr_t);
+int setrlimit64(int, uintptr_t);
+long long lseek64(int, long long, int);
+uintptr_t mmap(uintptr_t, uintptr_t, int, int, int, long long);
+
+*/
+import "C"
+import (
+ "syscall"
+ "unsafe"
+)
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimes(path string, times *[2]Timeval) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.utimes(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(times))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.utimensat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(times))), C.int(flag))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getcwd(buf []byte) (err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ var _p1 int
+ _p1 = len(buf)
+ r0, er := C.getcwd(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
+ r0, er := C.accept(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen))))
+ fd = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getdirent(fd int, buf []byte) (n int, err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ var _p1 int
+ _p1 = len(buf)
+ r0, er := C.getdirent(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error) {
+ r0, er := C.wait4(C.int(pid), C.uintptr_t(uintptr(unsafe.Pointer(status))), C.int(options), C.uintptr_t(uintptr(unsafe.Pointer(rusage))))
+ wpid = Pid_t(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(arg))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func FcntlInt(fd uintptr, cmd int, arg int) (r int, err error) {
+ r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg))
+ r = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) {
+ r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(uintptr(unsafe.Pointer(lk))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Acct(path string) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.acct(C.uintptr_t(_p0))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chdir(path string) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.chdir(C.uintptr_t(_p0))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chroot(path string) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.chroot(C.uintptr_t(_p0))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Close(fd int) (err error) {
+ r0, er := C.close(C.int(fd))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup(oldfd int) (fd int, err error) {
+ r0, er := C.dup(C.int(oldfd))
+ fd = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup3(oldfd int, newfd int, flags int) (err error) {
+ r0, er := C.dup3(C.int(oldfd), C.int(newfd), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Exit(code int) {
+ C.exit(C.int(code))
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.faccessat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
+ r0, er := C.fallocate(C.int(fd), C.uint(mode), C.longlong(off), C.longlong(len))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchdir(fd int) (err error) {
+ r0, er := C.fchdir(C.int(fd))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmod(fd int, mode uint32) (err error) {
+ r0, er := C.fchmod(C.int(fd), C.uint(mode))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.fchmodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.fchownat(C.int(dirfd), C.uintptr_t(_p0), C.int(uid), C.int(gid), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fcntl(fd int, cmd int, arg int) (val int, err error) {
+ r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg))
+ val = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fdatasync(fd int) (err error) {
+ r0, er := C.fdatasync(C.int(fd))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsync(fd int) (err error) {
+ r0, er := C.fsync(C.int(fd))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgid(pid int) (pgid int, err error) {
+ r0, er := C.getpgid(C.int(pid))
+ pgid = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgrp() (pid int) {
+ r0, _ := C.getpgrp()
+ pid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpid() (pid int) {
+ r0, _ := C.getpid()
+ pid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getppid() (ppid int) {
+ r0, _ := C.getppid()
+ ppid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpriority(which int, who int) (prio int, err error) {
+ r0, er := C.getpriority(C.int(which), C.int(who))
+ prio = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrusage(who int, rusage *Rusage) (err error) {
+ r0, er := C.getrusage(C.int(who), C.uintptr_t(uintptr(unsafe.Pointer(rusage))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getsid(pid int) (sid int, err error) {
+ r0, er := C.getsid(C.int(pid))
+ sid = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kill(pid int, sig syscall.Signal) (err error) {
+ r0, er := C.kill(C.int(pid), C.int(sig))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Klogctl(typ int, buf []byte) (n int, err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ var _p1 int
+ _p1 = len(buf)
+ r0, er := C.syslog(C.int(typ), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdir(dirfd int, path string, mode uint32) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.mkdir(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdirat(dirfd int, path string, mode uint32) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.mkdirat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkfifo(path string, mode uint32) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.mkfifo(C.uintptr_t(_p0), C.uint(mode))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknod(path string, mode uint32, dev int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.mknod(C.uintptr_t(_p0), C.uint(mode), C.int(dev))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.mknodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(dev))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
+ r0, er := C.nanosleep(C.uintptr_t(uintptr(unsafe.Pointer(time))), C.uintptr_t(uintptr(unsafe.Pointer(leftover))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Open(path string, mode int, perm uint32) (fd int, err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.open64(C.uintptr_t(_p0), C.int(mode), C.uint(perm))
+ fd = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.openat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.uint(mode))
+ fd = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func read(fd int, p []byte) (n int, err error) {
+ var _p0 *byte
+ if len(p) > 0 {
+ _p0 = &p[0]
+ }
+ var _p1 int
+ _p1 = len(p)
+ r0, er := C.read(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlink(path string, buf []byte) (n int, err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ var _p1 *byte
+ if len(buf) > 0 {
+ _p1 = &buf[0]
+ }
+ var _p2 int
+ _p2 = len(buf)
+ r0, er := C.readlink(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(_p1))), C.size_t(_p2))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Removexattr(path string, attr string) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ _p1 := uintptr(unsafe.Pointer(C.CString(attr)))
+ r0, er := C.removexattr(C.uintptr_t(_p0), C.uintptr_t(_p1))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(oldpath)))
+ _p1 := uintptr(unsafe.Pointer(C.CString(newpath)))
+ r0, er := C.renameat(C.int(olddirfd), C.uintptr_t(_p0), C.int(newdirfd), C.uintptr_t(_p1))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setdomainname(p []byte) (err error) {
+ var _p0 *byte
+ if len(p) > 0 {
+ _p0 = &p[0]
+ }
+ var _p1 int
+ _p1 = len(p)
+ r0, er := C.setdomainname(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sethostname(p []byte) (err error) {
+ var _p0 *byte
+ if len(p) > 0 {
+ _p0 = &p[0]
+ }
+ var _p1 int
+ _p1 = len(p)
+ r0, er := C.sethostname(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpgid(pid int, pgid int) (err error) {
+ r0, er := C.setpgid(C.int(pid), C.int(pgid))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setsid() (pid int, err error) {
+ r0, er := C.setsid()
+ pid = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Settimeofday(tv *Timeval) (err error) {
+ r0, er := C.settimeofday(C.uintptr_t(uintptr(unsafe.Pointer(tv))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setuid(uid int) (err error) {
+ r0, er := C.setuid(C.int(uid))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setgid(uid int) (err error) {
+ r0, er := C.setgid(C.int(uid))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpriority(which int, who int, prio int) (err error) {
+ r0, er := C.setpriority(C.int(which), C.int(who), C.int(prio))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.statx(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.int(mask), C.uintptr_t(uintptr(unsafe.Pointer(stat))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sync() {
+ C.sync()
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
+ r0, er := C.tee(C.int(rfd), C.int(wfd), C.int(len), C.int(flags))
+ n = int64(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Times(tms *Tms) (ticks uintptr, err error) {
+ r0, er := C.times(C.uintptr_t(uintptr(unsafe.Pointer(tms))))
+ ticks = uintptr(r0)
+ if uintptr(r0) == ^uintptr(0) && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Umask(mask int) (oldmask int) {
+ r0, _ := C.umask(C.int(mask))
+ oldmask = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Uname(buf *Utsname) (err error) {
+ r0, er := C.uname(C.uintptr_t(uintptr(unsafe.Pointer(buf))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlink(path string) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.unlink(C.uintptr_t(_p0))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlinkat(dirfd int, path string, flags int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.unlinkat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unshare(flags int) (err error) {
+ r0, er := C.unshare(C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ustat(dev int, ubuf *Ustat_t) (err error) {
+ r0, er := C.ustat(C.int(dev), C.uintptr_t(uintptr(unsafe.Pointer(ubuf))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func write(fd int, p []byte) (n int, err error) {
+ var _p0 *byte
+ if len(p) > 0 {
+ _p0 = &p[0]
+ }
+ var _p1 int
+ _p1 = len(p)
+ r0, er := C.write(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readlen(fd int, p *byte, np int) (n int, err error) {
+ r0, er := C.read(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(p))), C.size_t(np))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writelen(fd int, p *byte, np int) (n int, err error) {
+ r0, er := C.write(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(p))), C.size_t(np))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup2(oldfd int, newfd int) (err error) {
+ r0, er := C.dup2(C.int(oldfd), C.int(newfd))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
+ r0, er := C.posix_fadvise64(C.int(fd), C.longlong(offset), C.longlong(length), C.int(advice))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchown(fd int, uid int, gid int) (err error) {
+ r0, er := C.fchown(C.int(fd), C.int(uid), C.int(gid))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+ r0, er := C.fstat(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(stat))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.fstatat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat))), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatfs(fd int, buf *Statfs_t) (err error) {
+ r0, er := C.fstatfs(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(buf))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ r0, er := C.ftruncate(C.int(fd), C.longlong(length))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getegid() (egid int) {
+ r0, _ := C.getegid()
+ egid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Geteuid() (euid int) {
+ r0, _ := C.geteuid()
+ euid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getgid() (gid int) {
+ r0, _ := C.getgid()
+ gid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getuid() (uid int) {
+ r0, _ := C.getuid()
+ uid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lchown(path string, uid int, gid int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.lchown(C.uintptr_t(_p0), C.int(uid), C.int(gid))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listen(s int, n int) (err error) {
+ r0, er := C.listen(C.int(s), C.int(n))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lstat(path string, stat *Stat_t) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.lstat(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pause() (err error) {
+ r0, er := C.pause()
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 *byte
+ if len(p) > 0 {
+ _p0 = &p[0]
+ }
+ var _p1 int
+ _p1 = len(p)
+ r0, er := C.pread64(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.longlong(offset))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 *byte
+ if len(p) > 0 {
+ _p0 = &p[0]
+ }
+ var _p1 int
+ _p1 = len(p)
+ r0, er := C.pwrite64(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.longlong(offset))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ r0, er := C.pselect(C.int(nfd), C.uintptr_t(uintptr(unsafe.Pointer(r))), C.uintptr_t(uintptr(unsafe.Pointer(w))), C.uintptr_t(uintptr(unsafe.Pointer(e))), C.uintptr_t(uintptr(unsafe.Pointer(timeout))), C.uintptr_t(uintptr(unsafe.Pointer(sigmask))))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setregid(rgid int, egid int) (err error) {
+ r0, er := C.setregid(C.int(rgid), C.int(egid))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setreuid(ruid int, euid int) (err error) {
+ r0, er := C.setreuid(C.int(ruid), C.int(euid))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Shutdown(fd int, how int) (err error) {
+ r0, er := C.shutdown(C.int(fd), C.int(how))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
+ r0, er := C.splice(C.int(rfd), C.uintptr_t(uintptr(unsafe.Pointer(roff))), C.int(wfd), C.uintptr_t(uintptr(unsafe.Pointer(woff))), C.int(len), C.int(flags))
+ n = int64(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Stat(path string, stat *Stat_t) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.stat(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statfs(path string, buf *Statfs_t) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.statfs(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(buf))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Truncate(path string, length int64) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.truncate(C.uintptr_t(_p0), C.longlong(length))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ r0, er := C.bind(C.int(s), C.uintptr_t(uintptr(addr)), C.uintptr_t(uintptr(addrlen)))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ r0, er := C.connect(C.int(s), C.uintptr_t(uintptr(addr)), C.uintptr_t(uintptr(addrlen)))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getgroups(n int, list *_Gid_t) (nn int, err error) {
+ r0, er := C.getgroups(C.int(n), C.uintptr_t(uintptr(unsafe.Pointer(list))))
+ nn = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setgroups(n int, list *_Gid_t) (err error) {
+ r0, er := C.setgroups(C.int(n), C.uintptr_t(uintptr(unsafe.Pointer(list))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
+ r0, er := C.getsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(uintptr(val)), C.uintptr_t(uintptr(unsafe.Pointer(vallen))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
+ r0, er := C.setsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(uintptr(val)), C.uintptr_t(vallen))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socket(domain int, typ int, proto int) (fd int, err error) {
+ r0, er := C.socket(C.int(domain), C.int(typ), C.int(proto))
+ fd = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
+ r0, er := C.socketpair(C.int(domain), C.int(typ), C.int(proto), C.uintptr_t(uintptr(unsafe.Pointer(fd))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ r0, er := C.getpeername(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ r0, er := C.getsockname(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
+ var _p0 *byte
+ if len(p) > 0 {
+ _p0 = &p[0]
+ }
+ var _p1 int
+ _p1 = len(p)
+ r0, er := C.recvfrom(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags), C.uintptr_t(uintptr(unsafe.Pointer(from))), C.uintptr_t(uintptr(unsafe.Pointer(fromlen))))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ var _p1 int
+ _p1 = len(buf)
+ r0, er := C.sendto(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags), C.uintptr_t(uintptr(to)), C.uintptr_t(uintptr(addrlen)))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, er := C.recvmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, er := C.sendmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func munmap(addr uintptr, length uintptr) (err error) {
+ r0, er := C.munmap(C.uintptr_t(addr), C.uintptr_t(length))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Madvise(b []byte, advice int) (err error) {
+ var _p0 *byte
+ if len(b) > 0 {
+ _p0 = &b[0]
+ }
+ var _p1 int
+ _p1 = len(b)
+ r0, er := C.madvise(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(advice))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mprotect(b []byte, prot int) (err error) {
+ var _p0 *byte
+ if len(b) > 0 {
+ _p0 = &b[0]
+ }
+ var _p1 int
+ _p1 = len(b)
+ r0, er := C.mprotect(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(prot))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlock(b []byte) (err error) {
+ var _p0 *byte
+ if len(b) > 0 {
+ _p0 = &b[0]
+ }
+ var _p1 int
+ _p1 = len(b)
+ r0, er := C.mlock(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlockall(flags int) (err error) {
+ r0, er := C.mlockall(C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Msync(b []byte, flags int) (err error) {
+ var _p0 *byte
+ if len(b) > 0 {
+ _p0 = &b[0]
+ }
+ var _p1 int
+ _p1 = len(b)
+ r0, er := C.msync(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlock(b []byte) (err error) {
+ var _p0 *byte
+ if len(b) > 0 {
+ _p0 = &b[0]
+ }
+ var _p1 int
+ _p1 = len(b)
+ r0, er := C.munlock(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlockall() (err error) {
+ r0, er := C.munlockall()
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe(p *[2]_C_int) (err error) {
+ r0, er := C.pipe(C.uintptr_t(uintptr(unsafe.Pointer(p))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ r0, er := C.pipe2(C.uintptr_t(uintptr(unsafe.Pointer(p))), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
+ r0, er := C.poll(C.uintptr_t(uintptr(unsafe.Pointer(fds))), C.int(nfds), C.int(timeout))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func gettimeofday(tv *Timeval, tzp *Timezone) (err error) {
+ r0, er := C.gettimeofday(C.uintptr_t(uintptr(unsafe.Pointer(tv))), C.uintptr_t(uintptr(unsafe.Pointer(tzp))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Time(t *Time_t) (tt Time_t, err error) {
+ r0, er := C.time(C.uintptr_t(uintptr(unsafe.Pointer(t))))
+ tt = Time_t(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Utime(path string, buf *Utimbuf) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.utime(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(buf))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrlimit(resource int, rlim *Rlimit) (err error) {
+ r0, er := C.getrlimit64(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrlimit(resource int, rlim *Rlimit) (err error) {
+ r0, er := C.setrlimit64(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seek(fd int, offset int64, whence int) (off int64, err error) {
+ r0, er := C.lseek64(C.int(fd), C.longlong(offset), C.int(whence))
+ off = int64(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
+ r0, er := C.mmap(C.uintptr_t(addr), C.uintptr_t(length), C.int(prot), C.int(flags), C.int(fd), C.longlong(offset))
+ xaddr = uintptr(r0)
+ if uintptr(r0) == ^uintptr(0) && er != nil {
+ err = er
+ }
+ return
+}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
new file mode 100644
index 000000000..2e4f93fb1
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
@@ -0,0 +1,1519 @@
+// mksyscall_aix.pl -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build aix,ppc64
+
+package unix
+
+/*
+#include <stdint.h>
+int utimes(uintptr_t, uintptr_t);
+int utimensat(int, uintptr_t, uintptr_t, int);
+int getcwd(uintptr_t, size_t);
+int accept(int, uintptr_t, uintptr_t);
+int getdirent(int, uintptr_t, size_t);
+int wait4(int, uintptr_t, int, uintptr_t);
+int ioctl(int, int, uintptr_t);
+int fcntl(uintptr_t, int, uintptr_t);
+int acct(uintptr_t);
+int chdir(uintptr_t);
+int chroot(uintptr_t);
+int close(int);
+int dup(int);
+int dup3(int, int, int);
+void exit(int);
+int faccessat(int, uintptr_t, unsigned int, int);
+int fallocate(int, unsigned int, long long, long long);
+int fchdir(int);
+int fchmod(int, unsigned int);
+int fchmodat(int, uintptr_t, unsigned int, int);
+int fchownat(int, uintptr_t, int, int, int);
+int fdatasync(int);
+int fsync(int);
+int getpgid(int);
+int getpgrp();
+int getpid();
+int getppid();
+int getpriority(int, int);
+int getrusage(int, uintptr_t);
+int getsid(int);
+int kill(int, int);
+int syslog(int, uintptr_t, size_t);
+int mkdir(int, uintptr_t, unsigned int);
+int mkdirat(int, uintptr_t, unsigned int);
+int mkfifo(uintptr_t, unsigned int);
+int mknod(uintptr_t, unsigned int, int);
+int mknodat(int, uintptr_t, unsigned int, int);
+int nanosleep(uintptr_t, uintptr_t);
+int open64(uintptr_t, int, unsigned int);
+int openat(int, uintptr_t, int, unsigned int);
+int read(int, uintptr_t, size_t);
+int readlink(uintptr_t, uintptr_t, size_t);
+int removexattr(uintptr_t, uintptr_t);
+int renameat(int, uintptr_t, int, uintptr_t);
+int setdomainname(uintptr_t, size_t);
+int sethostname(uintptr_t, size_t);
+int setpgid(int, int);
+int setsid();
+int settimeofday(uintptr_t);
+int setuid(int);
+int setgid(int);
+int setpriority(int, int, int);
+int statx(int, uintptr_t, int, int, uintptr_t);
+int sync();
+long long tee(int, int, int, int);
+uintptr_t times(uintptr_t);
+int umask(int);
+int uname(uintptr_t);
+int unlink(uintptr_t);
+int unlinkat(int, uintptr_t, int);
+int unshare(int);
+int ustat(int, uintptr_t);
+int write(int, uintptr_t, size_t);
+int dup2(int, int);
+int posix_fadvise64(int, long long, long long, int);
+int fchown(int, int, int);
+int fstat(int, uintptr_t);
+int fstatat(int, uintptr_t, uintptr_t, int);
+int fstatfs(int, uintptr_t);
+int ftruncate(int, long long);
+int getegid();
+int geteuid();
+int getgid();
+int getuid();
+int lchown(uintptr_t, int, int);
+int listen(int, int);
+int lstat(uintptr_t, uintptr_t);
+int pause();
+int pread64(int, uintptr_t, size_t, long long);
+int pwrite64(int, uintptr_t, size_t, long long);
+int pselect(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
+int setregid(int, int);
+int setreuid(int, int);
+int shutdown(int, int);
+long long splice(int, uintptr_t, int, uintptr_t, int, int);
+int stat(uintptr_t, uintptr_t);
+int statfs(uintptr_t, uintptr_t);
+int truncate(uintptr_t, long long);
+int bind(int, uintptr_t, uintptr_t);
+int connect(int, uintptr_t, uintptr_t);
+int getgroups(int, uintptr_t);
+int setgroups(int, uintptr_t);
+int getsockopt(int, int, int, uintptr_t, uintptr_t);
+int setsockopt(int, int, int, uintptr_t, uintptr_t);
+int socket(int, int, int);
+int socketpair(int, int, int, uintptr_t);
+int getpeername(int, uintptr_t, uintptr_t);
+int getsockname(int, uintptr_t, uintptr_t);
+int recvfrom(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);
+int sendto(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);
+int recvmsg(int, uintptr_t, int);
+int sendmsg(int, uintptr_t, int);
+int munmap(uintptr_t, uintptr_t);
+int madvise(uintptr_t, size_t, int);
+int mprotect(uintptr_t, size_t, int);
+int mlock(uintptr_t, size_t);
+int mlockall(int);
+int msync(uintptr_t, size_t, int);
+int munlock(uintptr_t, size_t);
+int munlockall();
+int pipe(uintptr_t);
+int pipe2(uintptr_t, int);
+int poll(uintptr_t, int, int);
+int gettimeofday(uintptr_t, uintptr_t);
+int time(uintptr_t);
+int utime(uintptr_t, uintptr_t);
+int getrlimit(int, uintptr_t);
+int setrlimit(int, uintptr_t);
+long long lseek(int, long long, int);
+uintptr_t mmap64(uintptr_t, uintptr_t, int, int, int, long long);
+
+*/
+import "C"
+import (
+ "syscall"
+ "unsafe"
+)
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimes(path string, times *[2]Timeval) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.utimes(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(times))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.utimensat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(times))), C.int(flag))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getcwd(buf []byte) (err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ var _p1 int
+ _p1 = len(buf)
+ r0, er := C.getcwd(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
+ r0, er := C.accept(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen))))
+ fd = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getdirent(fd int, buf []byte) (n int, err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ var _p1 int
+ _p1 = len(buf)
+ r0, er := C.getdirent(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error) {
+ r0, er := C.wait4(C.int(pid), C.uintptr_t(uintptr(unsafe.Pointer(status))), C.int(options), C.uintptr_t(uintptr(unsafe.Pointer(rusage))))
+ wpid = Pid_t(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(arg))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func FcntlInt(fd uintptr, cmd int, arg int) (r int, err error) {
+ r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg))
+ r = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) {
+ r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(uintptr(unsafe.Pointer(lk))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Acct(path string) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.acct(C.uintptr_t(_p0))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chdir(path string) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.chdir(C.uintptr_t(_p0))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chroot(path string) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.chroot(C.uintptr_t(_p0))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Close(fd int) (err error) {
+ r0, er := C.close(C.int(fd))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup(oldfd int) (fd int, err error) {
+ r0, er := C.dup(C.int(oldfd))
+ fd = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup3(oldfd int, newfd int, flags int) (err error) {
+ r0, er := C.dup3(C.int(oldfd), C.int(newfd), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Exit(code int) {
+ C.exit(C.int(code))
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.faccessat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
+ r0, er := C.fallocate(C.int(fd), C.uint(mode), C.longlong(off), C.longlong(len))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchdir(fd int) (err error) {
+ r0, er := C.fchdir(C.int(fd))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmod(fd int, mode uint32) (err error) {
+ r0, er := C.fchmod(C.int(fd), C.uint(mode))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.fchmodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.fchownat(C.int(dirfd), C.uintptr_t(_p0), C.int(uid), C.int(gid), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fcntl(fd int, cmd int, arg int) (val int, err error) {
+ r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg))
+ val = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fdatasync(fd int) (err error) {
+ r0, er := C.fdatasync(C.int(fd))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsync(fd int) (err error) {
+ r0, er := C.fsync(C.int(fd))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgid(pid int) (pgid int, err error) {
+ r0, er := C.getpgid(C.int(pid))
+ pgid = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgrp() (pid int) {
+ r0, _ := C.getpgrp()
+ pid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpid() (pid int) {
+ r0, _ := C.getpid()
+ pid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getppid() (ppid int) {
+ r0, _ := C.getppid()
+ ppid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpriority(which int, who int) (prio int, err error) {
+ r0, er := C.getpriority(C.int(which), C.int(who))
+ prio = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrusage(who int, rusage *Rusage) (err error) {
+ r0, er := C.getrusage(C.int(who), C.uintptr_t(uintptr(unsafe.Pointer(rusage))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getsid(pid int) (sid int, err error) {
+ r0, er := C.getsid(C.int(pid))
+ sid = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kill(pid int, sig syscall.Signal) (err error) {
+ r0, er := C.kill(C.int(pid), C.int(sig))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Klogctl(typ int, buf []byte) (n int, err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ var _p1 int
+ _p1 = len(buf)
+ r0, er := C.syslog(C.int(typ), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdir(dirfd int, path string, mode uint32) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.mkdir(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdirat(dirfd int, path string, mode uint32) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.mkdirat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkfifo(path string, mode uint32) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.mkfifo(C.uintptr_t(_p0), C.uint(mode))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknod(path string, mode uint32, dev int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.mknod(C.uintptr_t(_p0), C.uint(mode), C.int(dev))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.mknodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(dev))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
+ r0, er := C.nanosleep(C.uintptr_t(uintptr(unsafe.Pointer(time))), C.uintptr_t(uintptr(unsafe.Pointer(leftover))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Open(path string, mode int, perm uint32) (fd int, err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.open64(C.uintptr_t(_p0), C.int(mode), C.uint(perm))
+ fd = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.openat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.uint(mode))
+ fd = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func read(fd int, p []byte) (n int, err error) {
+ var _p0 *byte
+ if len(p) > 0 {
+ _p0 = &p[0]
+ }
+ var _p1 int
+ _p1 = len(p)
+ r0, er := C.read(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlink(path string, buf []byte) (n int, err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ var _p1 *byte
+ if len(buf) > 0 {
+ _p1 = &buf[0]
+ }
+ var _p2 int
+ _p2 = len(buf)
+ r0, er := C.readlink(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(_p1))), C.size_t(_p2))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Removexattr(path string, attr string) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ _p1 := uintptr(unsafe.Pointer(C.CString(attr)))
+ r0, er := C.removexattr(C.uintptr_t(_p0), C.uintptr_t(_p1))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(oldpath)))
+ _p1 := uintptr(unsafe.Pointer(C.CString(newpath)))
+ r0, er := C.renameat(C.int(olddirfd), C.uintptr_t(_p0), C.int(newdirfd), C.uintptr_t(_p1))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setdomainname(p []byte) (err error) {
+ var _p0 *byte
+ if len(p) > 0 {
+ _p0 = &p[0]
+ }
+ var _p1 int
+ _p1 = len(p)
+ r0, er := C.setdomainname(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sethostname(p []byte) (err error) {
+ var _p0 *byte
+ if len(p) > 0 {
+ _p0 = &p[0]
+ }
+ var _p1 int
+ _p1 = len(p)
+ r0, er := C.sethostname(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpgid(pid int, pgid int) (err error) {
+ r0, er := C.setpgid(C.int(pid), C.int(pgid))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setsid() (pid int, err error) {
+ r0, er := C.setsid()
+ pid = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Settimeofday(tv *Timeval) (err error) {
+ r0, er := C.settimeofday(C.uintptr_t(uintptr(unsafe.Pointer(tv))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setuid(uid int) (err error) {
+ r0, er := C.setuid(C.int(uid))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setgid(uid int) (err error) {
+ r0, er := C.setgid(C.int(uid))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpriority(which int, who int, prio int) (err error) {
+ r0, er := C.setpriority(C.int(which), C.int(who), C.int(prio))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.statx(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.int(mask), C.uintptr_t(uintptr(unsafe.Pointer(stat))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sync() {
+ C.sync()
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
+ r0, er := C.tee(C.int(rfd), C.int(wfd), C.int(len), C.int(flags))
+ n = int64(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Times(tms *Tms) (ticks uintptr, err error) {
+ r0, er := C.times(C.uintptr_t(uintptr(unsafe.Pointer(tms))))
+ ticks = uintptr(r0)
+ if uintptr(r0) == ^uintptr(0) && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Umask(mask int) (oldmask int) {
+ r0, _ := C.umask(C.int(mask))
+ oldmask = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Uname(buf *Utsname) (err error) {
+ r0, er := C.uname(C.uintptr_t(uintptr(unsafe.Pointer(buf))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlink(path string) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.unlink(C.uintptr_t(_p0))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlinkat(dirfd int, path string, flags int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.unlinkat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unshare(flags int) (err error) {
+ r0, er := C.unshare(C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ustat(dev int, ubuf *Ustat_t) (err error) {
+ r0, er := C.ustat(C.int(dev), C.uintptr_t(uintptr(unsafe.Pointer(ubuf))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func write(fd int, p []byte) (n int, err error) {
+ var _p0 *byte
+ if len(p) > 0 {
+ _p0 = &p[0]
+ }
+ var _p1 int
+ _p1 = len(p)
+ r0, er := C.write(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readlen(fd int, p *byte, np int) (n int, err error) {
+ r0, er := C.read(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(p))), C.size_t(np))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writelen(fd int, p *byte, np int) (n int, err error) {
+ r0, er := C.write(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(p))), C.size_t(np))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup2(oldfd int, newfd int) (err error) {
+ r0, er := C.dup2(C.int(oldfd), C.int(newfd))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
+ r0, er := C.posix_fadvise64(C.int(fd), C.longlong(offset), C.longlong(length), C.int(advice))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchown(fd int, uid int, gid int) (err error) {
+ r0, er := C.fchown(C.int(fd), C.int(uid), C.int(gid))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+ r0, er := C.fstat(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(stat))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.fstatat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat))), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatfs(fd int, buf *Statfs_t) (err error) {
+ r0, er := C.fstatfs(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(buf))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ r0, er := C.ftruncate(C.int(fd), C.longlong(length))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getegid() (egid int) {
+ r0, _ := C.getegid()
+ egid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Geteuid() (euid int) {
+ r0, _ := C.geteuid()
+ euid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getgid() (gid int) {
+ r0, _ := C.getgid()
+ gid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getuid() (uid int) {
+ r0, _ := C.getuid()
+ uid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lchown(path string, uid int, gid int) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.lchown(C.uintptr_t(_p0), C.int(uid), C.int(gid))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listen(s int, n int) (err error) {
+ r0, er := C.listen(C.int(s), C.int(n))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lstat(path string, stat *Stat_t) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.lstat(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pause() (err error) {
+ r0, er := C.pause()
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 *byte
+ if len(p) > 0 {
+ _p0 = &p[0]
+ }
+ var _p1 int
+ _p1 = len(p)
+ r0, er := C.pread64(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.longlong(offset))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 *byte
+ if len(p) > 0 {
+ _p0 = &p[0]
+ }
+ var _p1 int
+ _p1 = len(p)
+ r0, er := C.pwrite64(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.longlong(offset))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ r0, er := C.pselect(C.int(nfd), C.uintptr_t(uintptr(unsafe.Pointer(r))), C.uintptr_t(uintptr(unsafe.Pointer(w))), C.uintptr_t(uintptr(unsafe.Pointer(e))), C.uintptr_t(uintptr(unsafe.Pointer(timeout))), C.uintptr_t(uintptr(unsafe.Pointer(sigmask))))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setregid(rgid int, egid int) (err error) {
+ r0, er := C.setregid(C.int(rgid), C.int(egid))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setreuid(ruid int, euid int) (err error) {
+ r0, er := C.setreuid(C.int(ruid), C.int(euid))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Shutdown(fd int, how int) (err error) {
+ r0, er := C.shutdown(C.int(fd), C.int(how))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
+ r0, er := C.splice(C.int(rfd), C.uintptr_t(uintptr(unsafe.Pointer(roff))), C.int(wfd), C.uintptr_t(uintptr(unsafe.Pointer(woff))), C.int(len), C.int(flags))
+ n = int64(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Stat(path string, stat *Stat_t) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.stat(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statfs(path string, buf *Statfs_t) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.statfs(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(buf))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Truncate(path string, length int64) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.truncate(C.uintptr_t(_p0), C.longlong(length))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ r0, er := C.bind(C.int(s), C.uintptr_t(uintptr(addr)), C.uintptr_t(uintptr(addrlen)))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ r0, er := C.connect(C.int(s), C.uintptr_t(uintptr(addr)), C.uintptr_t(uintptr(addrlen)))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getgroups(n int, list *_Gid_t) (nn int, err error) {
+ r0, er := C.getgroups(C.int(n), C.uintptr_t(uintptr(unsafe.Pointer(list))))
+ nn = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setgroups(n int, list *_Gid_t) (err error) {
+ r0, er := C.setgroups(C.int(n), C.uintptr_t(uintptr(unsafe.Pointer(list))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
+ r0, er := C.getsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(uintptr(val)), C.uintptr_t(uintptr(unsafe.Pointer(vallen))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
+ r0, er := C.setsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(uintptr(val)), C.uintptr_t(vallen))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socket(domain int, typ int, proto int) (fd int, err error) {
+ r0, er := C.socket(C.int(domain), C.int(typ), C.int(proto))
+ fd = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
+ r0, er := C.socketpair(C.int(domain), C.int(typ), C.int(proto), C.uintptr_t(uintptr(unsafe.Pointer(fd))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ r0, er := C.getpeername(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ r0, er := C.getsockname(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
+ var _p0 *byte
+ if len(p) > 0 {
+ _p0 = &p[0]
+ }
+ var _p1 int
+ _p1 = len(p)
+ r0, er := C.recvfrom(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags), C.uintptr_t(uintptr(unsafe.Pointer(from))), C.uintptr_t(uintptr(unsafe.Pointer(fromlen))))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ var _p1 int
+ _p1 = len(buf)
+ r0, er := C.sendto(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags), C.uintptr_t(uintptr(to)), C.uintptr_t(uintptr(addrlen)))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, er := C.recvmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, er := C.sendmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func munmap(addr uintptr, length uintptr) (err error) {
+ r0, er := C.munmap(C.uintptr_t(addr), C.uintptr_t(length))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Madvise(b []byte, advice int) (err error) {
+ var _p0 *byte
+ if len(b) > 0 {
+ _p0 = &b[0]
+ }
+ var _p1 int
+ _p1 = len(b)
+ r0, er := C.madvise(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(advice))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mprotect(b []byte, prot int) (err error) {
+ var _p0 *byte
+ if len(b) > 0 {
+ _p0 = &b[0]
+ }
+ var _p1 int
+ _p1 = len(b)
+ r0, er := C.mprotect(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(prot))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlock(b []byte) (err error) {
+ var _p0 *byte
+ if len(b) > 0 {
+ _p0 = &b[0]
+ }
+ var _p1 int
+ _p1 = len(b)
+ r0, er := C.mlock(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlockall(flags int) (err error) {
+ r0, er := C.mlockall(C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Msync(b []byte, flags int) (err error) {
+ var _p0 *byte
+ if len(b) > 0 {
+ _p0 = &b[0]
+ }
+ var _p1 int
+ _p1 = len(b)
+ r0, er := C.msync(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlock(b []byte) (err error) {
+ var _p0 *byte
+ if len(b) > 0 {
+ _p0 = &b[0]
+ }
+ var _p1 int
+ _p1 = len(b)
+ r0, er := C.munlock(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlockall() (err error) {
+ r0, er := C.munlockall()
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe(p *[2]_C_int) (err error) {
+ r0, er := C.pipe(C.uintptr_t(uintptr(unsafe.Pointer(p))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ r0, er := C.pipe2(C.uintptr_t(uintptr(unsafe.Pointer(p))), C.int(flags))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
+ r0, er := C.poll(C.uintptr_t(uintptr(unsafe.Pointer(fds))), C.int(nfds), C.int(timeout))
+ n = int(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func gettimeofday(tv *Timeval, tzp *Timezone) (err error) {
+ r0, er := C.gettimeofday(C.uintptr_t(uintptr(unsafe.Pointer(tv))), C.uintptr_t(uintptr(unsafe.Pointer(tzp))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Time(t *Time_t) (tt Time_t, err error) {
+ r0, er := C.time(C.uintptr_t(uintptr(unsafe.Pointer(t))))
+ tt = Time_t(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Utime(path string, buf *Utimbuf) (err error) {
+ _p0 := uintptr(unsafe.Pointer(C.CString(path)))
+ r0, er := C.utime(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(buf))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrlimit(resource int, rlim *Rlimit) (err error) {
+ r0, er := C.getrlimit(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrlimit(resource int, rlim *Rlimit) (err error) {
+ r0, er := C.setrlimit(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim))))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seek(fd int, offset int64, whence int) (off int64, err error) {
+ r0, er := C.lseek(C.int(fd), C.longlong(offset), C.int(whence))
+ off = int64(r0)
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
+ r0, er := C.mmap64(C.uintptr_t(addr), C.uintptr_t(length), C.int(prot), C.int(flags), C.int(fd), C.longlong(offset))
+ xaddr = uintptr(r0)
+ if uintptr(r0) == ^uintptr(0) && er != nil {
+ err = er
+ }
+ return
+}
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 8e8d427d6..35b155a02 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
@@ -417,6 +417,16 @@ func Chroot(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ClockGetres(clockid int32, res *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ClockGettime(clockid int32, time *Timespec) (err error) {
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
@@ -979,6 +989,22 @@ func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MemfdCreate(name string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
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 2f60780ca..11a30786c 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
@@ -417,6 +417,16 @@ func Chroot(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ClockGetres(clockid int32, res *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ClockGettime(clockid int32, time *Timespec) (err error) {
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
@@ -979,6 +989,22 @@ func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MemfdCreate(name string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
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 d29a11c94..914f25f06 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
@@ -417,6 +417,16 @@ func Chroot(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ClockGetres(clockid int32, res *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ClockGettime(clockid int32, time *Timespec) (err error) {
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
@@ -979,6 +989,22 @@ func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MemfdCreate(name string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
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 d03eb2968..1d6c55628 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
@@ -417,6 +417,16 @@ func Chroot(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ClockGetres(clockid int32, res *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ClockGettime(clockid int32, time *Timespec) (err error) {
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
@@ -979,6 +989,22 @@ func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MemfdCreate(name string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
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 dea09328b..260631d14 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
@@ -417,6 +417,16 @@ func Chroot(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ClockGetres(clockid int32, res *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ClockGettime(clockid int32, time *Timespec) (err error) {
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
@@ -979,6 +989,22 @@ func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MemfdCreate(name string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
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 31bbcff44..ff2d84fb9 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
@@ -417,6 +417,16 @@ func Chroot(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ClockGetres(clockid int32, res *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ClockGettime(clockid int32, time *Timespec) (err error) {
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
@@ -979,6 +989,22 @@ func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MemfdCreate(name string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
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 e025a33aa..48d14e607 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
@@ -417,6 +417,16 @@ func Chroot(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ClockGetres(clockid int32, res *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ClockGettime(clockid int32, time *Timespec) (err error) {
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
@@ -979,6 +989,22 @@ func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MemfdCreate(name string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
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 57d7d931d..12c17a92b 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
@@ -417,6 +417,16 @@ func Chroot(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ClockGetres(clockid int32, res *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ClockGettime(clockid int32, time *Timespec) (err error) {
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
@@ -979,6 +989,22 @@ func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MemfdCreate(name string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
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 2f7110d7c..8300814d2 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
@@ -417,6 +417,16 @@ func Chroot(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ClockGetres(clockid int32, res *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ClockGettime(clockid int32, time *Timespec) (err error) {
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
@@ -979,6 +989,22 @@ func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MemfdCreate(name string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1998,16 +2024,6 @@ func Statfs(path string, buf *Statfs_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Truncate(path string, length int64) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -2317,3 +2333,13 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
+ _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
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 bb3bd5956..002b4e175 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
@@ -417,6 +417,16 @@ func Chroot(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ClockGetres(clockid int32, res *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ClockGettime(clockid int32, time *Timespec) (err error) {
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
@@ -979,6 +989,22 @@ func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MemfdCreate(name string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1998,16 +2024,6 @@ func Statfs(path string, buf *Statfs_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Truncate(path string, length int64) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -2317,3 +2333,13 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
+ _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
new file mode 100644
index 000000000..542f3a3a3
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
@@ -0,0 +1,2140 @@
+// mksyscall.pl -tags linux,riscv64 syscall_linux.go syscall_linux_riscv64.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build linux,riscv64
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+var _ syscall.Errno
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fchmodat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// 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))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 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 Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(buf) > 0 {
+ _p1 = unsafe.Pointer(&buf[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 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 Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlinkat(dirfd int, path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getcwd(buf []byte) (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(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 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 wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
+ r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ wpid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
+ r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
+ ret = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret 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_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
+ ret = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(arg2)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
+ ret = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(arg3)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(arg4)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
+ ret = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(payload) > 0 {
+ _p0 = unsafe.Pointer(&payload[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret 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_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
+ ret = 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 reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(arg)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(source)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(target)
+ if err != nil {
+ return
+ }
+ var _p2 *byte
+ _p2, err = BytePtrFromString(fstype)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Acct(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(description)
+ if err != nil {
+ return
+ }
+ var _p2 unsafe.Pointer
+ if len(payload) > 0 {
+ _p2 = unsafe.Pointer(&payload[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
+ id = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Adjtimex(buf *Timex) (state int, err error) {
+ r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
+ state = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chroot(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ClockGetres(clockid int32, res *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ClockGettime(clockid int32, time *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Close(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup(oldfd int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup3(oldfd int, newfd int, flags int) (err error) {
+ _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func EpollCreate1(flag int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
+ _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Eventfd(initval uint, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Exit(code int) {
+ SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
+ _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchdir(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmod(fd int, mode uint32) (err error) {
+ _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fcntl(fd int, cmd int, arg int) (val int, err error) {
+ r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
+ val = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fdatasync(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(dest) > 0 {
+ _p1 = unsafe.Pointer(&dest[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
+ sz = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Flistxattr(fd int, dest []byte) (sz int, err error) {
+ var _p0 unsafe.Pointer
+ if len(dest) > 0 {
+ _p0 = unsafe.Pointer(&dest[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
+ sz = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Flock(fd int, how int) (err error) {
+ _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fremovexattr(fd int, attr string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(dest) > 0 {
+ _p1 = unsafe.Pointer(&dest[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsync(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getdents(fd int, buf []byte) (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(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgid(pid int) (pgid int, err error) {
+ r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+ pgid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpid() (pid int) {
+ r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
+ pid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getppid() (ppid int) {
+ r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
+ ppid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpriority(which int, who int) (prio int, err error) {
+ r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+ prio = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrandom(buf []byte, flags int) (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(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrusage(who int, rusage *Rusage) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getsid(pid int) (sid int, err error) {
+ r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
+ sid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Gettid() (tid int) {
+ r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
+ tid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p2 unsafe.Pointer
+ if len(dest) > 0 {
+ _p2 = unsafe.Pointer(&dest[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
+ sz = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(pathname)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
+ watchdesc = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func InotifyInit1(flags int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
+ r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
+ success = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kill(pid int, sig syscall.Signal) (err error) {
+ _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Klogctl(typ int, buf []byte) (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(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p2 unsafe.Pointer
+ if len(dest) > 0 {
+ _p2 = unsafe.Pointer(&dest[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
+ sz = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listxattr(path string, dest []byte) (sz int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(dest) > 0 {
+ _p1 = unsafe.Pointer(&dest[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
+ sz = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Llistxattr(path string, dest []byte) (sz int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(dest) > 0 {
+ _p1 = unsafe.Pointer(&dest[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
+ sz = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lremovexattr(path string, attr string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p2 unsafe.Pointer
+ if len(data) > 0 {
+ _p2 = unsafe.Pointer(&data[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func MemfdCreate(name string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdirat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func PivotRoot(newroot string, putold string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(newroot)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(putold)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
+ _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
+ _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func read(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Removexattr(path string, attr string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), 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 Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(description)
+ if err != nil {
+ return
+ }
+ var _p2 *byte
+ _p2, err = BytePtrFromString(callback)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
+ id = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setdomainname(p []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sethostname(p []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpgid(pid int, pgid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setsid() (pid int, err error) {
+ r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
+ pid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Settimeofday(tv *Timeval) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setns(fd int, nstype int) (err error) {
+ _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpriority(which int, who int, prio int) (err error) {
+ _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setxattr(path string, attr string, data []byte, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p2 unsafe.Pointer
+ if len(data) > 0 {
+ _p2 = unsafe.Pointer(&data[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sync() {
+ SyscallNoError(SYS_SYNC, 0, 0, 0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Syncfs(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sysinfo(info *Sysinfo_t) (err error) {
+ _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
+ r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
+ n = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
+ _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Times(tms *Tms) (ticks uintptr, err error) {
+ r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
+ ticks = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Umask(mask int) (oldmask int) {
+ r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
+ oldmask = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Uname(buf *Utsname) (err error) {
+ _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unmount(target string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(target)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unshare(flags int) (err error) {
+ _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func write(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func exitThread(code int) (err error) {
+ _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readlen(fd int, p *byte, np int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writelen(fd int, p *byte, np int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func munmap(addr uintptr, length uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Madvise(b []byte, advice int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mprotect(b []byte, prot int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlockall(flags int) (err error) {
+ _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Msync(b []byte, flags int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlockall() (err error) {
+ _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func faccessat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(events) > 0 {
+ _p0 = unsafe.Pointer(&events[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 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 Fadvise(fd int, offset int64, length int64, advice int) (err error) {
+ _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchown(fd int, uid int, gid int) (err error) {
+ _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+ _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatfs(fd int, buf *Statfs_t) (err error) {
+ _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getegid() (egid int) {
+ r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
+ egid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Geteuid() (euid int) {
+ r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
+ euid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getgid() (gid int) {
+ r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
+ gid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrlimit(resource int, rlim *Rlimit) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getuid() (uid int) {
+ r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listen(s int, n int) (err error) {
+ _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 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 Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 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 Seek(fd int, offset int64, whence int) (off int64, err error) {
+ r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
+ off = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
+ r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
+ written = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setfsgid(gid int) (err error) {
+ _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setfsuid(uid int) (err error) {
+ _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setregid(rgid int, egid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresgid(rgid int, egid int, sgid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresuid(ruid int, euid int, suid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrlimit(resource int, rlim *Rlimit) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setreuid(ruid int, euid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Shutdown(fd int, how int) (err error) {
+ _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
+ r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
+ n = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statfs(path string, buf *Statfs_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
+ _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Truncate(path string, length int64) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getgroups(n int, list *_Gid_t) (nn int, err error) {
+ r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
+ nn = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setgroups(n int, list *_Gid_t) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
+ _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
+ _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socket(domain int, typ int, proto int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
+ _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
+ r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
+ xaddr = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Gettimeofday(tv *Timeval) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ 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 {
+ err = errnoErr(e1)
+ }
+ return
+}
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 c637da95f..1a9ba9992 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
@@ -417,6 +417,16 @@ func Chroot(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ClockGetres(clockid int32, res *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ClockGettime(clockid int32, time *Timespec) (err error) {
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
@@ -979,6 +989,22 @@ func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MemfdCreate(name string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
new file mode 100644
index 000000000..41e4fd1d3
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
@@ -0,0 +1,286 @@
+// linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build riscv64,linux
+
+package unix
+
+const (
+ SYS_IO_SETUP = 0
+ SYS_IO_DESTROY = 1
+ SYS_IO_SUBMIT = 2
+ SYS_IO_CANCEL = 3
+ SYS_IO_GETEVENTS = 4
+ SYS_SETXATTR = 5
+ SYS_LSETXATTR = 6
+ SYS_FSETXATTR = 7
+ SYS_GETXATTR = 8
+ SYS_LGETXATTR = 9
+ SYS_FGETXATTR = 10
+ SYS_LISTXATTR = 11
+ SYS_LLISTXATTR = 12
+ SYS_FLISTXATTR = 13
+ SYS_REMOVEXATTR = 14
+ SYS_LREMOVEXATTR = 15
+ SYS_FREMOVEXATTR = 16
+ SYS_GETCWD = 17
+ SYS_LOOKUP_DCOOKIE = 18
+ SYS_EVENTFD2 = 19
+ SYS_EPOLL_CREATE1 = 20
+ SYS_EPOLL_CTL = 21
+ SYS_EPOLL_PWAIT = 22
+ SYS_DUP = 23
+ SYS_DUP3 = 24
+ SYS_FCNTL = 25
+ SYS_INOTIFY_INIT1 = 26
+ SYS_INOTIFY_ADD_WATCH = 27
+ SYS_INOTIFY_RM_WATCH = 28
+ SYS_IOCTL = 29
+ SYS_IOPRIO_SET = 30
+ SYS_IOPRIO_GET = 31
+ SYS_FLOCK = 32
+ SYS_MKNODAT = 33
+ SYS_MKDIRAT = 34
+ SYS_UNLINKAT = 35
+ SYS_SYMLINKAT = 36
+ SYS_LINKAT = 37
+ SYS_UMOUNT2 = 39
+ SYS_MOUNT = 40
+ SYS_PIVOT_ROOT = 41
+ SYS_NFSSERVCTL = 42
+ SYS_STATFS = 43
+ SYS_FSTATFS = 44
+ SYS_TRUNCATE = 45
+ SYS_FTRUNCATE = 46
+ SYS_FALLOCATE = 47
+ SYS_FACCESSAT = 48
+ SYS_CHDIR = 49
+ SYS_FCHDIR = 50
+ SYS_CHROOT = 51
+ SYS_FCHMOD = 52
+ SYS_FCHMODAT = 53
+ SYS_FCHOWNAT = 54
+ SYS_FCHOWN = 55
+ SYS_OPENAT = 56
+ SYS_CLOSE = 57
+ SYS_VHANGUP = 58
+ SYS_PIPE2 = 59
+ SYS_QUOTACTL = 60
+ SYS_GETDENTS64 = 61
+ SYS_LSEEK = 62
+ SYS_READ = 63
+ SYS_WRITE = 64
+ SYS_READV = 65
+ SYS_WRITEV = 66
+ SYS_PREAD64 = 67
+ SYS_PWRITE64 = 68
+ SYS_PREADV = 69
+ SYS_PWRITEV = 70
+ SYS_SENDFILE = 71
+ SYS_PSELECT6 = 72
+ SYS_PPOLL = 73
+ SYS_SIGNALFD4 = 74
+ SYS_VMSPLICE = 75
+ SYS_SPLICE = 76
+ SYS_TEE = 77
+ SYS_READLINKAT = 78
+ SYS_FSTATAT = 79
+ SYS_FSTAT = 80
+ SYS_SYNC = 81
+ SYS_FSYNC = 82
+ SYS_FDATASYNC = 83
+ SYS_SYNC_FILE_RANGE = 84
+ SYS_TIMERFD_CREATE = 85
+ SYS_TIMERFD_SETTIME = 86
+ SYS_TIMERFD_GETTIME = 87
+ SYS_UTIMENSAT = 88
+ SYS_ACCT = 89
+ SYS_CAPGET = 90
+ SYS_CAPSET = 91
+ SYS_PERSONALITY = 92
+ SYS_EXIT = 93
+ SYS_EXIT_GROUP = 94
+ SYS_WAITID = 95
+ SYS_SET_TID_ADDRESS = 96
+ SYS_UNSHARE = 97
+ SYS_FUTEX = 98
+ SYS_SET_ROBUST_LIST = 99
+ SYS_GET_ROBUST_LIST = 100
+ SYS_NANOSLEEP = 101
+ SYS_GETITIMER = 102
+ SYS_SETITIMER = 103
+ SYS_KEXEC_LOAD = 104
+ SYS_INIT_MODULE = 105
+ SYS_DELETE_MODULE = 106
+ SYS_TIMER_CREATE = 107
+ SYS_TIMER_GETTIME = 108
+ SYS_TIMER_GETOVERRUN = 109
+ SYS_TIMER_SETTIME = 110
+ SYS_TIMER_DELETE = 111
+ SYS_CLOCK_SETTIME = 112
+ SYS_CLOCK_GETTIME = 113
+ SYS_CLOCK_GETRES = 114
+ SYS_CLOCK_NANOSLEEP = 115
+ SYS_SYSLOG = 116
+ SYS_PTRACE = 117
+ SYS_SCHED_SETPARAM = 118
+ SYS_SCHED_SETSCHEDULER = 119
+ SYS_SCHED_GETSCHEDULER = 120
+ SYS_SCHED_GETPARAM = 121
+ SYS_SCHED_SETAFFINITY = 122
+ SYS_SCHED_GETAFFINITY = 123
+ SYS_SCHED_YIELD = 124
+ SYS_SCHED_GET_PRIORITY_MAX = 125
+ SYS_SCHED_GET_PRIORITY_MIN = 126
+ SYS_SCHED_RR_GET_INTERVAL = 127
+ SYS_RESTART_SYSCALL = 128
+ SYS_KILL = 129
+ SYS_TKILL = 130
+ SYS_TGKILL = 131
+ SYS_SIGALTSTACK = 132
+ SYS_RT_SIGSUSPEND = 133
+ SYS_RT_SIGACTION = 134
+ SYS_RT_SIGPROCMASK = 135
+ SYS_RT_SIGPENDING = 136
+ SYS_RT_SIGTIMEDWAIT = 137
+ SYS_RT_SIGQUEUEINFO = 138
+ SYS_RT_SIGRETURN = 139
+ SYS_SETPRIORITY = 140
+ SYS_GETPRIORITY = 141
+ SYS_REBOOT = 142
+ SYS_SETREGID = 143
+ SYS_SETGID = 144
+ SYS_SETREUID = 145
+ SYS_SETUID = 146
+ SYS_SETRESUID = 147
+ SYS_GETRESUID = 148
+ SYS_SETRESGID = 149
+ SYS_GETRESGID = 150
+ SYS_SETFSUID = 151
+ SYS_SETFSGID = 152
+ SYS_TIMES = 153
+ SYS_SETPGID = 154
+ SYS_GETPGID = 155
+ SYS_GETSID = 156
+ SYS_SETSID = 157
+ SYS_GETGROUPS = 158
+ SYS_SETGROUPS = 159
+ SYS_UNAME = 160
+ SYS_SETHOSTNAME = 161
+ SYS_SETDOMAINNAME = 162
+ SYS_GETRLIMIT = 163
+ SYS_SETRLIMIT = 164
+ SYS_GETRUSAGE = 165
+ SYS_UMASK = 166
+ SYS_PRCTL = 167
+ SYS_GETCPU = 168
+ SYS_GETTIMEOFDAY = 169
+ SYS_SETTIMEOFDAY = 170
+ SYS_ADJTIMEX = 171
+ SYS_GETPID = 172
+ SYS_GETPPID = 173
+ SYS_GETUID = 174
+ SYS_GETEUID = 175
+ SYS_GETGID = 176
+ SYS_GETEGID = 177
+ SYS_GETTID = 178
+ SYS_SYSINFO = 179
+ SYS_MQ_OPEN = 180
+ SYS_MQ_UNLINK = 181
+ SYS_MQ_TIMEDSEND = 182
+ SYS_MQ_TIMEDRECEIVE = 183
+ SYS_MQ_NOTIFY = 184
+ SYS_MQ_GETSETATTR = 185
+ SYS_MSGGET = 186
+ SYS_MSGCTL = 187
+ SYS_MSGRCV = 188
+ SYS_MSGSND = 189
+ SYS_SEMGET = 190
+ SYS_SEMCTL = 191
+ SYS_SEMTIMEDOP = 192
+ SYS_SEMOP = 193
+ SYS_SHMGET = 194
+ SYS_SHMCTL = 195
+ SYS_SHMAT = 196
+ SYS_SHMDT = 197
+ SYS_SOCKET = 198
+ SYS_SOCKETPAIR = 199
+ SYS_BIND = 200
+ SYS_LISTEN = 201
+ SYS_ACCEPT = 202
+ SYS_CONNECT = 203
+ SYS_GETSOCKNAME = 204
+ SYS_GETPEERNAME = 205
+ SYS_SENDTO = 206
+ SYS_RECVFROM = 207
+ SYS_SETSOCKOPT = 208
+ SYS_GETSOCKOPT = 209
+ SYS_SHUTDOWN = 210
+ SYS_SENDMSG = 211
+ SYS_RECVMSG = 212
+ SYS_READAHEAD = 213
+ SYS_BRK = 214
+ SYS_MUNMAP = 215
+ SYS_MREMAP = 216
+ SYS_ADD_KEY = 217
+ SYS_REQUEST_KEY = 218
+ SYS_KEYCTL = 219
+ SYS_CLONE = 220
+ SYS_EXECVE = 221
+ SYS_MMAP = 222
+ SYS_FADVISE64 = 223
+ SYS_SWAPON = 224
+ SYS_SWAPOFF = 225
+ SYS_MPROTECT = 226
+ SYS_MSYNC = 227
+ SYS_MLOCK = 228
+ SYS_MUNLOCK = 229
+ SYS_MLOCKALL = 230
+ SYS_MUNLOCKALL = 231
+ SYS_MINCORE = 232
+ SYS_MADVISE = 233
+ SYS_REMAP_FILE_PAGES = 234
+ SYS_MBIND = 235
+ SYS_GET_MEMPOLICY = 236
+ SYS_SET_MEMPOLICY = 237
+ SYS_MIGRATE_PAGES = 238
+ SYS_MOVE_PAGES = 239
+ SYS_RT_TGSIGQUEUEINFO = 240
+ SYS_PERF_EVENT_OPEN = 241
+ SYS_ACCEPT4 = 242
+ SYS_RECVMMSG = 243
+ SYS_ARCH_SPECIFIC_SYSCALL = 244
+ SYS_WAIT4 = 260
+ SYS_PRLIMIT64 = 261
+ SYS_FANOTIFY_INIT = 262
+ SYS_FANOTIFY_MARK = 263
+ SYS_NAME_TO_HANDLE_AT = 264
+ SYS_OPEN_BY_HANDLE_AT = 265
+ SYS_CLOCK_ADJTIME = 266
+ SYS_SYNCFS = 267
+ SYS_SETNS = 268
+ SYS_SENDMMSG = 269
+ SYS_PROCESS_VM_READV = 270
+ SYS_PROCESS_VM_WRITEV = 271
+ SYS_KCMP = 272
+ SYS_FINIT_MODULE = 273
+ SYS_SCHED_SETATTR = 274
+ SYS_SCHED_GETATTR = 275
+ SYS_RENAMEAT2 = 276
+ SYS_SECCOMP = 277
+ SYS_GETRANDOM = 278
+ SYS_MEMFD_CREATE = 279
+ SYS_BPF = 280
+ SYS_EXECVEAT = 281
+ SYS_USERFAULTFD = 282
+ SYS_MEMBARRIER = 283
+ SYS_MLOCK2 = 284
+ SYS_COPY_FILE_RANGE = 285
+ SYS_PREADV2 = 286
+ SYS_PWRITEV2 = 287
+ SYS_PKEY_MPROTECT = 288
+ SYS_PKEY_ALLOC = 289
+ SYS_PKEY_FREE = 290
+ SYS_STATX = 291
+ SYS_IO_PGETEVENTS = 292
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go
new file mode 100644
index 000000000..f1cfe7db1
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go
@@ -0,0 +1,345 @@
+// cgo -godefs types_aix.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build ppc,aix
+
+package unix
+
+const (
+ sizeofPtr = 0x4
+ sizeofShort = 0x2
+ sizeofInt = 0x4
+ sizeofLong = 0x4
+ sizeofLongLong = 0x8
+ PathMax = 0x3ff
+)
+
+type (
+ _C_short int16
+ _C_int int32
+ _C_long int32
+ _C_long_long int64
+)
+
+type off64 int64
+type off int32
+type Mode_t uint32
+
+type Timespec struct {
+ Sec int32
+ Nsec int32
+}
+
+type StTimespec struct {
+ Sec int32
+ Nsec int32
+}
+
+type Timeval struct {
+ Sec int32
+ Usec int32
+}
+
+type Timeval32 struct {
+ Sec int32
+ Usec int32
+}
+
+type Timex struct{}
+
+type Time_t int32
+
+type Tms struct{}
+
+type Utimbuf struct {
+ Actime int32
+ Modtime int32
+}
+
+type Timezone struct {
+ Minuteswest int32
+ Dsttime int32
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int32
+ Ixrss int32
+ Idrss int32
+ Isrss int32
+ Minflt int32
+ Majflt int32
+ Nswap int32
+ Inblock int32
+ Oublock int32
+ Msgsnd int32
+ Msgrcv int32
+ Nsignals int32
+ Nvcsw int32
+ Nivcsw int32
+}
+
+type Rlimit struct {
+ Cur uint64
+ Max uint64
+}
+
+type Pid_t int32
+
+type _Gid_t uint32
+
+type dev_t uint32
+
+type Stat_t struct {
+ Dev uint32
+ Ino uint32
+ Mode uint32
+ Nlink int16
+ Flag uint16
+ Uid uint32
+ Gid uint32
+ Rdev uint32
+ Size int32
+ Atim StTimespec
+ Mtim StTimespec
+ Ctim StTimespec
+ Blksize int32
+ Blocks int32
+ Vfstype int32
+ Vfs uint32
+ Type uint32
+ Gen uint32
+ Reserved [9]uint32
+}
+
+type StatxTimestamp struct{}
+
+type Statx_t struct{}
+
+type Dirent struct {
+ Offset uint32
+ Ino uint32
+ Reclen uint16
+ Namlen uint16
+ Name [256]uint8
+}
+
+type RawSockaddrInet4 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]uint8
+}
+
+type RawSockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+ Len uint8
+ Family uint8
+ Path [1023]uint8
+}
+
+type RawSockaddr struct {
+ Len uint8
+ Family uint8
+ Data [14]uint8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ Pad [1012]uint8
+}
+
+type _Socklen uint32
+
+type Cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type ICMPv6Filter struct {
+ Filt [8]uint32
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type IPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type IPv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type Linger struct {
+ Onoff int32
+ Linger int32
+}
+
+type Msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *Iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+const (
+ SizeofSockaddrInet4 = 0x10
+ SizeofSockaddrInet6 = 0x1c
+ SizeofSockaddrAny = 0x404
+ SizeofSockaddrUnix = 0x401
+ SizeofLinger = 0x8
+ SizeofIPMreq = 0x8
+ SizeofIPv6Mreq = 0x14
+ SizeofIPv6MTUInfo = 0x20
+ SizeofMsghdr = 0x1c
+ SizeofCmsghdr = 0xc
+ SizeofICMPv6Filter = 0x20
+)
+
+const (
+ SizeofIfMsghdr = 0x10
+)
+
+type IfMsgHdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Addrs int32
+ Flags int32
+ Index uint16
+ Addrlen uint8
+ _ [1]byte
+}
+
+type FdSet struct {
+ Bits [2048]int32
+}
+
+type Utsname struct {
+ Sysname [32]byte
+ Nodename [32]byte
+ Release [32]byte
+ Version [32]byte
+ Machine [32]byte
+}
+
+type Ustat_t struct{}
+
+type Sigset_t struct {
+ Losigs uint32
+ Hisigs uint32
+}
+
+const (
+ AT_FDCWD = -0x2
+ AT_REMOVEDIR = 0x1
+ AT_SYMLINK_NOFOLLOW = 0x1
+)
+
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [16]uint8
+}
+
+type Termio struct {
+ Iflag uint16
+ Oflag uint16
+ Cflag uint16
+ Lflag uint16
+ Line uint8
+ Cc [8]uint8
+ _ [1]byte
+}
+
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
+type PollFd struct {
+ Fd int32
+ Events uint16
+ Revents uint16
+}
+
+const (
+ POLLERR = 0x4000
+ POLLHUP = 0x2000
+ POLLIN = 0x1
+ POLLNVAL = 0x8000
+ POLLOUT = 0x2
+ POLLPRI = 0x4
+ POLLRDBAND = 0x20
+ POLLRDNORM = 0x10
+ POLLWRBAND = 0x40
+ POLLWRNORM = 0x2
+)
+
+type Flock_t struct {
+ Type int16
+ Whence int16
+ Sysid uint32
+ Pid int32
+ Vfs int32
+ Start int64
+ Len int64
+}
+
+type Fsid_t struct {
+ Val [2]uint32
+}
+type Fsid64_t struct {
+ Val [2]uint64
+}
+
+type Statfs_t struct {
+ Version int32
+ Type int32
+ Bsize uint32
+ Blocks uint32
+ Bfree uint32
+ Bavail uint32
+ Files uint32
+ Ffree uint32
+ Fsid Fsid_t
+ Vfstype int32
+ Fsize uint32
+ Vfsnumber int32
+ Vfsoff int32
+ Vfslen int32
+ Vfsvers int32
+ Fname [32]uint8
+ Fpack [32]uint8
+ Name_max int32
+}
+
+const RNDGETENTCNT = 0x80045200
diff --git a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go
new file mode 100644
index 000000000..95581a3bc
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go
@@ -0,0 +1,354 @@
+// cgo -godefs types_aix.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build ppc64,aix
+
+package unix
+
+const (
+ sizeofPtr = 0x8
+ sizeofShort = 0x2
+ sizeofInt = 0x4
+ sizeofLong = 0x8
+ sizeofLongLong = 0x8
+ PathMax = 0x3ff
+)
+
+type (
+ _C_short int16
+ _C_int int32
+ _C_long int64
+ _C_long_long int64
+)
+
+type off64 int64
+type off int64
+type Mode_t uint32
+
+type Timespec struct {
+ Sec int64
+ Nsec int64
+}
+
+type StTimespec struct {
+ Sec int64
+ Nsec int32
+ _ [4]byte
+}
+
+type Timeval struct {
+ Sec int64
+ Usec int32
+ _ [4]byte
+}
+
+type Timeval32 struct {
+ Sec int32
+ Usec int32
+}
+
+type Timex struct{}
+
+type Time_t int64
+
+type Tms struct{}
+
+type Utimbuf struct {
+ Actime int64
+ Modtime int64
+}
+
+type Timezone struct {
+ Minuteswest int32
+ Dsttime int32
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int64
+ Ixrss int64
+ Idrss int64
+ Isrss int64
+ Minflt int64
+ Majflt int64
+ Nswap int64
+ Inblock int64
+ Oublock int64
+ Msgsnd int64
+ Msgrcv int64
+ Nsignals int64
+ Nvcsw int64
+ Nivcsw int64
+}
+
+type Rlimit struct {
+ Cur uint64
+ Max uint64
+}
+
+type Pid_t int32
+
+type _Gid_t uint32
+
+type dev_t uint64
+
+type Stat_t struct {
+ Dev uint64
+ Ino uint64
+ Mode uint32
+ Nlink int16
+ Flag uint16
+ Uid uint32
+ Gid uint32
+ Rdev uint64
+ Ssize int32
+ _ [4]byte
+ Atim StTimespec
+ Mtim StTimespec
+ Ctim StTimespec
+ Blksize int64
+ Blocks int64
+ Vfstype int32
+ Vfs uint32
+ Type uint32
+ Gen uint32
+ Reserved [9]uint32
+ Padto_ll uint32
+ Size int64
+}
+
+type StatxTimestamp struct{}
+
+type Statx_t struct{}
+
+type Dirent struct {
+ Offset uint64
+ Ino uint64
+ Reclen uint16
+ Namlen uint16
+ Name [256]uint8
+ _ [4]byte
+}
+
+type RawSockaddrInet4 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]uint8
+}
+
+type RawSockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+ Len uint8
+ Family uint8
+ Path [1023]uint8
+}
+
+type RawSockaddr struct {
+ Len uint8
+ Family uint8
+ Data [14]uint8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ Pad [1012]uint8
+}
+
+type _Socklen uint32
+
+type Cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type ICMPv6Filter struct {
+ Filt [8]uint32
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type IPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type IPv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type Linger struct {
+ Onoff int32
+ Linger int32
+}
+
+type Msghdr struct {
+ Name *byte
+ Namelen uint32
+ _ [4]byte
+ Iov *Iovec
+ Iovlen int32
+ _ [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+const (
+ SizeofSockaddrInet4 = 0x10
+ SizeofSockaddrInet6 = 0x1c
+ SizeofSockaddrAny = 0x404
+ SizeofSockaddrUnix = 0x401
+ SizeofLinger = 0x8
+ SizeofIPMreq = 0x8
+ SizeofIPv6Mreq = 0x14
+ SizeofIPv6MTUInfo = 0x20
+ SizeofMsghdr = 0x30
+ SizeofCmsghdr = 0xc
+ SizeofICMPv6Filter = 0x20
+)
+
+const (
+ SizeofIfMsghdr = 0x10
+)
+
+type IfMsgHdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Addrs int32
+ Flags int32
+ Index uint16
+ Addrlen uint8
+ _ [1]byte
+}
+
+type FdSet struct {
+ Bits [1024]int64
+}
+
+type Utsname struct {
+ Sysname [32]byte
+ Nodename [32]byte
+ Release [32]byte
+ Version [32]byte
+ Machine [32]byte
+}
+
+type Ustat_t struct{}
+
+type Sigset_t struct {
+ Set [4]uint64
+}
+
+const (
+ AT_FDCWD = -0x2
+ AT_REMOVEDIR = 0x1
+ AT_SYMLINK_NOFOLLOW = 0x1
+)
+
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [16]uint8
+}
+
+type Termio struct {
+ Iflag uint16
+ Oflag uint16
+ Cflag uint16
+ Lflag uint16
+ Line uint8
+ Cc [8]uint8
+ _ [1]byte
+}
+
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
+type PollFd struct {
+ Fd int32
+ Events uint16
+ Revents uint16
+}
+
+const (
+ POLLERR = 0x4000
+ POLLHUP = 0x2000
+ POLLIN = 0x1
+ POLLNVAL = 0x8000
+ POLLOUT = 0x2
+ POLLPRI = 0x4
+ POLLRDBAND = 0x20
+ POLLRDNORM = 0x10
+ POLLWRBAND = 0x40
+ POLLWRNORM = 0x2
+)
+
+type Flock_t struct {
+ Type int16
+ Whence int16
+ Sysid uint32
+ Pid int32
+ Vfs int32
+ Start int64
+ Len int64
+}
+
+type Fsid_t struct {
+ Val [2]uint32
+}
+type Fsid64_t struct {
+ Val [2]uint64
+}
+
+type Statfs_t struct {
+ Version int32
+ Type int32
+ Bsize uint64
+ Blocks uint64
+ Bfree uint64
+ Bavail uint64
+ Files uint64
+ Ffree uint64
+ Fsid Fsid64_t
+ Vfstype int32
+ _ [4]byte
+ Fsize uint64
+ Vfsnumber int32
+ Vfsoff int32
+ Vfslen int32
+ Vfsvers int32
+ Fname [32]uint8
+ Fpack [32]uint8
+ Name_max int32
+ _ [4]byte
+}
+
+const RNDGETENTCNT = 0x80045200
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 cb3729eab..0f3106fa3 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -278,6 +278,14 @@ type RawSockaddrVM struct {
Zero [4]uint8
}
+type RawSockaddrXDP struct {
+ Family uint16
+ Flags uint16
+ Ifindex uint32
+ Queue_id uint32
+ Shared_umem_fd uint32
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -412,6 +420,7 @@ const (
SizeofSockaddrCAN = 0x10
SizeofSockaddrALG = 0x58
SizeofSockaddrVM = 0x10
+ SizeofSockaddrXDP = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x8
SizeofIPMreq = 0x8
@@ -510,6 +519,20 @@ const (
RTA_FLOW = 0xb
RTA_CACHEINFO = 0xc
RTA_TABLE = 0xf
+ RTA_MARK = 0x10
+ RTA_MFC_STATS = 0x11
+ RTA_VIA = 0x12
+ RTA_NEWDST = 0x13
+ RTA_PREF = 0x14
+ RTA_ENCAP_TYPE = 0x15
+ RTA_ENCAP = 0x16
+ RTA_EXPIRES = 0x17
+ RTA_PAD = 0x18
+ RTA_UID = 0x19
+ RTA_TTL_PROPAGATE = 0x1a
+ RTA_IP_PROTO = 0x1b
+ RTA_SPORT = 0x1c
+ RTA_DPORT = 0x1d
RTN_UNSPEC = 0x0
RTN_UNICAST = 0x1
RTN_LOCAL = 0x2
@@ -1882,3 +1905,63 @@ const (
NETNSA_PID = 0x2
NETNSA_FD = 0x3
)
+
+type XDPRingOffset struct {
+ Producer uint64
+ Consumer uint64
+ Desc uint64
+}
+
+type XDPMmapOffsets struct {
+ Rx XDPRingOffset
+ Tx XDPRingOffset
+ Fr XDPRingOffset
+ Cr XDPRingOffset
+}
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+}
+
+type XDPStatistics struct {
+ Rx_dropped uint64
+ Rx_invalid_descs uint64
+ Tx_invalid_descs uint64
+}
+
+type XDPDesc struct {
+ Addr uint64
+ Len uint32
+ Options uint32
+}
+
+const (
+ NCSI_CMD_UNSPEC = 0x0
+ NCSI_CMD_PKG_INFO = 0x1
+ NCSI_CMD_SET_INTERFACE = 0x2
+ NCSI_CMD_CLEAR_INTERFACE = 0x3
+ NCSI_ATTR_UNSPEC = 0x0
+ NCSI_ATTR_IFINDEX = 0x1
+ NCSI_ATTR_PACKAGE_LIST = 0x2
+ NCSI_ATTR_PACKAGE_ID = 0x3
+ NCSI_ATTR_CHANNEL_ID = 0x4
+ NCSI_PKG_ATTR_UNSPEC = 0x0
+ NCSI_PKG_ATTR = 0x1
+ NCSI_PKG_ATTR_ID = 0x2
+ NCSI_PKG_ATTR_FORCED = 0x3
+ NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
+ NCSI_CHANNEL_ATTR_UNSPEC = 0x0
+ NCSI_CHANNEL_ATTR = 0x1
+ NCSI_CHANNEL_ATTR_ID = 0x2
+ NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
+ NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
+ NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
+ NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
+ NCSI_CHANNEL_ATTR_ACTIVE = 0x7
+ NCSI_CHANNEL_ATTR_FORCED = 0x8
+ NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
+ NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
+)
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 0f3c0fb54..24d6c6fd4 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -280,6 +280,14 @@ type RawSockaddrVM struct {
Zero [4]uint8
}
+type RawSockaddrXDP struct {
+ Family uint16
+ Flags uint16
+ Ifindex uint32
+ Queue_id uint32
+ Shared_umem_fd uint32
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -416,6 +424,7 @@ const (
SizeofSockaddrCAN = 0x10
SizeofSockaddrALG = 0x58
SizeofSockaddrVM = 0x10
+ SizeofSockaddrXDP = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -514,6 +523,20 @@ const (
RTA_FLOW = 0xb
RTA_CACHEINFO = 0xc
RTA_TABLE = 0xf
+ RTA_MARK = 0x10
+ RTA_MFC_STATS = 0x11
+ RTA_VIA = 0x12
+ RTA_NEWDST = 0x13
+ RTA_PREF = 0x14
+ RTA_ENCAP_TYPE = 0x15
+ RTA_ENCAP = 0x16
+ RTA_EXPIRES = 0x17
+ RTA_PAD = 0x18
+ RTA_UID = 0x19
+ RTA_TTL_PROPAGATE = 0x1a
+ RTA_IP_PROTO = 0x1b
+ RTA_SPORT = 0x1c
+ RTA_DPORT = 0x1d
RTN_UNSPEC = 0x0
RTN_UNICAST = 0x1
RTN_LOCAL = 0x2
@@ -1904,3 +1927,63 @@ const (
NETNSA_PID = 0x2
NETNSA_FD = 0x3
)
+
+type XDPRingOffset struct {
+ Producer uint64
+ Consumer uint64
+ Desc uint64
+}
+
+type XDPMmapOffsets struct {
+ Rx XDPRingOffset
+ Tx XDPRingOffset
+ Fr XDPRingOffset
+ Cr XDPRingOffset
+}
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+}
+
+type XDPStatistics struct {
+ Rx_dropped uint64
+ Rx_invalid_descs uint64
+ Tx_invalid_descs uint64
+}
+
+type XDPDesc struct {
+ Addr uint64
+ Len uint32
+ Options uint32
+}
+
+const (
+ NCSI_CMD_UNSPEC = 0x0
+ NCSI_CMD_PKG_INFO = 0x1
+ NCSI_CMD_SET_INTERFACE = 0x2
+ NCSI_CMD_CLEAR_INTERFACE = 0x3
+ NCSI_ATTR_UNSPEC = 0x0
+ NCSI_ATTR_IFINDEX = 0x1
+ NCSI_ATTR_PACKAGE_LIST = 0x2
+ NCSI_ATTR_PACKAGE_ID = 0x3
+ NCSI_ATTR_CHANNEL_ID = 0x4
+ NCSI_PKG_ATTR_UNSPEC = 0x0
+ NCSI_PKG_ATTR = 0x1
+ NCSI_PKG_ATTR_ID = 0x2
+ NCSI_PKG_ATTR_FORCED = 0x3
+ NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
+ NCSI_CHANNEL_ATTR_UNSPEC = 0x0
+ NCSI_CHANNEL_ATTR = 0x1
+ NCSI_CHANNEL_ATTR_ID = 0x2
+ NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
+ NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
+ NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
+ NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
+ NCSI_CHANNEL_ATTR_ACTIVE = 0x7
+ NCSI_CHANNEL_ATTR_FORCED = 0x8
+ NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
+ NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
+)
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 bd534da87..77c7a3e19 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -281,6 +281,14 @@ type RawSockaddrVM struct {
Zero [4]uint8
}
+type RawSockaddrXDP struct {
+ Family uint16
+ Flags uint16
+ Ifindex uint32
+ Queue_id uint32
+ Shared_umem_fd uint32
+}
+
type RawSockaddr struct {
Family uint16
Data [14]uint8
@@ -415,6 +423,7 @@ const (
SizeofSockaddrCAN = 0x10
SizeofSockaddrALG = 0x58
SizeofSockaddrVM = 0x10
+ SizeofSockaddrXDP = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x8
SizeofIPMreq = 0x8
@@ -513,6 +522,20 @@ const (
RTA_FLOW = 0xb
RTA_CACHEINFO = 0xc
RTA_TABLE = 0xf
+ RTA_MARK = 0x10
+ RTA_MFC_STATS = 0x11
+ RTA_VIA = 0x12
+ RTA_NEWDST = 0x13
+ RTA_PREF = 0x14
+ RTA_ENCAP_TYPE = 0x15
+ RTA_ENCAP = 0x16
+ RTA_EXPIRES = 0x17
+ RTA_PAD = 0x18
+ RTA_UID = 0x19
+ RTA_TTL_PROPAGATE = 0x1a
+ RTA_IP_PROTO = 0x1b
+ RTA_SPORT = 0x1c
+ RTA_DPORT = 0x1d
RTN_UNSPEC = 0x0
RTN_UNICAST = 0x1
RTN_LOCAL = 0x2
@@ -1872,3 +1895,63 @@ const (
NETNSA_PID = 0x2
NETNSA_FD = 0x3
)
+
+type XDPRingOffset struct {
+ Producer uint64
+ Consumer uint64
+ Desc uint64
+}
+
+type XDPMmapOffsets struct {
+ Rx XDPRingOffset
+ Tx XDPRingOffset
+ Fr XDPRingOffset
+ Cr XDPRingOffset
+}
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+}
+
+type XDPStatistics struct {
+ Rx_dropped uint64
+ Rx_invalid_descs uint64
+ Tx_invalid_descs uint64
+}
+
+type XDPDesc struct {
+ Addr uint64
+ Len uint32
+ Options uint32
+}
+
+const (
+ NCSI_CMD_UNSPEC = 0x0
+ NCSI_CMD_PKG_INFO = 0x1
+ NCSI_CMD_SET_INTERFACE = 0x2
+ NCSI_CMD_CLEAR_INTERFACE = 0x3
+ NCSI_ATTR_UNSPEC = 0x0
+ NCSI_ATTR_IFINDEX = 0x1
+ NCSI_ATTR_PACKAGE_LIST = 0x2
+ NCSI_ATTR_PACKAGE_ID = 0x3
+ NCSI_ATTR_CHANNEL_ID = 0x4
+ NCSI_PKG_ATTR_UNSPEC = 0x0
+ NCSI_PKG_ATTR = 0x1
+ NCSI_PKG_ATTR_ID = 0x2
+ NCSI_PKG_ATTR_FORCED = 0x3
+ NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
+ NCSI_CHANNEL_ATTR_UNSPEC = 0x0
+ NCSI_CHANNEL_ATTR = 0x1
+ NCSI_CHANNEL_ATTR_ID = 0x2
+ NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
+ NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
+ NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
+ NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
+ NCSI_CHANNEL_ATTR_ACTIVE = 0x7
+ NCSI_CHANNEL_ATTR_FORCED = 0x8
+ NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
+ NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
+)
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 3a72fd9f1..044d97ba9 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -281,6 +281,14 @@ type RawSockaddrVM struct {
Zero [4]uint8
}
+type RawSockaddrXDP struct {
+ Family uint16
+ Flags uint16
+ Ifindex uint32
+ Queue_id uint32
+ Shared_umem_fd uint32
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -417,6 +425,7 @@ const (
SizeofSockaddrCAN = 0x10
SizeofSockaddrALG = 0x58
SizeofSockaddrVM = 0x10
+ SizeofSockaddrXDP = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -515,6 +524,20 @@ const (
RTA_FLOW = 0xb
RTA_CACHEINFO = 0xc
RTA_TABLE = 0xf
+ RTA_MARK = 0x10
+ RTA_MFC_STATS = 0x11
+ RTA_VIA = 0x12
+ RTA_NEWDST = 0x13
+ RTA_PREF = 0x14
+ RTA_ENCAP_TYPE = 0x15
+ RTA_ENCAP = 0x16
+ RTA_EXPIRES = 0x17
+ RTA_PAD = 0x18
+ RTA_UID = 0x19
+ RTA_TTL_PROPAGATE = 0x1a
+ RTA_IP_PROTO = 0x1b
+ RTA_SPORT = 0x1c
+ RTA_DPORT = 0x1d
RTN_UNSPEC = 0x0
RTN_UNICAST = 0x1
RTN_LOCAL = 0x2
@@ -1883,3 +1906,63 @@ const (
NETNSA_PID = 0x2
NETNSA_FD = 0x3
)
+
+type XDPRingOffset struct {
+ Producer uint64
+ Consumer uint64
+ Desc uint64
+}
+
+type XDPMmapOffsets struct {
+ Rx XDPRingOffset
+ Tx XDPRingOffset
+ Fr XDPRingOffset
+ Cr XDPRingOffset
+}
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+}
+
+type XDPStatistics struct {
+ Rx_dropped uint64
+ Rx_invalid_descs uint64
+ Tx_invalid_descs uint64
+}
+
+type XDPDesc struct {
+ Addr uint64
+ Len uint32
+ Options uint32
+}
+
+const (
+ NCSI_CMD_UNSPEC = 0x0
+ NCSI_CMD_PKG_INFO = 0x1
+ NCSI_CMD_SET_INTERFACE = 0x2
+ NCSI_CMD_CLEAR_INTERFACE = 0x3
+ NCSI_ATTR_UNSPEC = 0x0
+ NCSI_ATTR_IFINDEX = 0x1
+ NCSI_ATTR_PACKAGE_LIST = 0x2
+ NCSI_ATTR_PACKAGE_ID = 0x3
+ NCSI_ATTR_CHANNEL_ID = 0x4
+ NCSI_PKG_ATTR_UNSPEC = 0x0
+ NCSI_PKG_ATTR = 0x1
+ NCSI_PKG_ATTR_ID = 0x2
+ NCSI_PKG_ATTR_FORCED = 0x3
+ NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
+ NCSI_CHANNEL_ATTR_UNSPEC = 0x0
+ NCSI_CHANNEL_ATTR = 0x1
+ NCSI_CHANNEL_ATTR_ID = 0x2
+ NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
+ NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
+ NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
+ NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
+ NCSI_CHANNEL_ATTR_ACTIVE = 0x7
+ NCSI_CHANNEL_ATTR_FORCED = 0x8
+ NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
+ NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
+)
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 cd360b270..46e6fdcc8 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -279,6 +279,14 @@ type RawSockaddrVM struct {
Zero [4]uint8
}
+type RawSockaddrXDP struct {
+ Family uint16
+ Flags uint16
+ Ifindex uint32
+ Queue_id uint32
+ Shared_umem_fd uint32
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -413,6 +421,7 @@ const (
SizeofSockaddrCAN = 0x10
SizeofSockaddrALG = 0x58
SizeofSockaddrVM = 0x10
+ SizeofSockaddrXDP = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x8
SizeofIPMreq = 0x8
@@ -511,6 +520,20 @@ const (
RTA_FLOW = 0xb
RTA_CACHEINFO = 0xc
RTA_TABLE = 0xf
+ RTA_MARK = 0x10
+ RTA_MFC_STATS = 0x11
+ RTA_VIA = 0x12
+ RTA_NEWDST = 0x13
+ RTA_PREF = 0x14
+ RTA_ENCAP_TYPE = 0x15
+ RTA_ENCAP = 0x16
+ RTA_EXPIRES = 0x17
+ RTA_PAD = 0x18
+ RTA_UID = 0x19
+ RTA_TTL_PROPAGATE = 0x1a
+ RTA_IP_PROTO = 0x1b
+ RTA_SPORT = 0x1c
+ RTA_DPORT = 0x1d
RTN_UNSPEC = 0x0
RTN_UNICAST = 0x1
RTN_LOCAL = 0x2
@@ -1877,3 +1900,63 @@ const (
NETNSA_PID = 0x2
NETNSA_FD = 0x3
)
+
+type XDPRingOffset struct {
+ Producer uint64
+ Consumer uint64
+ Desc uint64
+}
+
+type XDPMmapOffsets struct {
+ Rx XDPRingOffset
+ Tx XDPRingOffset
+ Fr XDPRingOffset
+ Cr XDPRingOffset
+}
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+}
+
+type XDPStatistics struct {
+ Rx_dropped uint64
+ Rx_invalid_descs uint64
+ Tx_invalid_descs uint64
+}
+
+type XDPDesc struct {
+ Addr uint64
+ Len uint32
+ Options uint32
+}
+
+const (
+ NCSI_CMD_UNSPEC = 0x0
+ NCSI_CMD_PKG_INFO = 0x1
+ NCSI_CMD_SET_INTERFACE = 0x2
+ NCSI_CMD_CLEAR_INTERFACE = 0x3
+ NCSI_ATTR_UNSPEC = 0x0
+ NCSI_ATTR_IFINDEX = 0x1
+ NCSI_ATTR_PACKAGE_LIST = 0x2
+ NCSI_ATTR_PACKAGE_ID = 0x3
+ NCSI_ATTR_CHANNEL_ID = 0x4
+ NCSI_PKG_ATTR_UNSPEC = 0x0
+ NCSI_PKG_ATTR = 0x1
+ NCSI_PKG_ATTR_ID = 0x2
+ NCSI_PKG_ATTR_FORCED = 0x3
+ NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
+ NCSI_CHANNEL_ATTR_UNSPEC = 0x0
+ NCSI_CHANNEL_ATTR = 0x1
+ NCSI_CHANNEL_ATTR_ID = 0x2
+ NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
+ NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
+ NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
+ NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
+ NCSI_CHANNEL_ATTR_ACTIVE = 0x7
+ NCSI_CHANNEL_ATTR_FORCED = 0x8
+ NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
+ NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
+)
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 d35ec6022..a66849e3e 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -281,6 +281,14 @@ type RawSockaddrVM struct {
Zero [4]uint8
}
+type RawSockaddrXDP struct {
+ Family uint16
+ Flags uint16
+ Ifindex uint32
+ Queue_id uint32
+ Shared_umem_fd uint32
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -417,6 +425,7 @@ const (
SizeofSockaddrCAN = 0x10
SizeofSockaddrALG = 0x58
SizeofSockaddrVM = 0x10
+ SizeofSockaddrXDP = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -515,6 +524,20 @@ const (
RTA_FLOW = 0xb
RTA_CACHEINFO = 0xc
RTA_TABLE = 0xf
+ RTA_MARK = 0x10
+ RTA_MFC_STATS = 0x11
+ RTA_VIA = 0x12
+ RTA_NEWDST = 0x13
+ RTA_PREF = 0x14
+ RTA_ENCAP_TYPE = 0x15
+ RTA_ENCAP = 0x16
+ RTA_EXPIRES = 0x17
+ RTA_PAD = 0x18
+ RTA_UID = 0x19
+ RTA_TTL_PROPAGATE = 0x1a
+ RTA_IP_PROTO = 0x1b
+ RTA_SPORT = 0x1c
+ RTA_DPORT = 0x1d
RTN_UNSPEC = 0x0
RTN_UNICAST = 0x1
RTN_LOCAL = 0x2
@@ -1885,3 +1908,63 @@ const (
NETNSA_PID = 0x2
NETNSA_FD = 0x3
)
+
+type XDPRingOffset struct {
+ Producer uint64
+ Consumer uint64
+ Desc uint64
+}
+
+type XDPMmapOffsets struct {
+ Rx XDPRingOffset
+ Tx XDPRingOffset
+ Fr XDPRingOffset
+ Cr XDPRingOffset
+}
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+}
+
+type XDPStatistics struct {
+ Rx_dropped uint64
+ Rx_invalid_descs uint64
+ Tx_invalid_descs uint64
+}
+
+type XDPDesc struct {
+ Addr uint64
+ Len uint32
+ Options uint32
+}
+
+const (
+ NCSI_CMD_UNSPEC = 0x0
+ NCSI_CMD_PKG_INFO = 0x1
+ NCSI_CMD_SET_INTERFACE = 0x2
+ NCSI_CMD_CLEAR_INTERFACE = 0x3
+ NCSI_ATTR_UNSPEC = 0x0
+ NCSI_ATTR_IFINDEX = 0x1
+ NCSI_ATTR_PACKAGE_LIST = 0x2
+ NCSI_ATTR_PACKAGE_ID = 0x3
+ NCSI_ATTR_CHANNEL_ID = 0x4
+ NCSI_PKG_ATTR_UNSPEC = 0x0
+ NCSI_PKG_ATTR = 0x1
+ NCSI_PKG_ATTR_ID = 0x2
+ NCSI_PKG_ATTR_FORCED = 0x3
+ NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
+ NCSI_CHANNEL_ATTR_UNSPEC = 0x0
+ NCSI_CHANNEL_ATTR = 0x1
+ NCSI_CHANNEL_ATTR_ID = 0x2
+ NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
+ NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
+ NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
+ NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
+ NCSI_CHANNEL_ATTR_ACTIVE = 0x7
+ NCSI_CHANNEL_ATTR_FORCED = 0x8
+ NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
+ NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
+)
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 0f4993024..bf3eca7fe 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -281,6 +281,14 @@ type RawSockaddrVM struct {
Zero [4]uint8
}
+type RawSockaddrXDP struct {
+ Family uint16
+ Flags uint16
+ Ifindex uint32
+ Queue_id uint32
+ Shared_umem_fd uint32
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -417,6 +425,7 @@ const (
SizeofSockaddrCAN = 0x10
SizeofSockaddrALG = 0x58
SizeofSockaddrVM = 0x10
+ SizeofSockaddrXDP = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -515,6 +524,20 @@ const (
RTA_FLOW = 0xb
RTA_CACHEINFO = 0xc
RTA_TABLE = 0xf
+ RTA_MARK = 0x10
+ RTA_MFC_STATS = 0x11
+ RTA_VIA = 0x12
+ RTA_NEWDST = 0x13
+ RTA_PREF = 0x14
+ RTA_ENCAP_TYPE = 0x15
+ RTA_ENCAP = 0x16
+ RTA_EXPIRES = 0x17
+ RTA_PAD = 0x18
+ RTA_UID = 0x19
+ RTA_TTL_PROPAGATE = 0x1a
+ RTA_IP_PROTO = 0x1b
+ RTA_SPORT = 0x1c
+ RTA_DPORT = 0x1d
RTN_UNSPEC = 0x0
RTN_UNICAST = 0x1
RTN_LOCAL = 0x2
@@ -1885,3 +1908,63 @@ const (
NETNSA_PID = 0x2
NETNSA_FD = 0x3
)
+
+type XDPRingOffset struct {
+ Producer uint64
+ Consumer uint64
+ Desc uint64
+}
+
+type XDPMmapOffsets struct {
+ Rx XDPRingOffset
+ Tx XDPRingOffset
+ Fr XDPRingOffset
+ Cr XDPRingOffset
+}
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+}
+
+type XDPStatistics struct {
+ Rx_dropped uint64
+ Rx_invalid_descs uint64
+ Tx_invalid_descs uint64
+}
+
+type XDPDesc struct {
+ Addr uint64
+ Len uint32
+ Options uint32
+}
+
+const (
+ NCSI_CMD_UNSPEC = 0x0
+ NCSI_CMD_PKG_INFO = 0x1
+ NCSI_CMD_SET_INTERFACE = 0x2
+ NCSI_CMD_CLEAR_INTERFACE = 0x3
+ NCSI_ATTR_UNSPEC = 0x0
+ NCSI_ATTR_IFINDEX = 0x1
+ NCSI_ATTR_PACKAGE_LIST = 0x2
+ NCSI_ATTR_PACKAGE_ID = 0x3
+ NCSI_ATTR_CHANNEL_ID = 0x4
+ NCSI_PKG_ATTR_UNSPEC = 0x0
+ NCSI_PKG_ATTR = 0x1
+ NCSI_PKG_ATTR_ID = 0x2
+ NCSI_PKG_ATTR_FORCED = 0x3
+ NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
+ NCSI_CHANNEL_ATTR_UNSPEC = 0x0
+ NCSI_CHANNEL_ATTR = 0x1
+ NCSI_CHANNEL_ATTR_ID = 0x2
+ NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
+ NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
+ NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
+ NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
+ NCSI_CHANNEL_ATTR_ACTIVE = 0x7
+ NCSI_CHANNEL_ATTR_FORCED = 0x8
+ NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
+ NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
+)
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 55f97c5cc..4aefec3f0 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -279,6 +279,14 @@ type RawSockaddrVM struct {
Zero [4]uint8
}
+type RawSockaddrXDP struct {
+ Family uint16
+ Flags uint16
+ Ifindex uint32
+ Queue_id uint32
+ Shared_umem_fd uint32
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -413,6 +421,7 @@ const (
SizeofSockaddrCAN = 0x10
SizeofSockaddrALG = 0x58
SizeofSockaddrVM = 0x10
+ SizeofSockaddrXDP = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x8
SizeofIPMreq = 0x8
@@ -511,6 +520,20 @@ const (
RTA_FLOW = 0xb
RTA_CACHEINFO = 0xc
RTA_TABLE = 0xf
+ RTA_MARK = 0x10
+ RTA_MFC_STATS = 0x11
+ RTA_VIA = 0x12
+ RTA_NEWDST = 0x13
+ RTA_PREF = 0x14
+ RTA_ENCAP_TYPE = 0x15
+ RTA_ENCAP = 0x16
+ RTA_EXPIRES = 0x17
+ RTA_PAD = 0x18
+ RTA_UID = 0x19
+ RTA_TTL_PROPAGATE = 0x1a
+ RTA_IP_PROTO = 0x1b
+ RTA_SPORT = 0x1c
+ RTA_DPORT = 0x1d
RTN_UNSPEC = 0x0
RTN_UNICAST = 0x1
RTN_LOCAL = 0x2
@@ -1877,3 +1900,63 @@ const (
NETNSA_PID = 0x2
NETNSA_FD = 0x3
)
+
+type XDPRingOffset struct {
+ Producer uint64
+ Consumer uint64
+ Desc uint64
+}
+
+type XDPMmapOffsets struct {
+ Rx XDPRingOffset
+ Tx XDPRingOffset
+ Fr XDPRingOffset
+ Cr XDPRingOffset
+}
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+}
+
+type XDPStatistics struct {
+ Rx_dropped uint64
+ Rx_invalid_descs uint64
+ Tx_invalid_descs uint64
+}
+
+type XDPDesc struct {
+ Addr uint64
+ Len uint32
+ Options uint32
+}
+
+const (
+ NCSI_CMD_UNSPEC = 0x0
+ NCSI_CMD_PKG_INFO = 0x1
+ NCSI_CMD_SET_INTERFACE = 0x2
+ NCSI_CMD_CLEAR_INTERFACE = 0x3
+ NCSI_ATTR_UNSPEC = 0x0
+ NCSI_ATTR_IFINDEX = 0x1
+ NCSI_ATTR_PACKAGE_LIST = 0x2
+ NCSI_ATTR_PACKAGE_ID = 0x3
+ NCSI_ATTR_CHANNEL_ID = 0x4
+ NCSI_PKG_ATTR_UNSPEC = 0x0
+ NCSI_PKG_ATTR = 0x1
+ NCSI_PKG_ATTR_ID = 0x2
+ NCSI_PKG_ATTR_FORCED = 0x3
+ NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
+ NCSI_CHANNEL_ATTR_UNSPEC = 0x0
+ NCSI_CHANNEL_ATTR = 0x1
+ NCSI_CHANNEL_ATTR_ID = 0x2
+ NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
+ NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
+ NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
+ NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
+ NCSI_CHANNEL_ATTR_ACTIVE = 0x7
+ NCSI_CHANNEL_ATTR_FORCED = 0x8
+ NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
+ NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
+)
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 f1d426445..81b322628 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -282,6 +282,14 @@ type RawSockaddrVM struct {
Zero [4]uint8
}
+type RawSockaddrXDP struct {
+ Family uint16
+ Flags uint16
+ Ifindex uint32
+ Queue_id uint32
+ Shared_umem_fd uint32
+}
+
type RawSockaddr struct {
Family uint16
Data [14]uint8
@@ -418,6 +426,7 @@ const (
SizeofSockaddrCAN = 0x10
SizeofSockaddrALG = 0x58
SizeofSockaddrVM = 0x10
+ SizeofSockaddrXDP = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -516,6 +525,20 @@ const (
RTA_FLOW = 0xb
RTA_CACHEINFO = 0xc
RTA_TABLE = 0xf
+ RTA_MARK = 0x10
+ RTA_MFC_STATS = 0x11
+ RTA_VIA = 0x12
+ RTA_NEWDST = 0x13
+ RTA_PREF = 0x14
+ RTA_ENCAP_TYPE = 0x15
+ RTA_ENCAP = 0x16
+ RTA_EXPIRES = 0x17
+ RTA_PAD = 0x18
+ RTA_UID = 0x19
+ RTA_TTL_PROPAGATE = 0x1a
+ RTA_IP_PROTO = 0x1b
+ RTA_SPORT = 0x1c
+ RTA_DPORT = 0x1d
RTN_UNSPEC = 0x0
RTN_UNICAST = 0x1
RTN_LOCAL = 0x2
@@ -1893,3 +1916,63 @@ const (
NETNSA_PID = 0x2
NETNSA_FD = 0x3
)
+
+type XDPRingOffset struct {
+ Producer uint64
+ Consumer uint64
+ Desc uint64
+}
+
+type XDPMmapOffsets struct {
+ Rx XDPRingOffset
+ Tx XDPRingOffset
+ Fr XDPRingOffset
+ Cr XDPRingOffset
+}
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+}
+
+type XDPStatistics struct {
+ Rx_dropped uint64
+ Rx_invalid_descs uint64
+ Tx_invalid_descs uint64
+}
+
+type XDPDesc struct {
+ Addr uint64
+ Len uint32
+ Options uint32
+}
+
+const (
+ NCSI_CMD_UNSPEC = 0x0
+ NCSI_CMD_PKG_INFO = 0x1
+ NCSI_CMD_SET_INTERFACE = 0x2
+ NCSI_CMD_CLEAR_INTERFACE = 0x3
+ NCSI_ATTR_UNSPEC = 0x0
+ NCSI_ATTR_IFINDEX = 0x1
+ NCSI_ATTR_PACKAGE_LIST = 0x2
+ NCSI_ATTR_PACKAGE_ID = 0x3
+ NCSI_ATTR_CHANNEL_ID = 0x4
+ NCSI_PKG_ATTR_UNSPEC = 0x0
+ NCSI_PKG_ATTR = 0x1
+ NCSI_PKG_ATTR_ID = 0x2
+ NCSI_PKG_ATTR_FORCED = 0x3
+ NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
+ NCSI_CHANNEL_ATTR_UNSPEC = 0x0
+ NCSI_CHANNEL_ATTR = 0x1
+ NCSI_CHANNEL_ATTR_ID = 0x2
+ NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
+ NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
+ NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
+ NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
+ NCSI_CHANNEL_ATTR_ACTIVE = 0x7
+ NCSI_CHANNEL_ATTR_FORCED = 0x8
+ NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
+ NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
+)
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 90ab1f7af..9ba53b4e8 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -282,6 +282,14 @@ type RawSockaddrVM struct {
Zero [4]uint8
}
+type RawSockaddrXDP struct {
+ Family uint16
+ Flags uint16
+ Ifindex uint32
+ Queue_id uint32
+ Shared_umem_fd uint32
+}
+
type RawSockaddr struct {
Family uint16
Data [14]uint8
@@ -418,6 +426,7 @@ const (
SizeofSockaddrCAN = 0x10
SizeofSockaddrALG = 0x58
SizeofSockaddrVM = 0x10
+ SizeofSockaddrXDP = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -516,6 +525,20 @@ const (
RTA_FLOW = 0xb
RTA_CACHEINFO = 0xc
RTA_TABLE = 0xf
+ RTA_MARK = 0x10
+ RTA_MFC_STATS = 0x11
+ RTA_VIA = 0x12
+ RTA_NEWDST = 0x13
+ RTA_PREF = 0x14
+ RTA_ENCAP_TYPE = 0x15
+ RTA_ENCAP = 0x16
+ RTA_EXPIRES = 0x17
+ RTA_PAD = 0x18
+ RTA_UID = 0x19
+ RTA_TTL_PROPAGATE = 0x1a
+ RTA_IP_PROTO = 0x1b
+ RTA_SPORT = 0x1c
+ RTA_DPORT = 0x1d
RTN_UNSPEC = 0x0
RTN_UNICAST = 0x1
RTN_LOCAL = 0x2
@@ -1893,3 +1916,63 @@ const (
NETNSA_PID = 0x2
NETNSA_FD = 0x3
)
+
+type XDPRingOffset struct {
+ Producer uint64
+ Consumer uint64
+ Desc uint64
+}
+
+type XDPMmapOffsets struct {
+ Rx XDPRingOffset
+ Tx XDPRingOffset
+ Fr XDPRingOffset
+ Cr XDPRingOffset
+}
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+}
+
+type XDPStatistics struct {
+ Rx_dropped uint64
+ Rx_invalid_descs uint64
+ Tx_invalid_descs uint64
+}
+
+type XDPDesc struct {
+ Addr uint64
+ Len uint32
+ Options uint32
+}
+
+const (
+ NCSI_CMD_UNSPEC = 0x0
+ NCSI_CMD_PKG_INFO = 0x1
+ NCSI_CMD_SET_INTERFACE = 0x2
+ NCSI_CMD_CLEAR_INTERFACE = 0x3
+ NCSI_ATTR_UNSPEC = 0x0
+ NCSI_ATTR_IFINDEX = 0x1
+ NCSI_ATTR_PACKAGE_LIST = 0x2
+ NCSI_ATTR_PACKAGE_ID = 0x3
+ NCSI_ATTR_CHANNEL_ID = 0x4
+ NCSI_PKG_ATTR_UNSPEC = 0x0
+ NCSI_PKG_ATTR = 0x1
+ NCSI_PKG_ATTR_ID = 0x2
+ NCSI_PKG_ATTR_FORCED = 0x3
+ NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
+ NCSI_CHANNEL_ATTR_UNSPEC = 0x0
+ NCSI_CHANNEL_ATTR = 0x1
+ NCSI_CHANNEL_ATTR_ID = 0x2
+ NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
+ NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
+ NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
+ NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
+ NCSI_CHANNEL_ATTR_ACTIVE = 0x7
+ NCSI_CHANNEL_ATTR_FORCED = 0x8
+ NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
+ NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
new file mode 100644
index 000000000..cf39aa019
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
@@ -0,0 +1,1995 @@
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build riscv64,linux
+
+package unix
+
+const (
+ sizeofPtr = 0x8
+ sizeofShort = 0x2
+ sizeofInt = 0x4
+ sizeofLong = 0x8
+ sizeofLongLong = 0x8
+ PathMax = 0x1000
+)
+
+type (
+ _C_short int16
+ _C_int int32
+ _C_long int64
+ _C_long_long int64
+)
+
+type Timespec struct {
+ Sec int64
+ Nsec int64
+}
+
+type Timeval struct {
+ Sec int64
+ Usec int64
+}
+
+type Timex struct {
+ Modes uint32
+ _ [4]byte
+ Offset int64
+ Freq int64
+ Maxerror int64
+ Esterror int64
+ Status int32
+ _ [4]byte
+ Constant int64
+ Precision int64
+ Tolerance int64
+ Time Timeval
+ Tick int64
+ Ppsfreq int64
+ Jitter int64
+ Shift int32
+ _ [4]byte
+ Stabil int64
+ Jitcnt int64
+ Calcnt int64
+ Errcnt int64
+ Stbcnt int64
+ Tai int32
+ _ [44]byte
+}
+
+type Time_t int64
+
+type Tms struct {
+ Utime int64
+ Stime int64
+ Cutime int64
+ Cstime int64
+}
+
+type Utimbuf struct {
+ Actime int64
+ Modtime int64
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int64
+ Ixrss int64
+ Idrss int64
+ Isrss int64
+ Minflt int64
+ Majflt int64
+ Nswap int64
+ Inblock int64
+ Oublock int64
+ Msgsnd int64
+ Msgrcv int64
+ Nsignals int64
+ Nvcsw int64
+ Nivcsw int64
+}
+
+type Rlimit struct {
+ Cur uint64
+ Max uint64
+}
+
+type _Gid_t uint32
+
+type Stat_t struct {
+ Dev uint64
+ Ino uint64
+ Mode uint32
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Rdev uint64
+ _ uint64
+ Size int64
+ Blksize int32
+ _ int32
+ Blocks int64
+ Atim Timespec
+ Mtim Timespec
+ Ctim Timespec
+ _ [2]int32
+}
+
+type StatxTimestamp struct {
+ Sec int64
+ Nsec uint32
+ _ int32
+}
+
+type Statx_t struct {
+ Mask uint32
+ Blksize uint32
+ Attributes uint64
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Mode uint16
+ _ [1]uint16
+ Ino uint64
+ Size uint64
+ Blocks uint64
+ Attributes_mask uint64
+ Atime StatxTimestamp
+ Btime StatxTimestamp
+ Ctime StatxTimestamp
+ Mtime StatxTimestamp
+ Rdev_major uint32
+ Rdev_minor uint32
+ Dev_major uint32
+ Dev_minor uint32
+ _ [14]uint64
+}
+
+type Dirent struct {
+ Ino uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Name [256]uint8
+ _ [5]byte
+}
+
+type Fsid struct {
+ Val [2]int32
+}
+
+type Flock_t struct {
+ Type int16
+ Whence int16
+ _ [4]byte
+ Start int64
+ Len int64
+ Pid int32
+ _ [4]byte
+}
+
+type FscryptPolicy struct {
+ Version uint8
+ Contents_encryption_mode uint8
+ Filenames_encryption_mode uint8
+ Flags uint8
+ Master_key_descriptor [8]uint8
+}
+
+type FscryptKey struct {
+ Mode uint32
+ Raw [64]uint8
+ Size uint32
+}
+
+type KeyctlDHParams struct {
+ Private int32
+ Prime int32
+ Base int32
+}
+
+const (
+ FADV_NORMAL = 0x0
+ FADV_RANDOM = 0x1
+ FADV_SEQUENTIAL = 0x2
+ FADV_WILLNEED = 0x3
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
+)
+
+type RawSockaddrInet4 struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]uint8
+}
+
+type RawSockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+ Family uint16
+ Path [108]uint8
+}
+
+type RawSockaddrLinklayer struct {
+ Family uint16
+ Protocol uint16
+ Ifindex int32
+ Hatype uint16
+ Pkttype uint8
+ Halen uint8
+ Addr [8]uint8
+}
+
+type RawSockaddrNetlink struct {
+ Family uint16
+ Pad uint16
+ Pid uint32
+ Groups uint32
+}
+
+type RawSockaddrHCI struct {
+ Family uint16
+ Dev uint16
+ Channel uint16
+}
+
+type RawSockaddrL2 struct {
+ Family uint16
+ Psm uint16
+ Bdaddr [6]uint8
+ Cid uint16
+ Bdaddr_type uint8
+ _ [1]byte
+}
+
+type RawSockaddrRFCOMM struct {
+ Family uint16
+ Bdaddr [6]uint8
+ Channel uint8
+ _ [1]byte
+}
+
+type RawSockaddrCAN struct {
+ Family uint16
+ _ [2]byte
+ Ifindex int32
+ Addr [8]byte
+}
+
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
+type RawSockaddrVM struct {
+ Family uint16
+ Reserved1 uint16
+ Port uint32
+ Cid uint32
+ Zero [4]uint8
+}
+
+type RawSockaddrXDP struct {
+ Family uint16
+ Flags uint16
+ Ifindex uint32
+ Queue_id uint32
+ Shared_umem_fd uint32
+}
+
+type RawSockaddr struct {
+ Family uint16
+ Data [14]uint8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ Pad [96]uint8
+}
+
+type _Socklen uint32
+
+type Linger struct {
+ Onoff int32
+ Linger int32
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type IPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type IPMreqn struct {
+ Multiaddr [4]byte /* in_addr */
+ Address [4]byte /* in_addr */
+ Ifindex int32
+}
+
+type IPv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type PacketMreq struct {
+ Ifindex int32
+ Type uint16
+ Alen uint16
+ Address [8]uint8
+}
+
+type Msghdr struct {
+ Name *byte
+ Namelen uint32
+ _ [4]byte
+ Iov *Iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ _ [4]byte
+}
+
+type Cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+type Inet4Pktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type Inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type ICMPv6Filter struct {
+ Data [8]uint32
+}
+
+type Ucred struct {
+ Pid int32
+ Uid uint32
+ Gid uint32
+}
+
+type TCPInfo struct {
+ State uint8
+ Ca_state uint8
+ Retransmits uint8
+ Probes uint8
+ Backoff uint8
+ Options uint8
+ _ [2]byte
+ Rto uint32
+ Ato uint32
+ Snd_mss uint32
+ Rcv_mss uint32
+ Unacked uint32
+ Sacked uint32
+ Lost uint32
+ Retrans uint32
+ Fackets uint32
+ Last_data_sent uint32
+ Last_ack_sent uint32
+ Last_data_recv uint32
+ Last_ack_recv uint32
+ Pmtu uint32
+ Rcv_ssthresh uint32
+ Rtt uint32
+ Rttvar uint32
+ Snd_ssthresh uint32
+ Snd_cwnd uint32
+ Advmss uint32
+ Reordering uint32
+ Rcv_rtt uint32
+ Rcv_space uint32
+ Total_retrans uint32
+}
+
+const (
+ SizeofSockaddrInet4 = 0x10
+ SizeofSockaddrInet6 = 0x1c
+ SizeofSockaddrAny = 0x70
+ SizeofSockaddrUnix = 0x6e
+ SizeofSockaddrLinklayer = 0x14
+ SizeofSockaddrNetlink = 0xc
+ SizeofSockaddrHCI = 0x6
+ SizeofSockaddrL2 = 0xe
+ SizeofSockaddrRFCOMM = 0xa
+ SizeofSockaddrCAN = 0x10
+ SizeofSockaddrALG = 0x58
+ SizeofSockaddrVM = 0x10
+ SizeofSockaddrXDP = 0x10
+ SizeofLinger = 0x8
+ SizeofIovec = 0x10
+ SizeofIPMreq = 0x8
+ SizeofIPMreqn = 0xc
+ SizeofIPv6Mreq = 0x14
+ SizeofPacketMreq = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
+ SizeofInet4Pktinfo = 0xc
+ SizeofInet6Pktinfo = 0x14
+ SizeofIPv6MTUInfo = 0x20
+ SizeofICMPv6Filter = 0x20
+ SizeofUcred = 0xc
+ SizeofTCPInfo = 0x68
+)
+
+const (
+ IFA_UNSPEC = 0x0
+ IFA_ADDRESS = 0x1
+ IFA_LOCAL = 0x2
+ IFA_LABEL = 0x3
+ IFA_BROADCAST = 0x4
+ IFA_ANYCAST = 0x5
+ IFA_CACHEINFO = 0x6
+ IFA_MULTICAST = 0x7
+ IFLA_UNSPEC = 0x0
+ IFLA_ADDRESS = 0x1
+ IFLA_BROADCAST = 0x2
+ IFLA_IFNAME = 0x3
+ IFLA_INFO_KIND = 0x1
+ IFLA_MTU = 0x4
+ IFLA_LINK = 0x5
+ IFLA_QDISC = 0x6
+ IFLA_STATS = 0x7
+ IFLA_COST = 0x8
+ IFLA_PRIORITY = 0x9
+ IFLA_MASTER = 0xa
+ IFLA_WIRELESS = 0xb
+ IFLA_PROTINFO = 0xc
+ IFLA_TXQLEN = 0xd
+ IFLA_MAP = 0xe
+ IFLA_WEIGHT = 0xf
+ IFLA_OPERSTATE = 0x10
+ IFLA_LINKMODE = 0x11
+ IFLA_LINKINFO = 0x12
+ IFLA_NET_NS_PID = 0x13
+ IFLA_IFALIAS = 0x14
+ IFLA_NUM_VF = 0x15
+ IFLA_VFINFO_LIST = 0x16
+ IFLA_STATS64 = 0x17
+ IFLA_VF_PORTS = 0x18
+ IFLA_PORT_SELF = 0x19
+ IFLA_AF_SPEC = 0x1a
+ IFLA_GROUP = 0x1b
+ IFLA_NET_NS_FD = 0x1c
+ IFLA_EXT_MASK = 0x1d
+ IFLA_PROMISCUITY = 0x1e
+ IFLA_NUM_TX_QUEUES = 0x1f
+ IFLA_NUM_RX_QUEUES = 0x20
+ IFLA_CARRIER = 0x21
+ IFLA_PHYS_PORT_ID = 0x22
+ IFLA_CARRIER_CHANGES = 0x23
+ IFLA_PHYS_SWITCH_ID = 0x24
+ IFLA_LINK_NETNSID = 0x25
+ IFLA_PHYS_PORT_NAME = 0x26
+ IFLA_PROTO_DOWN = 0x27
+ IFLA_GSO_MAX_SEGS = 0x28
+ IFLA_GSO_MAX_SIZE = 0x29
+ IFLA_PAD = 0x2a
+ IFLA_XDP = 0x2b
+ IFLA_EVENT = 0x2c
+ IFLA_NEW_NETNSID = 0x2d
+ IFLA_IF_NETNSID = 0x2e
+ IFLA_MAX = 0x31
+ RT_SCOPE_UNIVERSE = 0x0
+ RT_SCOPE_SITE = 0xc8
+ RT_SCOPE_LINK = 0xfd
+ RT_SCOPE_HOST = 0xfe
+ RT_SCOPE_NOWHERE = 0xff
+ RT_TABLE_UNSPEC = 0x0
+ RT_TABLE_COMPAT = 0xfc
+ RT_TABLE_DEFAULT = 0xfd
+ RT_TABLE_MAIN = 0xfe
+ RT_TABLE_LOCAL = 0xff
+ RT_TABLE_MAX = 0xffffffff
+ RTA_UNSPEC = 0x0
+ RTA_DST = 0x1
+ RTA_SRC = 0x2
+ RTA_IIF = 0x3
+ RTA_OIF = 0x4
+ RTA_GATEWAY = 0x5
+ RTA_PRIORITY = 0x6
+ RTA_PREFSRC = 0x7
+ RTA_METRICS = 0x8
+ RTA_MULTIPATH = 0x9
+ RTA_FLOW = 0xb
+ RTA_CACHEINFO = 0xc
+ RTA_TABLE = 0xf
+ RTA_MARK = 0x10
+ RTA_MFC_STATS = 0x11
+ RTA_VIA = 0x12
+ RTA_NEWDST = 0x13
+ RTA_PREF = 0x14
+ RTA_ENCAP_TYPE = 0x15
+ RTA_ENCAP = 0x16
+ RTA_EXPIRES = 0x17
+ RTA_PAD = 0x18
+ RTA_UID = 0x19
+ RTA_TTL_PROPAGATE = 0x1a
+ RTA_IP_PROTO = 0x1b
+ RTA_SPORT = 0x1c
+ RTA_DPORT = 0x1d
+ RTN_UNSPEC = 0x0
+ RTN_UNICAST = 0x1
+ RTN_LOCAL = 0x2
+ RTN_BROADCAST = 0x3
+ RTN_ANYCAST = 0x4
+ RTN_MULTICAST = 0x5
+ RTN_BLACKHOLE = 0x6
+ RTN_UNREACHABLE = 0x7
+ RTN_PROHIBIT = 0x8
+ 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
+ SizeofNlAttr = 0x4
+ SizeofRtAttr = 0x4
+ SizeofIfInfomsg = 0x10
+ SizeofIfAddrmsg = 0x8
+ SizeofRtMsg = 0xc
+ SizeofRtNexthop = 0x8
+)
+
+type NlMsghdr struct {
+ Len uint32
+ Type uint16
+ Flags uint16
+ Seq uint32
+ Pid uint32
+}
+
+type NlMsgerr struct {
+ Error int32
+ Msg NlMsghdr
+}
+
+type RtGenmsg struct {
+ Family uint8
+}
+
+type NlAttr struct {
+ Len uint16
+ Type uint16
+}
+
+type RtAttr struct {
+ Len uint16
+ Type uint16
+}
+
+type IfInfomsg struct {
+ Family uint8
+ _ uint8
+ Type uint16
+ Index int32
+ Flags uint32
+ Change uint32
+}
+
+type IfAddrmsg struct {
+ Family uint8
+ Prefixlen uint8
+ Flags uint8
+ Scope uint8
+ Index uint32
+}
+
+type RtMsg struct {
+ Family uint8
+ Dst_len uint8
+ Src_len uint8
+ Tos uint8
+ Table uint8
+ Protocol uint8
+ Scope uint8
+ Type uint8
+ Flags uint32
+}
+
+type RtNexthop struct {
+ Len uint16
+ Flags uint8
+ Hops uint8
+ Ifindex int32
+}
+
+const (
+ SizeofSockFilter = 0x8
+ SizeofSockFprog = 0x10
+)
+
+type SockFilter struct {
+ Code uint16
+ Jt uint8
+ Jf uint8
+ K uint32
+}
+
+type SockFprog struct {
+ Len uint16
+ _ [6]byte
+ Filter *SockFilter
+}
+
+type InotifyEvent struct {
+ Wd int32
+ Mask uint32
+ Cookie uint32
+ Len uint32
+}
+
+const SizeofInotifyEvent = 0x10
+
+type PtraceRegs struct {
+ Pc uint64
+ Ra uint64
+ Sp uint64
+ Gp uint64
+ Tp uint64
+ T0 uint64
+ T1 uint64
+ T2 uint64
+ S0 uint64
+ S1 uint64
+ A0 uint64
+ A1 uint64
+ A2 uint64
+ A3 uint64
+ A4 uint64
+ A5 uint64
+ A6 uint64
+ A7 uint64
+ S2 uint64
+ S3 uint64
+ S4 uint64
+ S5 uint64
+ S6 uint64
+ S7 uint64
+ S8 uint64
+ S9 uint64
+ S10 uint64
+ S11 uint64
+ T3 uint64
+ T4 uint64
+ T5 uint64
+ T6 uint64
+}
+
+type FdSet struct {
+ Bits [16]int64
+}
+
+type Sysinfo_t struct {
+ Uptime int64
+ Loads [3]uint64
+ Totalram uint64
+ Freeram uint64
+ Sharedram uint64
+ Bufferram uint64
+ Totalswap uint64
+ Freeswap uint64
+ Procs uint16
+ Pad uint16
+ _ [4]byte
+ Totalhigh uint64
+ Freehigh uint64
+ Unit uint32
+ _ [0]uint8
+ _ [4]byte
+}
+
+type Utsname struct {
+ Sysname [65]byte
+ Nodename [65]byte
+ Release [65]byte
+ Version [65]byte
+ Machine [65]byte
+ Domainname [65]byte
+}
+
+type Ustat_t struct {
+ Tfree int32
+ _ [4]byte
+ Tinode uint64
+ Fname [6]uint8
+ Fpack [6]uint8
+ _ [4]byte
+}
+
+type EpollEvent struct {
+ Events uint32
+ Fd int32
+ Pad int32
+}
+
+const (
+ AT_EMPTY_PATH = 0x1000
+ AT_FDCWD = -0x64
+ AT_NO_AUTOMOUNT = 0x800
+ AT_REMOVEDIR = 0x200
+
+ AT_STATX_SYNC_AS_STAT = 0x0
+ AT_STATX_FORCE_SYNC = 0x2000
+ AT_STATX_DONT_SYNC = 0x4000
+
+ AT_SYMLINK_FOLLOW = 0x400
+ AT_SYMLINK_NOFOLLOW = 0x100
+
+ AT_EACCESS = 0x200
+)
+
+type PollFd struct {
+ Fd int32
+ Events int16
+ Revents int16
+}
+
+const (
+ POLLIN = 0x1
+ POLLPRI = 0x2
+ POLLOUT = 0x4
+ POLLRDHUP = 0x2000
+ POLLERR = 0x8
+ POLLHUP = 0x10
+ POLLNVAL = 0x20
+)
+
+type Sigset_t struct {
+ Val [16]uint64
+}
+
+const RNDGETENTCNT = 0x80045200
+
+const PERF_IOC_FLAG_GROUP = 0x1
+
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Line uint8
+ Cc [19]uint8
+ Ispeed uint32
+ Ospeed uint32
+}
+
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
+type Taskstats struct {
+ Version uint16
+ _ [2]byte
+ Ac_exitcode uint32
+ Ac_flag uint8
+ Ac_nice uint8
+ _ [6]byte
+ Cpu_count uint64
+ Cpu_delay_total uint64
+ Blkio_count uint64
+ Blkio_delay_total uint64
+ Swapin_count uint64
+ Swapin_delay_total uint64
+ Cpu_run_real_total uint64
+ Cpu_run_virtual_total uint64
+ Ac_comm [32]uint8
+ Ac_sched uint8
+ Ac_pad [3]uint8
+ _ [4]byte
+ Ac_uid uint32
+ Ac_gid uint32
+ Ac_pid uint32
+ Ac_ppid uint32
+ Ac_btime uint32
+ _ [4]byte
+ Ac_etime uint64
+ Ac_utime uint64
+ Ac_stime uint64
+ Ac_minflt uint64
+ Ac_majflt uint64
+ Coremem uint64
+ Virtmem uint64
+ Hiwater_rss uint64
+ Hiwater_vm uint64
+ Read_char uint64
+ Write_char uint64
+ Read_syscalls uint64
+ Write_syscalls uint64
+ Read_bytes uint64
+ Write_bytes uint64
+ Cancelled_write_bytes uint64
+ Nvcsw uint64
+ Nivcsw uint64
+ Ac_utimescaled uint64
+ Ac_stimescaled uint64
+ Cpu_scaled_run_real_total uint64
+ Freepages_count uint64
+ Freepages_delay_total uint64
+}
+
+const (
+ TASKSTATS_CMD_UNSPEC = 0x0
+ TASKSTATS_CMD_GET = 0x1
+ TASKSTATS_CMD_NEW = 0x2
+ TASKSTATS_TYPE_UNSPEC = 0x0
+ TASKSTATS_TYPE_PID = 0x1
+ TASKSTATS_TYPE_TGID = 0x2
+ TASKSTATS_TYPE_STATS = 0x3
+ TASKSTATS_TYPE_AGGR_PID = 0x4
+ TASKSTATS_TYPE_AGGR_TGID = 0x5
+ TASKSTATS_TYPE_NULL = 0x6
+ TASKSTATS_CMD_ATTR_UNSPEC = 0x0
+ TASKSTATS_CMD_ATTR_PID = 0x1
+ TASKSTATS_CMD_ATTR_TGID = 0x2
+ TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
+ TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
+)
+
+type CGroupStats struct {
+ Sleeping uint64
+ Running uint64
+ Stopped uint64
+ Uninterruptible uint64
+ Io_wait uint64
+}
+
+const (
+ CGROUPSTATS_CMD_UNSPEC = 0x3
+ CGROUPSTATS_CMD_GET = 0x4
+ CGROUPSTATS_CMD_NEW = 0x5
+ CGROUPSTATS_TYPE_UNSPEC = 0x0
+ CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
+ CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
+ CGROUPSTATS_CMD_ATTR_FD = 0x1
+)
+
+type Genlmsghdr struct {
+ Cmd uint8
+ Version uint8
+ Reserved uint16
+}
+
+const (
+ CTRL_CMD_UNSPEC = 0x0
+ CTRL_CMD_NEWFAMILY = 0x1
+ CTRL_CMD_DELFAMILY = 0x2
+ CTRL_CMD_GETFAMILY = 0x3
+ CTRL_CMD_NEWOPS = 0x4
+ CTRL_CMD_DELOPS = 0x5
+ CTRL_CMD_GETOPS = 0x6
+ CTRL_CMD_NEWMCAST_GRP = 0x7
+ CTRL_CMD_DELMCAST_GRP = 0x8
+ CTRL_CMD_GETMCAST_GRP = 0x9
+ CTRL_ATTR_UNSPEC = 0x0
+ CTRL_ATTR_FAMILY_ID = 0x1
+ CTRL_ATTR_FAMILY_NAME = 0x2
+ CTRL_ATTR_VERSION = 0x3
+ CTRL_ATTR_HDRSIZE = 0x4
+ CTRL_ATTR_MAXATTR = 0x5
+ CTRL_ATTR_OPS = 0x6
+ CTRL_ATTR_MCAST_GROUPS = 0x7
+ CTRL_ATTR_OP_UNSPEC = 0x0
+ CTRL_ATTR_OP_ID = 0x1
+ CTRL_ATTR_OP_FLAGS = 0x2
+ CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
+ CTRL_ATTR_MCAST_GRP_NAME = 0x1
+ CTRL_ATTR_MCAST_GRP_ID = 0x2
+)
+
+type cpuMask uint64
+
+const (
+ _CPU_SETSIZE = 0x400
+ _NCPUBITS = 0x40
+)
+
+const (
+ BDADDR_BREDR = 0x0
+ BDADDR_LE_PUBLIC = 0x1
+ BDADDR_LE_RANDOM = 0x2
+)
+
+type PerfEventAttr struct {
+ Type uint32
+ Size uint32
+ Config uint64
+ Sample uint64
+ Sample_type uint64
+ Read_format uint64
+ Bits uint64
+ Wakeup uint32
+ Bp_type uint32
+ Ext1 uint64
+ Ext2 uint64
+ Branch_sample_type uint64
+ Sample_regs_user uint64
+ Sample_stack_user uint32
+ Clockid int32
+ Sample_regs_intr uint64
+ Aux_watermark uint32
+ _ uint32
+}
+
+type PerfEventMmapPage struct {
+ Version uint32
+ Compat_version uint32
+ Lock uint32
+ Index uint32
+ Offset int64
+ Time_enabled uint64
+ Time_running uint64
+ Capabilities uint64
+ Pmc_width uint16
+ Time_shift uint16
+ Time_mult uint32
+ Time_offset uint64
+ Time_zero uint64
+ Size uint32
+ _ [948]uint8
+ Data_head uint64
+ Data_tail uint64
+ Data_offset uint64
+ Data_size uint64
+ Aux_head uint64
+ Aux_tail uint64
+ Aux_offset uint64
+ Aux_size uint64
+}
+
+const (
+ PerfBitDisabled uint64 = CBitFieldMaskBit0
+ PerfBitInherit = CBitFieldMaskBit1
+ PerfBitPinned = CBitFieldMaskBit2
+ PerfBitExclusive = CBitFieldMaskBit3
+ PerfBitExcludeUser = CBitFieldMaskBit4
+ PerfBitExcludeKernel = CBitFieldMaskBit5
+ PerfBitExcludeHv = CBitFieldMaskBit6
+ PerfBitExcludeIdle = CBitFieldMaskBit7
+ PerfBitMmap = CBitFieldMaskBit8
+ PerfBitComm = CBitFieldMaskBit9
+ PerfBitFreq = CBitFieldMaskBit10
+ PerfBitInheritStat = CBitFieldMaskBit11
+ PerfBitEnableOnExec = CBitFieldMaskBit12
+ PerfBitTask = CBitFieldMaskBit13
+ PerfBitWatermark = CBitFieldMaskBit14
+ PerfBitPreciseIPBit1 = CBitFieldMaskBit15
+ PerfBitPreciseIPBit2 = CBitFieldMaskBit16
+ PerfBitMmapData = CBitFieldMaskBit17
+ PerfBitSampleIDAll = CBitFieldMaskBit18
+ PerfBitExcludeHost = CBitFieldMaskBit19
+ PerfBitExcludeGuest = CBitFieldMaskBit20
+ PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
+ PerfBitExcludeCallchainUser = CBitFieldMaskBit22
+ PerfBitMmap2 = CBitFieldMaskBit23
+ PerfBitCommExec = CBitFieldMaskBit24
+ PerfBitUseClockID = CBitFieldMaskBit25
+ PerfBitContextSwitch = CBitFieldMaskBit26
+)
+
+const (
+ PERF_TYPE_HARDWARE = 0x0
+ PERF_TYPE_SOFTWARE = 0x1
+ PERF_TYPE_TRACEPOINT = 0x2
+ PERF_TYPE_HW_CACHE = 0x3
+ PERF_TYPE_RAW = 0x4
+ PERF_TYPE_BREAKPOINT = 0x5
+
+ PERF_COUNT_HW_CPU_CYCLES = 0x0
+ PERF_COUNT_HW_INSTRUCTIONS = 0x1
+ PERF_COUNT_HW_CACHE_REFERENCES = 0x2
+ PERF_COUNT_HW_CACHE_MISSES = 0x3
+ PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
+ PERF_COUNT_HW_BRANCH_MISSES = 0x5
+ PERF_COUNT_HW_BUS_CYCLES = 0x6
+ PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
+ PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
+ PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
+
+ PERF_COUNT_HW_CACHE_L1D = 0x0
+ PERF_COUNT_HW_CACHE_L1I = 0x1
+ PERF_COUNT_HW_CACHE_LL = 0x2
+ PERF_COUNT_HW_CACHE_DTLB = 0x3
+ PERF_COUNT_HW_CACHE_ITLB = 0x4
+ PERF_COUNT_HW_CACHE_BPU = 0x5
+ PERF_COUNT_HW_CACHE_NODE = 0x6
+
+ PERF_COUNT_HW_CACHE_OP_READ = 0x0
+ PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
+ PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
+
+ PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
+ PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
+
+ PERF_COUNT_SW_CPU_CLOCK = 0x0
+ PERF_COUNT_SW_TASK_CLOCK = 0x1
+ PERF_COUNT_SW_PAGE_FAULTS = 0x2
+ PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
+ PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
+ PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
+ PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
+ PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
+ PERF_COUNT_SW_EMULATION_FAULTS = 0x8
+ PERF_COUNT_SW_DUMMY = 0x9
+
+ PERF_SAMPLE_IP = 0x1
+ PERF_SAMPLE_TID = 0x2
+ PERF_SAMPLE_TIME = 0x4
+ PERF_SAMPLE_ADDR = 0x8
+ PERF_SAMPLE_READ = 0x10
+ PERF_SAMPLE_CALLCHAIN = 0x20
+ PERF_SAMPLE_ID = 0x40
+ PERF_SAMPLE_CPU = 0x80
+ PERF_SAMPLE_PERIOD = 0x100
+ PERF_SAMPLE_STREAM_ID = 0x200
+ PERF_SAMPLE_RAW = 0x400
+ PERF_SAMPLE_BRANCH_STACK = 0x800
+
+ PERF_SAMPLE_BRANCH_USER = 0x1
+ PERF_SAMPLE_BRANCH_KERNEL = 0x2
+ PERF_SAMPLE_BRANCH_HV = 0x4
+ PERF_SAMPLE_BRANCH_ANY = 0x8
+ PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
+ PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
+ PERF_SAMPLE_BRANCH_IND_CALL = 0x40
+
+ PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
+ PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
+ PERF_FORMAT_ID = 0x4
+ PERF_FORMAT_GROUP = 0x8
+
+ PERF_RECORD_MMAP = 0x1
+ PERF_RECORD_LOST = 0x2
+ PERF_RECORD_COMM = 0x3
+ PERF_RECORD_EXIT = 0x4
+ PERF_RECORD_THROTTLE = 0x5
+ PERF_RECORD_UNTHROTTLE = 0x6
+ PERF_RECORD_FORK = 0x7
+ PERF_RECORD_READ = 0x8
+ PERF_RECORD_SAMPLE = 0x9
+
+ PERF_CONTEXT_HV = -0x20
+ PERF_CONTEXT_KERNEL = -0x80
+ PERF_CONTEXT_USER = -0x200
+
+ PERF_CONTEXT_GUEST = -0x800
+ PERF_CONTEXT_GUEST_KERNEL = -0x880
+ PERF_CONTEXT_GUEST_USER = -0xa00
+
+ PERF_FLAG_FD_NO_GROUP = 0x1
+ PERF_FLAG_FD_OUTPUT = 0x2
+ PERF_FLAG_PID_CGROUP = 0x4
+)
+
+const (
+ CBitFieldMaskBit0 = 0x1
+ CBitFieldMaskBit1 = 0x2
+ CBitFieldMaskBit2 = 0x4
+ CBitFieldMaskBit3 = 0x8
+ CBitFieldMaskBit4 = 0x10
+ CBitFieldMaskBit5 = 0x20
+ CBitFieldMaskBit6 = 0x40
+ CBitFieldMaskBit7 = 0x80
+ CBitFieldMaskBit8 = 0x100
+ CBitFieldMaskBit9 = 0x200
+ CBitFieldMaskBit10 = 0x400
+ CBitFieldMaskBit11 = 0x800
+ CBitFieldMaskBit12 = 0x1000
+ CBitFieldMaskBit13 = 0x2000
+ CBitFieldMaskBit14 = 0x4000
+ CBitFieldMaskBit15 = 0x8000
+ CBitFieldMaskBit16 = 0x10000
+ CBitFieldMaskBit17 = 0x20000
+ CBitFieldMaskBit18 = 0x40000
+ CBitFieldMaskBit19 = 0x80000
+ CBitFieldMaskBit20 = 0x100000
+ CBitFieldMaskBit21 = 0x200000
+ CBitFieldMaskBit22 = 0x400000
+ CBitFieldMaskBit23 = 0x800000
+ CBitFieldMaskBit24 = 0x1000000
+ CBitFieldMaskBit25 = 0x2000000
+ CBitFieldMaskBit26 = 0x4000000
+ CBitFieldMaskBit27 = 0x8000000
+ CBitFieldMaskBit28 = 0x10000000
+ CBitFieldMaskBit29 = 0x20000000
+ CBitFieldMaskBit30 = 0x40000000
+ CBitFieldMaskBit31 = 0x80000000
+ CBitFieldMaskBit32 = 0x100000000
+ CBitFieldMaskBit33 = 0x200000000
+ CBitFieldMaskBit34 = 0x400000000
+ CBitFieldMaskBit35 = 0x800000000
+ CBitFieldMaskBit36 = 0x1000000000
+ CBitFieldMaskBit37 = 0x2000000000
+ CBitFieldMaskBit38 = 0x4000000000
+ CBitFieldMaskBit39 = 0x8000000000
+ CBitFieldMaskBit40 = 0x10000000000
+ CBitFieldMaskBit41 = 0x20000000000
+ CBitFieldMaskBit42 = 0x40000000000
+ CBitFieldMaskBit43 = 0x80000000000
+ CBitFieldMaskBit44 = 0x100000000000
+ CBitFieldMaskBit45 = 0x200000000000
+ CBitFieldMaskBit46 = 0x400000000000
+ CBitFieldMaskBit47 = 0x800000000000
+ CBitFieldMaskBit48 = 0x1000000000000
+ CBitFieldMaskBit49 = 0x2000000000000
+ CBitFieldMaskBit50 = 0x4000000000000
+ CBitFieldMaskBit51 = 0x8000000000000
+ CBitFieldMaskBit52 = 0x10000000000000
+ CBitFieldMaskBit53 = 0x20000000000000
+ CBitFieldMaskBit54 = 0x40000000000000
+ CBitFieldMaskBit55 = 0x80000000000000
+ CBitFieldMaskBit56 = 0x100000000000000
+ CBitFieldMaskBit57 = 0x200000000000000
+ CBitFieldMaskBit58 = 0x400000000000000
+ CBitFieldMaskBit59 = 0x800000000000000
+ CBitFieldMaskBit60 = 0x1000000000000000
+ CBitFieldMaskBit61 = 0x2000000000000000
+ CBitFieldMaskBit62 = 0x4000000000000000
+ CBitFieldMaskBit63 = 0x8000000000000000
+)
+
+type SockaddrStorage struct {
+ Family uint16
+ _ [118]uint8
+ _ uint64
+}
+
+type TCPMD5Sig struct {
+ Addr SockaddrStorage
+ Flags uint8
+ Prefixlen uint8
+ Keylen uint16
+ _ uint32
+ Key [80]uint8
+}
+
+type HDDriveCmdHdr struct {
+ Command uint8
+ Number uint8
+ Feature uint8
+ Count uint8
+}
+
+type HDGeometry struct {
+ Heads uint8
+ Sectors uint8
+ Cylinders uint16
+ _ [4]byte
+ Start uint64
+}
+
+type HDDriveID struct {
+ Config uint16
+ Cyls uint16
+ Reserved2 uint16
+ Heads uint16
+ Track_bytes uint16
+ Sector_bytes uint16
+ Sectors uint16
+ Vendor0 uint16
+ Vendor1 uint16
+ Vendor2 uint16
+ Serial_no [20]uint8
+ Buf_type uint16
+ Buf_size uint16
+ Ecc_bytes uint16
+ Fw_rev [8]uint8
+ Model [40]uint8
+ Max_multsect uint8
+ Vendor3 uint8
+ Dword_io uint16
+ Vendor4 uint8
+ Capability uint8
+ Reserved50 uint16
+ Vendor5 uint8
+ TPIO uint8
+ Vendor6 uint8
+ TDMA uint8
+ Field_valid uint16
+ Cur_cyls uint16
+ Cur_heads uint16
+ Cur_sectors uint16
+ Cur_capacity0 uint16
+ Cur_capacity1 uint16
+ Multsect uint8
+ Multsect_valid uint8
+ Lba_capacity uint32
+ Dma_1word uint16
+ Dma_mword uint16
+ Eide_pio_modes uint16
+ Eide_dma_min uint16
+ Eide_dma_time uint16
+ Eide_pio uint16
+ Eide_pio_iordy uint16
+ Words69_70 [2]uint16
+ Words71_74 [4]uint16
+ Queue_depth uint16
+ Words76_79 [4]uint16
+ Major_rev_num uint16
+ Minor_rev_num uint16
+ Command_set_1 uint16
+ Command_set_2 uint16
+ Cfsse uint16
+ Cfs_enable_1 uint16
+ Cfs_enable_2 uint16
+ Csf_default uint16
+ Dma_ultra uint16
+ Trseuc uint16
+ TrsEuc uint16
+ CurAPMvalues uint16
+ Mprc uint16
+ Hw_config uint16
+ Acoustic uint16
+ Msrqs uint16
+ Sxfert uint16
+ Sal uint16
+ Spg uint32
+ Lba_capacity_2 uint64
+ Words104_125 [22]uint16
+ Last_lun uint16
+ Word127 uint16
+ Dlf uint16
+ Csfo uint16
+ Words130_155 [26]uint16
+ Word156 uint16
+ Words157_159 [3]uint16
+ Cfa_power uint16
+ Words161_175 [15]uint16
+ Words176_205 [30]uint16
+ Words206_254 [49]uint16
+ Integrity_word uint16
+}
+
+type Statfs_t struct {
+ Type int64
+ Bsize int64
+ Blocks uint64
+ Bfree uint64
+ Bavail uint64
+ Files uint64
+ Ffree uint64
+ Fsid Fsid
+ Namelen int64
+ Frsize int64
+ Flags int64
+ Spare [4]int64
+}
+
+const (
+ ST_MANDLOCK = 0x40
+ ST_NOATIME = 0x400
+ ST_NODEV = 0x4
+ ST_NODIRATIME = 0x800
+ ST_NOEXEC = 0x8
+ ST_NOSUID = 0x2
+ ST_RDONLY = 0x1
+ ST_RELATIME = 0x1000
+ ST_SYNCHRONOUS = 0x10
+)
+
+type TpacketHdr struct {
+ Status uint64
+ Len uint32
+ Snaplen uint32
+ Mac uint16
+ Net uint16
+ Sec uint32
+ Usec uint32
+ _ [4]byte
+}
+
+type Tpacket2Hdr struct {
+ Status uint32
+ Len uint32
+ Snaplen uint32
+ Mac uint16
+ Net uint16
+ Sec uint32
+ Nsec uint32
+ Vlan_tci uint16
+ Vlan_tpid uint16
+ _ [4]uint8
+}
+
+type Tpacket3Hdr struct {
+ Next_offset uint32
+ Sec uint32
+ Nsec uint32
+ Snaplen uint32
+ Len uint32
+ Status uint32
+ Mac uint16
+ Net uint16
+ Hv1 TpacketHdrVariant1
+ _ [8]uint8
+}
+
+type TpacketHdrVariant1 struct {
+ Rxhash uint32
+ Vlan_tci uint32
+ Vlan_tpid uint16
+ _ uint16
+}
+
+type TpacketBlockDesc struct {
+ Version uint32
+ To_priv uint32
+ Hdr [40]byte
+}
+
+type TpacketReq struct {
+ Block_size uint32
+ Block_nr uint32
+ Frame_size uint32
+ Frame_nr uint32
+}
+
+type TpacketReq3 struct {
+ Block_size uint32
+ Block_nr uint32
+ Frame_size uint32
+ Frame_nr uint32
+ Retire_blk_tov uint32
+ Sizeof_priv uint32
+ Feature_req_word uint32
+}
+
+type TpacketStats struct {
+ Packets uint32
+ Drops uint32
+}
+
+type TpacketStatsV3 struct {
+ Packets uint32
+ Drops uint32
+ Freeze_q_cnt uint32
+}
+
+type TpacketAuxdata struct {
+ Status uint32
+ Len uint32
+ Snaplen uint32
+ Mac uint16
+ Net uint16
+ Vlan_tci uint16
+ Vlan_tpid uint16
+}
+
+const (
+ TPACKET_V1 = 0x0
+ TPACKET_V2 = 0x1
+ TPACKET_V3 = 0x2
+)
+
+const (
+ SizeofTpacketHdr = 0x20
+ SizeofTpacket2Hdr = 0x20
+ SizeofTpacket3Hdr = 0x30
+)
+
+const (
+ NF_INET_PRE_ROUTING = 0x0
+ NF_INET_LOCAL_IN = 0x1
+ NF_INET_FORWARD = 0x2
+ NF_INET_LOCAL_OUT = 0x3
+ NF_INET_POST_ROUTING = 0x4
+ NF_INET_NUMHOOKS = 0x5
+)
+
+const (
+ NF_NETDEV_INGRESS = 0x0
+ NF_NETDEV_NUMHOOKS = 0x1
+)
+
+const (
+ NFPROTO_UNSPEC = 0x0
+ NFPROTO_INET = 0x1
+ NFPROTO_IPV4 = 0x2
+ NFPROTO_ARP = 0x3
+ NFPROTO_NETDEV = 0x5
+ NFPROTO_BRIDGE = 0x7
+ NFPROTO_IPV6 = 0xa
+ NFPROTO_DECNET = 0xc
+ NFPROTO_NUMPROTO = 0xd
+)
+
+type Nfgenmsg struct {
+ Nfgen_family uint8
+ Version uint8
+ Res_id uint16
+}
+
+const (
+ NFNL_BATCH_UNSPEC = 0x0
+ NFNL_BATCH_GENID = 0x1
+)
+
+const (
+ NFT_REG_VERDICT = 0x0
+ NFT_REG_1 = 0x1
+ NFT_REG_2 = 0x2
+ NFT_REG_3 = 0x3
+ NFT_REG_4 = 0x4
+ NFT_REG32_00 = 0x8
+ NFT_REG32_01 = 0x9
+ NFT_REG32_02 = 0xa
+ NFT_REG32_03 = 0xb
+ NFT_REG32_04 = 0xc
+ NFT_REG32_05 = 0xd
+ NFT_REG32_06 = 0xe
+ NFT_REG32_07 = 0xf
+ NFT_REG32_08 = 0x10
+ NFT_REG32_09 = 0x11
+ NFT_REG32_10 = 0x12
+ NFT_REG32_11 = 0x13
+ NFT_REG32_12 = 0x14
+ NFT_REG32_13 = 0x15
+ NFT_REG32_14 = 0x16
+ NFT_REG32_15 = 0x17
+ NFT_CONTINUE = -0x1
+ NFT_BREAK = -0x2
+ NFT_JUMP = -0x3
+ NFT_GOTO = -0x4
+ NFT_RETURN = -0x5
+ NFT_MSG_NEWTABLE = 0x0
+ NFT_MSG_GETTABLE = 0x1
+ NFT_MSG_DELTABLE = 0x2
+ NFT_MSG_NEWCHAIN = 0x3
+ NFT_MSG_GETCHAIN = 0x4
+ NFT_MSG_DELCHAIN = 0x5
+ NFT_MSG_NEWRULE = 0x6
+ NFT_MSG_GETRULE = 0x7
+ NFT_MSG_DELRULE = 0x8
+ NFT_MSG_NEWSET = 0x9
+ NFT_MSG_GETSET = 0xa
+ NFT_MSG_DELSET = 0xb
+ NFT_MSG_NEWSETELEM = 0xc
+ NFT_MSG_GETSETELEM = 0xd
+ NFT_MSG_DELSETELEM = 0xe
+ NFT_MSG_NEWGEN = 0xf
+ NFT_MSG_GETGEN = 0x10
+ NFT_MSG_TRACE = 0x11
+ NFT_MSG_NEWOBJ = 0x12
+ NFT_MSG_GETOBJ = 0x13
+ NFT_MSG_DELOBJ = 0x14
+ NFT_MSG_GETOBJ_RESET = 0x15
+ NFT_MSG_MAX = 0x19
+ NFTA_LIST_UNPEC = 0x0
+ NFTA_LIST_ELEM = 0x1
+ NFTA_HOOK_UNSPEC = 0x0
+ NFTA_HOOK_HOOKNUM = 0x1
+ NFTA_HOOK_PRIORITY = 0x2
+ NFTA_HOOK_DEV = 0x3
+ NFT_TABLE_F_DORMANT = 0x1
+ NFTA_TABLE_UNSPEC = 0x0
+ NFTA_TABLE_NAME = 0x1
+ NFTA_TABLE_FLAGS = 0x2
+ NFTA_TABLE_USE = 0x3
+ NFTA_CHAIN_UNSPEC = 0x0
+ NFTA_CHAIN_TABLE = 0x1
+ NFTA_CHAIN_HANDLE = 0x2
+ NFTA_CHAIN_NAME = 0x3
+ NFTA_CHAIN_HOOK = 0x4
+ NFTA_CHAIN_POLICY = 0x5
+ NFTA_CHAIN_USE = 0x6
+ NFTA_CHAIN_TYPE = 0x7
+ NFTA_CHAIN_COUNTERS = 0x8
+ NFTA_CHAIN_PAD = 0x9
+ NFTA_RULE_UNSPEC = 0x0
+ NFTA_RULE_TABLE = 0x1
+ NFTA_RULE_CHAIN = 0x2
+ NFTA_RULE_HANDLE = 0x3
+ NFTA_RULE_EXPRESSIONS = 0x4
+ NFTA_RULE_COMPAT = 0x5
+ NFTA_RULE_POSITION = 0x6
+ NFTA_RULE_USERDATA = 0x7
+ NFTA_RULE_PAD = 0x8
+ NFTA_RULE_ID = 0x9
+ NFT_RULE_COMPAT_F_INV = 0x2
+ NFT_RULE_COMPAT_F_MASK = 0x2
+ NFTA_RULE_COMPAT_UNSPEC = 0x0
+ NFTA_RULE_COMPAT_PROTO = 0x1
+ NFTA_RULE_COMPAT_FLAGS = 0x2
+ NFT_SET_ANONYMOUS = 0x1
+ NFT_SET_CONSTANT = 0x2
+ NFT_SET_INTERVAL = 0x4
+ NFT_SET_MAP = 0x8
+ NFT_SET_TIMEOUT = 0x10
+ NFT_SET_EVAL = 0x20
+ NFT_SET_OBJECT = 0x40
+ NFT_SET_POL_PERFORMANCE = 0x0
+ NFT_SET_POL_MEMORY = 0x1
+ NFTA_SET_DESC_UNSPEC = 0x0
+ NFTA_SET_DESC_SIZE = 0x1
+ NFTA_SET_UNSPEC = 0x0
+ NFTA_SET_TABLE = 0x1
+ NFTA_SET_NAME = 0x2
+ NFTA_SET_FLAGS = 0x3
+ NFTA_SET_KEY_TYPE = 0x4
+ NFTA_SET_KEY_LEN = 0x5
+ NFTA_SET_DATA_TYPE = 0x6
+ NFTA_SET_DATA_LEN = 0x7
+ NFTA_SET_POLICY = 0x8
+ NFTA_SET_DESC = 0x9
+ NFTA_SET_ID = 0xa
+ NFTA_SET_TIMEOUT = 0xb
+ NFTA_SET_GC_INTERVAL = 0xc
+ NFTA_SET_USERDATA = 0xd
+ NFTA_SET_PAD = 0xe
+ NFTA_SET_OBJ_TYPE = 0xf
+ NFT_SET_ELEM_INTERVAL_END = 0x1
+ NFTA_SET_ELEM_UNSPEC = 0x0
+ NFTA_SET_ELEM_KEY = 0x1
+ NFTA_SET_ELEM_DATA = 0x2
+ NFTA_SET_ELEM_FLAGS = 0x3
+ NFTA_SET_ELEM_TIMEOUT = 0x4
+ NFTA_SET_ELEM_EXPIRATION = 0x5
+ NFTA_SET_ELEM_USERDATA = 0x6
+ NFTA_SET_ELEM_EXPR = 0x7
+ NFTA_SET_ELEM_PAD = 0x8
+ NFTA_SET_ELEM_OBJREF = 0x9
+ NFTA_SET_ELEM_LIST_UNSPEC = 0x0
+ NFTA_SET_ELEM_LIST_TABLE = 0x1
+ NFTA_SET_ELEM_LIST_SET = 0x2
+ NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
+ NFTA_SET_ELEM_LIST_SET_ID = 0x4
+ NFT_DATA_VALUE = 0x0
+ NFT_DATA_VERDICT = 0xffffff00
+ NFTA_DATA_UNSPEC = 0x0
+ NFTA_DATA_VALUE = 0x1
+ NFTA_DATA_VERDICT = 0x2
+ NFTA_VERDICT_UNSPEC = 0x0
+ NFTA_VERDICT_CODE = 0x1
+ NFTA_VERDICT_CHAIN = 0x2
+ NFTA_EXPR_UNSPEC = 0x0
+ NFTA_EXPR_NAME = 0x1
+ NFTA_EXPR_DATA = 0x2
+ NFTA_IMMEDIATE_UNSPEC = 0x0
+ NFTA_IMMEDIATE_DREG = 0x1
+ NFTA_IMMEDIATE_DATA = 0x2
+ NFTA_BITWISE_UNSPEC = 0x0
+ NFTA_BITWISE_SREG = 0x1
+ NFTA_BITWISE_DREG = 0x2
+ NFTA_BITWISE_LEN = 0x3
+ NFTA_BITWISE_MASK = 0x4
+ NFTA_BITWISE_XOR = 0x5
+ NFT_BYTEORDER_NTOH = 0x0
+ NFT_BYTEORDER_HTON = 0x1
+ NFTA_BYTEORDER_UNSPEC = 0x0
+ NFTA_BYTEORDER_SREG = 0x1
+ NFTA_BYTEORDER_DREG = 0x2
+ NFTA_BYTEORDER_OP = 0x3
+ NFTA_BYTEORDER_LEN = 0x4
+ NFTA_BYTEORDER_SIZE = 0x5
+ NFT_CMP_EQ = 0x0
+ NFT_CMP_NEQ = 0x1
+ NFT_CMP_LT = 0x2
+ NFT_CMP_LTE = 0x3
+ NFT_CMP_GT = 0x4
+ NFT_CMP_GTE = 0x5
+ NFTA_CMP_UNSPEC = 0x0
+ NFTA_CMP_SREG = 0x1
+ NFTA_CMP_OP = 0x2
+ NFTA_CMP_DATA = 0x3
+ NFT_RANGE_EQ = 0x0
+ NFT_RANGE_NEQ = 0x1
+ NFTA_RANGE_UNSPEC = 0x0
+ NFTA_RANGE_SREG = 0x1
+ NFTA_RANGE_OP = 0x2
+ NFTA_RANGE_FROM_DATA = 0x3
+ NFTA_RANGE_TO_DATA = 0x4
+ NFT_LOOKUP_F_INV = 0x1
+ NFTA_LOOKUP_UNSPEC = 0x0
+ NFTA_LOOKUP_SET = 0x1
+ NFTA_LOOKUP_SREG = 0x2
+ NFTA_LOOKUP_DREG = 0x3
+ NFTA_LOOKUP_SET_ID = 0x4
+ NFTA_LOOKUP_FLAGS = 0x5
+ NFT_DYNSET_OP_ADD = 0x0
+ NFT_DYNSET_OP_UPDATE = 0x1
+ NFT_DYNSET_F_INV = 0x1
+ NFTA_DYNSET_UNSPEC = 0x0
+ NFTA_DYNSET_SET_NAME = 0x1
+ NFTA_DYNSET_SET_ID = 0x2
+ NFTA_DYNSET_OP = 0x3
+ NFTA_DYNSET_SREG_KEY = 0x4
+ NFTA_DYNSET_SREG_DATA = 0x5
+ NFTA_DYNSET_TIMEOUT = 0x6
+ NFTA_DYNSET_EXPR = 0x7
+ NFTA_DYNSET_PAD = 0x8
+ NFTA_DYNSET_FLAGS = 0x9
+ NFT_PAYLOAD_LL_HEADER = 0x0
+ NFT_PAYLOAD_NETWORK_HEADER = 0x1
+ NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
+ NFT_PAYLOAD_CSUM_NONE = 0x0
+ NFT_PAYLOAD_CSUM_INET = 0x1
+ NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
+ NFTA_PAYLOAD_UNSPEC = 0x0
+ NFTA_PAYLOAD_DREG = 0x1
+ NFTA_PAYLOAD_BASE = 0x2
+ NFTA_PAYLOAD_OFFSET = 0x3
+ NFTA_PAYLOAD_LEN = 0x4
+ NFTA_PAYLOAD_SREG = 0x5
+ NFTA_PAYLOAD_CSUM_TYPE = 0x6
+ NFTA_PAYLOAD_CSUM_OFFSET = 0x7
+ NFTA_PAYLOAD_CSUM_FLAGS = 0x8
+ NFT_EXTHDR_F_PRESENT = 0x1
+ NFT_EXTHDR_OP_IPV6 = 0x0
+ NFT_EXTHDR_OP_TCPOPT = 0x1
+ NFTA_EXTHDR_UNSPEC = 0x0
+ NFTA_EXTHDR_DREG = 0x1
+ NFTA_EXTHDR_TYPE = 0x2
+ NFTA_EXTHDR_OFFSET = 0x3
+ NFTA_EXTHDR_LEN = 0x4
+ NFTA_EXTHDR_FLAGS = 0x5
+ NFTA_EXTHDR_OP = 0x6
+ NFTA_EXTHDR_SREG = 0x7
+ NFT_META_LEN = 0x0
+ NFT_META_PROTOCOL = 0x1
+ NFT_META_PRIORITY = 0x2
+ NFT_META_MARK = 0x3
+ NFT_META_IIF = 0x4
+ NFT_META_OIF = 0x5
+ NFT_META_IIFNAME = 0x6
+ NFT_META_OIFNAME = 0x7
+ NFT_META_IIFTYPE = 0x8
+ NFT_META_OIFTYPE = 0x9
+ NFT_META_SKUID = 0xa
+ NFT_META_SKGID = 0xb
+ NFT_META_NFTRACE = 0xc
+ NFT_META_RTCLASSID = 0xd
+ NFT_META_SECMARK = 0xe
+ NFT_META_NFPROTO = 0xf
+ NFT_META_L4PROTO = 0x10
+ NFT_META_BRI_IIFNAME = 0x11
+ NFT_META_BRI_OIFNAME = 0x12
+ NFT_META_PKTTYPE = 0x13
+ NFT_META_CPU = 0x14
+ NFT_META_IIFGROUP = 0x15
+ NFT_META_OIFGROUP = 0x16
+ NFT_META_CGROUP = 0x17
+ NFT_META_PRANDOM = 0x18
+ NFT_RT_CLASSID = 0x0
+ NFT_RT_NEXTHOP4 = 0x1
+ NFT_RT_NEXTHOP6 = 0x2
+ NFT_RT_TCPMSS = 0x3
+ NFT_HASH_JENKINS = 0x0
+ NFT_HASH_SYM = 0x1
+ NFTA_HASH_UNSPEC = 0x0
+ NFTA_HASH_SREG = 0x1
+ NFTA_HASH_DREG = 0x2
+ NFTA_HASH_LEN = 0x3
+ NFTA_HASH_MODULUS = 0x4
+ NFTA_HASH_SEED = 0x5
+ NFTA_HASH_OFFSET = 0x6
+ NFTA_HASH_TYPE = 0x7
+ NFTA_META_UNSPEC = 0x0
+ NFTA_META_DREG = 0x1
+ NFTA_META_KEY = 0x2
+ NFTA_META_SREG = 0x3
+ NFTA_RT_UNSPEC = 0x0
+ NFTA_RT_DREG = 0x1
+ NFTA_RT_KEY = 0x2
+ NFT_CT_STATE = 0x0
+ NFT_CT_DIRECTION = 0x1
+ NFT_CT_STATUS = 0x2
+ NFT_CT_MARK = 0x3
+ NFT_CT_SECMARK = 0x4
+ NFT_CT_EXPIRATION = 0x5
+ NFT_CT_HELPER = 0x6
+ NFT_CT_L3PROTOCOL = 0x7
+ NFT_CT_SRC = 0x8
+ NFT_CT_DST = 0x9
+ NFT_CT_PROTOCOL = 0xa
+ NFT_CT_PROTO_SRC = 0xb
+ NFT_CT_PROTO_DST = 0xc
+ NFT_CT_LABELS = 0xd
+ NFT_CT_PKTS = 0xe
+ NFT_CT_BYTES = 0xf
+ NFT_CT_AVGPKT = 0x10
+ NFT_CT_ZONE = 0x11
+ NFT_CT_EVENTMASK = 0x12
+ NFTA_CT_UNSPEC = 0x0
+ NFTA_CT_DREG = 0x1
+ NFTA_CT_KEY = 0x2
+ NFTA_CT_DIRECTION = 0x3
+ NFTA_CT_SREG = 0x4
+ NFT_LIMIT_PKTS = 0x0
+ NFT_LIMIT_PKT_BYTES = 0x1
+ NFT_LIMIT_F_INV = 0x1
+ NFTA_LIMIT_UNSPEC = 0x0
+ NFTA_LIMIT_RATE = 0x1
+ NFTA_LIMIT_UNIT = 0x2
+ NFTA_LIMIT_BURST = 0x3
+ NFTA_LIMIT_TYPE = 0x4
+ NFTA_LIMIT_FLAGS = 0x5
+ NFTA_LIMIT_PAD = 0x6
+ NFTA_COUNTER_UNSPEC = 0x0
+ NFTA_COUNTER_BYTES = 0x1
+ NFTA_COUNTER_PACKETS = 0x2
+ NFTA_COUNTER_PAD = 0x3
+ NFTA_LOG_UNSPEC = 0x0
+ NFTA_LOG_GROUP = 0x1
+ NFTA_LOG_PREFIX = 0x2
+ NFTA_LOG_SNAPLEN = 0x3
+ NFTA_LOG_QTHRESHOLD = 0x4
+ NFTA_LOG_LEVEL = 0x5
+ NFTA_LOG_FLAGS = 0x6
+ NFTA_QUEUE_UNSPEC = 0x0
+ NFTA_QUEUE_NUM = 0x1
+ NFTA_QUEUE_TOTAL = 0x2
+ NFTA_QUEUE_FLAGS = 0x3
+ NFTA_QUEUE_SREG_QNUM = 0x4
+ NFT_QUOTA_F_INV = 0x1
+ NFT_QUOTA_F_DEPLETED = 0x2
+ NFTA_QUOTA_UNSPEC = 0x0
+ NFTA_QUOTA_BYTES = 0x1
+ NFTA_QUOTA_FLAGS = 0x2
+ NFTA_QUOTA_PAD = 0x3
+ NFTA_QUOTA_CONSUMED = 0x4
+ NFT_REJECT_ICMP_UNREACH = 0x0
+ NFT_REJECT_TCP_RST = 0x1
+ NFT_REJECT_ICMPX_UNREACH = 0x2
+ NFT_REJECT_ICMPX_NO_ROUTE = 0x0
+ NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
+ NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
+ NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
+ NFTA_REJECT_UNSPEC = 0x0
+ NFTA_REJECT_TYPE = 0x1
+ NFTA_REJECT_ICMP_CODE = 0x2
+ NFT_NAT_SNAT = 0x0
+ NFT_NAT_DNAT = 0x1
+ NFTA_NAT_UNSPEC = 0x0
+ NFTA_NAT_TYPE = 0x1
+ NFTA_NAT_FAMILY = 0x2
+ NFTA_NAT_REG_ADDR_MIN = 0x3
+ NFTA_NAT_REG_ADDR_MAX = 0x4
+ NFTA_NAT_REG_PROTO_MIN = 0x5
+ NFTA_NAT_REG_PROTO_MAX = 0x6
+ NFTA_NAT_FLAGS = 0x7
+ NFTA_MASQ_UNSPEC = 0x0
+ NFTA_MASQ_FLAGS = 0x1
+ NFTA_MASQ_REG_PROTO_MIN = 0x2
+ NFTA_MASQ_REG_PROTO_MAX = 0x3
+ NFTA_REDIR_UNSPEC = 0x0
+ NFTA_REDIR_REG_PROTO_MIN = 0x1
+ NFTA_REDIR_REG_PROTO_MAX = 0x2
+ NFTA_REDIR_FLAGS = 0x3
+ NFTA_DUP_UNSPEC = 0x0
+ NFTA_DUP_SREG_ADDR = 0x1
+ NFTA_DUP_SREG_DEV = 0x2
+ NFTA_FWD_UNSPEC = 0x0
+ NFTA_FWD_SREG_DEV = 0x1
+ NFTA_OBJREF_UNSPEC = 0x0
+ NFTA_OBJREF_IMM_TYPE = 0x1
+ NFTA_OBJREF_IMM_NAME = 0x2
+ NFTA_OBJREF_SET_SREG = 0x3
+ NFTA_OBJREF_SET_NAME = 0x4
+ NFTA_OBJREF_SET_ID = 0x5
+ NFTA_GEN_UNSPEC = 0x0
+ NFTA_GEN_ID = 0x1
+ NFTA_GEN_PROC_PID = 0x2
+ NFTA_GEN_PROC_NAME = 0x3
+ NFTA_FIB_UNSPEC = 0x0
+ NFTA_FIB_DREG = 0x1
+ NFTA_FIB_RESULT = 0x2
+ NFTA_FIB_FLAGS = 0x3
+ NFT_FIB_RESULT_UNSPEC = 0x0
+ NFT_FIB_RESULT_OIF = 0x1
+ NFT_FIB_RESULT_OIFNAME = 0x2
+ NFT_FIB_RESULT_ADDRTYPE = 0x3
+ NFTA_FIB_F_SADDR = 0x1
+ NFTA_FIB_F_DADDR = 0x2
+ NFTA_FIB_F_MARK = 0x4
+ NFTA_FIB_F_IIF = 0x8
+ NFTA_FIB_F_OIF = 0x10
+ NFTA_FIB_F_PRESENT = 0x20
+ NFTA_CT_HELPER_UNSPEC = 0x0
+ NFTA_CT_HELPER_NAME = 0x1
+ NFTA_CT_HELPER_L3PROTO = 0x2
+ NFTA_CT_HELPER_L4PROTO = 0x3
+ NFTA_OBJ_UNSPEC = 0x0
+ NFTA_OBJ_TABLE = 0x1
+ NFTA_OBJ_NAME = 0x2
+ NFTA_OBJ_TYPE = 0x3
+ NFTA_OBJ_DATA = 0x4
+ NFTA_OBJ_USE = 0x5
+ NFTA_TRACE_UNSPEC = 0x0
+ NFTA_TRACE_TABLE = 0x1
+ NFTA_TRACE_CHAIN = 0x2
+ NFTA_TRACE_RULE_HANDLE = 0x3
+ NFTA_TRACE_TYPE = 0x4
+ NFTA_TRACE_VERDICT = 0x5
+ NFTA_TRACE_ID = 0x6
+ NFTA_TRACE_LL_HEADER = 0x7
+ NFTA_TRACE_NETWORK_HEADER = 0x8
+ NFTA_TRACE_TRANSPORT_HEADER = 0x9
+ NFTA_TRACE_IIF = 0xa
+ NFTA_TRACE_IIFTYPE = 0xb
+ NFTA_TRACE_OIF = 0xc
+ NFTA_TRACE_OIFTYPE = 0xd
+ NFTA_TRACE_MARK = 0xe
+ NFTA_TRACE_NFPROTO = 0xf
+ NFTA_TRACE_POLICY = 0x10
+ NFTA_TRACE_PAD = 0x11
+ NFT_TRACETYPE_UNSPEC = 0x0
+ NFT_TRACETYPE_POLICY = 0x1
+ NFT_TRACETYPE_RETURN = 0x2
+ NFT_TRACETYPE_RULE = 0x3
+ NFTA_NG_UNSPEC = 0x0
+ NFTA_NG_DREG = 0x1
+ NFTA_NG_MODULUS = 0x2
+ NFTA_NG_TYPE = 0x3
+ NFTA_NG_OFFSET = 0x4
+ NFT_NG_INCREMENTAL = 0x0
+ NFT_NG_RANDOM = 0x1
+)
+
+type RTCTime struct {
+ Sec int32
+ Min int32
+ Hour int32
+ Mday int32
+ Mon int32
+ Year int32
+ Wday int32
+ Yday int32
+ Isdst int32
+}
+
+type RTCWkAlrm struct {
+ Enabled uint8
+ Pending uint8
+ _ [2]byte
+ Time RTCTime
+}
+
+type RTCPLLInfo struct {
+ Ctrl int32
+ Value int32
+ Max int32
+ Min int32
+ Posmult int32
+ Negmult int32
+ Clock int64
+}
+
+type BlkpgIoctlArg struct {
+ Op int32
+ Flags int32
+ Datalen int32
+ _ [4]byte
+ Data *byte
+}
+
+type BlkpgPartition struct {
+ Start int64
+ Length int64
+ Pno int32
+ Devname [64]uint8
+ Volname [64]uint8
+ _ [4]byte
+}
+
+const (
+ BLKPG = 0x1269
+ BLKPG_ADD_PARTITION = 0x1
+ BLKPG_DEL_PARTITION = 0x2
+ BLKPG_RESIZE_PARTITION = 0x3
+)
+
+const (
+ NETNSA_NONE = 0x0
+ NETNSA_NSID = 0x1
+ NETNSA_PID = 0x2
+ NETNSA_FD = 0x3
+)
+
+type XDPRingOffset struct {
+ Producer uint64
+ Consumer uint64
+ Desc uint64
+}
+
+type XDPMmapOffsets struct {
+ Rx XDPRingOffset
+ Tx XDPRingOffset
+ Fr XDPRingOffset
+ Cr XDPRingOffset
+}
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+}
+
+type XDPStatistics struct {
+ Rx_dropped uint64
+ Rx_invalid_descs uint64
+ Tx_invalid_descs uint64
+}
+
+type XDPDesc struct {
+ Addr uint64
+ Len uint32
+ Options uint32
+}
+
+const (
+ NCSI_CMD_UNSPEC = 0x0
+ NCSI_CMD_PKG_INFO = 0x1
+ NCSI_CMD_SET_INTERFACE = 0x2
+ NCSI_CMD_CLEAR_INTERFACE = 0x3
+ NCSI_ATTR_UNSPEC = 0x0
+ NCSI_ATTR_IFINDEX = 0x1
+ NCSI_ATTR_PACKAGE_LIST = 0x2
+ NCSI_ATTR_PACKAGE_ID = 0x3
+ NCSI_ATTR_CHANNEL_ID = 0x4
+ NCSI_PKG_ATTR_UNSPEC = 0x0
+ NCSI_PKG_ATTR = 0x1
+ NCSI_PKG_ATTR_ID = 0x2
+ NCSI_PKG_ATTR_FORCED = 0x3
+ NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
+ NCSI_CHANNEL_ATTR_UNSPEC = 0x0
+ NCSI_CHANNEL_ATTR = 0x1
+ NCSI_CHANNEL_ATTR_ID = 0x2
+ NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
+ NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
+ NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
+ NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
+ NCSI_CHANNEL_ATTR_ACTIVE = 0x7
+ NCSI_CHANNEL_ATTR_FORCED = 0x8
+ NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
+ NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
+)
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 898ac4514..6b27e16b5 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -280,6 +280,14 @@ type RawSockaddrVM struct {
Zero [4]uint8
}
+type RawSockaddrXDP struct {
+ Family uint16
+ Flags uint16
+ Ifindex uint32
+ Queue_id uint32
+ Shared_umem_fd uint32
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -416,6 +424,7 @@ const (
SizeofSockaddrCAN = 0x10
SizeofSockaddrALG = 0x58
SizeofSockaddrVM = 0x10
+ SizeofSockaddrXDP = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
@@ -514,6 +523,20 @@ const (
RTA_FLOW = 0xb
RTA_CACHEINFO = 0xc
RTA_TABLE = 0xf
+ RTA_MARK = 0x10
+ RTA_MFC_STATS = 0x11
+ RTA_VIA = 0x12
+ RTA_NEWDST = 0x13
+ RTA_PREF = 0x14
+ RTA_ENCAP_TYPE = 0x15
+ RTA_ENCAP = 0x16
+ RTA_EXPIRES = 0x17
+ RTA_PAD = 0x18
+ RTA_UID = 0x19
+ RTA_TTL_PROPAGATE = 0x1a
+ RTA_IP_PROTO = 0x1b
+ RTA_SPORT = 0x1c
+ RTA_DPORT = 0x1d
RTN_UNSPEC = 0x0
RTN_UNICAST = 0x1
RTN_LOCAL = 0x2
@@ -1910,3 +1933,63 @@ const (
NETNSA_PID = 0x2
NETNSA_FD = 0x3
)
+
+type XDPRingOffset struct {
+ Producer uint64
+ Consumer uint64
+ Desc uint64
+}
+
+type XDPMmapOffsets struct {
+ Rx XDPRingOffset
+ Tx XDPRingOffset
+ Fr XDPRingOffset
+ Cr XDPRingOffset
+}
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+}
+
+type XDPStatistics struct {
+ Rx_dropped uint64
+ Rx_invalid_descs uint64
+ Tx_invalid_descs uint64
+}
+
+type XDPDesc struct {
+ Addr uint64
+ Len uint32
+ Options uint32
+}
+
+const (
+ NCSI_CMD_UNSPEC = 0x0
+ NCSI_CMD_PKG_INFO = 0x1
+ NCSI_CMD_SET_INTERFACE = 0x2
+ NCSI_CMD_CLEAR_INTERFACE = 0x3
+ NCSI_ATTR_UNSPEC = 0x0
+ NCSI_ATTR_IFINDEX = 0x1
+ NCSI_ATTR_PACKAGE_LIST = 0x2
+ NCSI_ATTR_PACKAGE_ID = 0x3
+ NCSI_ATTR_CHANNEL_ID = 0x4
+ NCSI_PKG_ATTR_UNSPEC = 0x0
+ NCSI_PKG_ATTR = 0x1
+ NCSI_PKG_ATTR_ID = 0x2
+ NCSI_PKG_ATTR_FORCED = 0x3
+ NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
+ NCSI_CHANNEL_ATTR_UNSPEC = 0x0
+ NCSI_CHANNEL_ATTR = 0x1
+ NCSI_CHANNEL_ATTR_ID = 0x2
+ NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
+ NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
+ NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
+ NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
+ NCSI_CHANNEL_ATTR_ACTIVE = 0x7
+ NCSI_CHANNEL_ATTR_FORCED = 0x8
+ NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
+ NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
index 4b86fb2b3..9e9088de1 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
@@ -446,3 +446,13 @@ type Utsname struct {
Version [256]byte
Machine [256]byte
}
+
+const SizeofClockinfo = 0x14
+
+type Clockinfo struct {
+ Hz int32
+ Tick int32
+ Tickadj int32
+ Stathz int32
+ Profhz int32
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
index 9048a509d..ed3f17366 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
@@ -453,3 +453,13 @@ type Utsname struct {
Version [256]byte
Machine [256]byte
}
+
+const SizeofClockinfo = 0x14
+
+type Clockinfo struct {
+ Hz int32
+ Tick int32
+ Tickadj int32
+ Stathz int32
+ Profhz int32
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
index 00525e7b0..d263b6147 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
@@ -451,3 +451,13 @@ type Utsname struct {
Version [256]byte
Machine [256]byte
}
+
+const SizeofClockinfo = 0x14
+
+type Clockinfo struct {
+ Hz int32
+ Tick int32
+ Tickadj int32
+ Stathz int32
+ Profhz int32
+}
diff --git a/vendor/golang.org/x/sys/windows/asm_windows_arm.s b/vendor/golang.org/x/sys/windows/asm_windows_arm.s
new file mode 100644
index 000000000..55d8b91a2
--- /dev/null
+++ b/vendor/golang.org/x/sys/windows/asm_windows_arm.s
@@ -0,0 +1,11 @@
+// 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/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go
index fd89e08e2..8a00b71f1 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -655,7 +655,7 @@ type RawSockaddr struct {
type RawSockaddrAny struct {
Addr RawSockaddr
- Pad [96]int8
+ Pad [100]int8
}
type Sockaddr interface {
@@ -704,19 +704,69 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, int32, error) {
return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil
}
+type RawSockaddrUnix struct {
+ Family uint16
+ Path [UNIX_PATH_MAX]int8
+}
+
type SockaddrUnix struct {
Name string
+ raw RawSockaddrUnix
}
func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, int32, error) {
- // TODO(brainman): implement SockaddrUnix.sockaddr()
- return nil, 0, syscall.EWINDOWS
+ name := sa.Name
+ n := len(name)
+ if n > len(sa.raw.Path) {
+ return nil, 0, syscall.EINVAL
+ }
+ if n == len(sa.raw.Path) && name[0] != '@' {
+ return nil, 0, syscall.EINVAL
+ }
+ sa.raw.Family = AF_UNIX
+ for i := 0; i < n; i++ {
+ sa.raw.Path[i] = int8(name[i])
+ }
+ // length is family (uint16), name, NUL.
+ sl := int32(2)
+ if n > 0 {
+ sl += int32(n) + 1
+ }
+ if sa.raw.Path[0] == '@' {
+ sa.raw.Path[0] = 0
+ // Don't count trailing NUL for abstract address.
+ sl--
+ }
+
+ return unsafe.Pointer(&sa.raw), sl, nil
}
func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) {
switch rsa.Addr.Family {
case AF_UNIX:
- return nil, syscall.EWINDOWS
+ pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
+ sa := new(SockaddrUnix)
+ if pp.Path[0] == 0 {
+ // "Abstract" Unix domain socket.
+ // Rewrite leading NUL as @ for textual display.
+ // (This is the standard convention.)
+ // Not friendly to overwrite in place,
+ // but the callers below don't care.
+ pp.Path[0] = '@'
+ }
+
+ // Assume path ends at NUL.
+ // This is not technically the Linux semantics for
+ // abstract Unix domain sockets--they are supposed
+ // to be uninterpreted fixed-size binary blobs--but
+ // everyone uses this convention.
+ n := 0
+ for n < len(pp.Path) && pp.Path[n] != 0 {
+ n++
+ }
+ bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
+ sa.Name = string(bytes)
+ return sa, nil
case AF_INET:
pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go
index 7f8b3af48..141ca81bd 100644
--- a/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/vendor/golang.org/x/sys/windows/types_windows.go
@@ -1453,7 +1453,7 @@ type SmallRect struct {
Bottom int16
}
-// Used with GetConsoleScreenBuffer to retreive information about a console
+// Used with GetConsoleScreenBuffer to retrieve information about a console
// screen buffer. See
// https://docs.microsoft.com/en-us/windows/console/console-screen-buffer-info-str
// for details.
@@ -1465,3 +1465,5 @@ type ConsoleScreenBufferInfo struct {
Window SmallRect
MaximumWindowSize Coord
}
+
+const UNIX_PATH_MAX = 108 // defined in afunix.h
diff --git a/vendor/golang.org/x/sys/windows/types_windows_arm.go b/vendor/golang.org/x/sys/windows/types_windows_arm.go
new file mode 100644
index 000000000..74571e360
--- /dev/null
+++ b/vendor/golang.org/x/sys/windows/types_windows_arm.go
@@ -0,0 +1,22 @@
+// 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.
+
+package windows
+
+type WSAData struct {
+ Version uint16
+ HighVersion uint16
+ Description [WSADESCRIPTION_LEN + 1]byte
+ SystemStatus [WSASYS_STATUS_LEN + 1]byte
+ MaxSockets uint16
+ MaxUdpDg uint16
+ VendorInfo *byte
+}
+
+type Servent struct {
+ Name *byte
+ Aliases **byte
+ Port uint16
+ Proto *byte
+}
diff --git a/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go b/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go
index 7bfe37a3d..d13bcbaf4 100644
--- a/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go
+++ b/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go
@@ -1,12 +1,14 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/rpc/status.proto
-package status // import "google.golang.org/genproto/googleapis/rpc/status"
+package status
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import any "github.com/golang/protobuf/ptypes/any"
+import (
+ fmt "fmt"
+ proto "github.com/golang/protobuf/proto"
+ any "github.com/golang/protobuf/ptypes/any"
+ math "math"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -90,16 +92,17 @@ func (m *Status) Reset() { *m = Status{} }
func (m *Status) String() string { return proto.CompactTextString(m) }
func (*Status) ProtoMessage() {}
func (*Status) Descriptor() ([]byte, []int) {
- return fileDescriptor_status_c6e4de62dcdf2edf, []int{0}
+ return fileDescriptor_24d244abaf643bfe, []int{0}
}
+
func (m *Status) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Status.Unmarshal(m, b)
}
func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Status.Marshal(b, m, deterministic)
}
-func (dst *Status) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Status.Merge(dst, src)
+func (m *Status) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Status.Merge(m, src)
}
func (m *Status) XXX_Size() int {
return xxx_messageInfo_Status.Size(m)
@@ -135,9 +138,9 @@ func init() {
proto.RegisterType((*Status)(nil), "google.rpc.Status")
}
-func init() { proto.RegisterFile("google/rpc/status.proto", fileDescriptor_status_c6e4de62dcdf2edf) }
+func init() { proto.RegisterFile("google/rpc/status.proto", fileDescriptor_24d244abaf643bfe) }
-var fileDescriptor_status_c6e4de62dcdf2edf = []byte{
+var fileDescriptor_24d244abaf643bfe = []byte{
// 209 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0xcf, 0xcf, 0x4f,
0xcf, 0x49, 0xd5, 0x2f, 0x2a, 0x48, 0xd6, 0x2f, 0x2e, 0x49, 0x2c, 0x29, 0x2d, 0xd6, 0x2b, 0x28,
diff --git a/vendor/google.golang.org/grpc/.travis.yml b/vendor/google.golang.org/grpc/.travis.yml
index 5b5bfb13d..fa501a990 100644
--- a/vendor/google.golang.org/grpc/.travis.yml
+++ b/vendor/google.golang.org/grpc/.travis.yml
@@ -2,33 +2,37 @@ language: go
matrix:
include:
+ - go: 1.11.x
+ env: VET=1 GO111MODULE=on
+ - go: 1.11.x
+ env: RACE=1 GO111MODULE=on
+ - go: 1.11.x
+ env: RUN386=1
+ - go: 1.11.x
+ env: GRPC_GO_RETRY=on
- go: 1.10.x
- env: VET=1 RACE=1
- - go: 1.6.x
- - go: 1.7.x
- - go: 1.8.x
- go: 1.9.x
- go: 1.9.x
env: GAE=1
- - go: 1.10.x
- env: RUN386=1
- - go: 1.10.x
- env: GRPC_GO_RETRY=on
+ - go: 1.8.x
+ - go: 1.6.x
go_import_path: google.golang.org/grpc
before_install:
- - if [[ -n "$RUN386" ]]; then export GOARCH=386; fi
- - if [[ "$TRAVIS_EVENT_TYPE" = "cron" && -z "$RUN386" ]]; then RACE=1; fi
- - if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]]; then VET_SKIP_PROTO=1; fi
+ - if [[ "${GO111MODULE}" = "on" ]]; then mkdir "${HOME}/go"; export GOPATH="${HOME}/go"; fi
+ - if [[ -n "${RUN386}" ]]; then export GOARCH=386; fi
+ - if [[ "${TRAVIS_EVENT_TYPE}" = "cron" && -z "${RUN386}" ]]; then RACE=1; fi
+ - if [[ "${TRAVIS_EVENT_TYPE}" != "cron" ]]; then VET_SKIP_PROTO=1; fi
install:
- - if [[ "$GAE" = 1 ]]; then source ./install_gae.sh; fi
- - if [[ "$VET" = 1 ]]; then ./vet.sh -install; fi
+ - if [[ "${GO111MODULE}" = "on" ]]; then go mod download; else make testdeps; fi
+ - if [[ "${GAE}" = 1 ]]; then source ./install_gae.sh; make testappenginedeps; fi
+ - if [[ "${VET}" = 1 ]]; then ./vet.sh -install; fi
script:
- set -e
- - if [[ "$GAE" = 1 ]]; then make testappengine; exit 0; fi
- - if [[ "$VET" = 1 ]]; then ./vet.sh; fi
+ - if [[ "${VET}" = 1 ]]; then ./vet.sh; fi
+ - if [[ "${GAE}" = 1 ]]; then make testappengine; exit 0; fi
+ - if [[ "${RACE}" = 1 ]]; then make testrace; exit 0; fi
- make test
- - if [[ "$RACE" = 1 ]]; then make testrace; fi
diff --git a/vendor/google.golang.org/grpc/Makefile b/vendor/google.golang.org/grpc/Makefile
index 50454530f..eb2d2a7cf 100644
--- a/vendor/google.golang.org/grpc/Makefile
+++ b/vendor/google.golang.org/grpc/Makefile
@@ -1,23 +1,14 @@
-all: vet test testrace
-
-deps:
- go get -d -v google.golang.org/grpc/...
-
-updatedeps:
- go get -d -v -u -f google.golang.org/grpc/...
-
-testdeps:
- go get -d -v -t google.golang.org/grpc/...
-
-testgaedeps:
- goapp get -d -v -t -tags 'appengine appenginevm' google.golang.org/grpc/...
-
-updatetestdeps:
- go get -d -v -t -u -f google.golang.org/grpc/...
+all: vet test testrace testappengine
build: deps
go build google.golang.org/grpc/...
+clean:
+ go clean -i google.golang.org/grpc/...
+
+deps:
+ go get -d -v google.golang.org/grpc/...
+
proto:
@ if ! which protoc > /dev/null; then \
echo "error: protoc not installed" >&2; \
@@ -25,31 +16,45 @@ proto:
fi
go generate google.golang.org/grpc/...
-vet:
- ./vet.sh
-
test: testdeps
go test -cpu 1,4 -timeout 5m google.golang.org/grpc/...
+testappengine: testappenginedeps
+ goapp test -cpu 1,4 -timeout 5m google.golang.org/grpc/...
+
+testappenginedeps:
+ goapp get -d -v -t -tags 'appengine appenginevm' google.golang.org/grpc/...
+
+testdeps:
+ go get -d -v -t google.golang.org/grpc/...
+
testrace: testdeps
go test -race -cpu 1,4 -timeout 7m google.golang.org/grpc/...
-testappengine: testgaedeps
- goapp test -cpu 1,4 -timeout 5m google.golang.org/grpc/...
+updatedeps:
+ go get -d -v -u -f google.golang.org/grpc/...
-clean:
- go clean -i google.golang.org/grpc/...
+updatetestdeps:
+ go get -d -v -t -u -f google.golang.org/grpc/...
+
+vet: vetdeps
+ ./vet.sh
+
+vetdeps:
+ ./vet.sh -install
.PHONY: \
all \
- deps \
- updatedeps \
- testdeps \
- testgaedeps \
- updatetestdeps \
build \
+ clean \
+ deps \
proto \
- vet \
test \
+ testappengine \
+ testappenginedeps \
+ testdeps \
testrace \
- clean
+ updatedeps \
+ updatetestdeps \
+ vet \
+ vetdeps
diff --git a/vendor/google.golang.org/grpc/balancer.go b/vendor/google.golang.org/grpc/balancer.go
index e1730166c..5aeb646d1 100644
--- a/vendor/google.golang.org/grpc/balancer.go
+++ b/vendor/google.golang.org/grpc/balancer.go
@@ -19,7 +19,6 @@
package grpc
import (
- "fmt"
"net"
"sync"
@@ -118,26 +117,6 @@ type Balancer interface {
Close() error
}
-// downErr implements net.Error. It is constructed by gRPC internals and passed to the down
-// call of Balancer.
-type downErr struct {
- timeout bool
- temporary bool
- desc string
-}
-
-func (e downErr) Error() string { return e.desc }
-func (e downErr) Timeout() bool { return e.timeout }
-func (e downErr) Temporary() bool { return e.temporary }
-
-func downErrorf(timeout, temporary bool, format string, a ...interface{}) downErr {
- return downErr{
- timeout: timeout,
- temporary: temporary,
- desc: fmt.Sprintf(format, a...),
- }
-}
-
// RoundRobin returns a Balancer that selects addresses round-robin. It uses r to watch
// the name resolution updates and updates the addresses available correspondingly.
//
@@ -410,7 +389,3 @@ func (rr *roundRobin) Close() error {
type pickFirst struct {
*roundRobin
}
-
-func pickFirstBalancerV1(r naming.Resolver) Balancer {
- return &pickFirst{&roundRobin{r: r}}
-}
diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go
index 9b035e8f5..318ac4073 100644
--- a/vendor/google.golang.org/grpc/clientconn.go
+++ b/vendor/google.golang.org/grpc/clientconn.go
@@ -65,8 +65,6 @@ var (
errConnDrain = errors.New("grpc: the connection is drained")
// errConnClosing indicates that the connection is closing.
errConnClosing = errors.New("grpc: the connection is closing")
- // errConnUnavailable indicates that the connection is unavailable.
- errConnUnavailable = errors.New("grpc: the connection is unavailable")
// errBalancerClosed indicates that the balancer is closed.
errBalancerClosed = errors.New("grpc: balancer is closed")
// We use an accessor so that minConnectTimeout can be
@@ -89,8 +87,6 @@ var (
// errCredentialsConflict indicates that grpc.WithTransportCredentials()
// and grpc.WithInsecure() are both called for a connection.
errCredentialsConflict = errors.New("grpc: transport credentials are set for an insecure connection (grpc.WithTransportCredentials() and grpc.WithInsecure() are both called)")
- // errNetworkIO indicates that the connection is down due to some network I/O error.
- errNetworkIO = errors.New("grpc: failed with network I/O error")
)
const (
@@ -101,12 +97,6 @@ const (
defaultReadBufSize = 32 * 1024
)
-// RegisterChannelz turns on channelz service.
-// This is an EXPERIMENTAL API.
-func RegisterChannelz() {
- channelz.TurnOn()
-}
-
// Dial creates a client connection to the given target.
func Dial(target string, opts ...DialOption) (*ClientConn, error) {
return DialContext(context.Background(), target, opts...)
@@ -135,6 +125,7 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *
conns: make(map[*addrConn]struct{}),
dopts: defaultDialOptions(),
blockingpicker: newPickerWrapper(),
+ czData: new(channelzData),
}
cc.retryThrottler.Store((*retryThrottler)(nil))
cc.ctx, cc.cancel = context.WithCancel(context.Background())
@@ -145,9 +136,9 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *
if channelz.IsOn() {
if cc.dopts.channelzParentID != 0 {
- cc.channelzID = channelz.RegisterChannel(cc, cc.dopts.channelzParentID, target)
+ cc.channelzID = channelz.RegisterChannel(&channelzChannel{cc}, cc.dopts.channelzParentID, target)
} else {
- cc.channelzID = channelz.RegisterChannel(cc, 0, target)
+ cc.channelzID = channelz.RegisterChannel(&channelzChannel{cc}, 0, target)
}
}
@@ -293,6 +284,13 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *
s := cc.GetState()
if s == connectivity.Ready {
break
+ } else if cc.dopts.copts.FailOnNonTempDialError && s == connectivity.TransientFailure {
+ if err = cc.blockingpicker.connectionError(); err != nil {
+ terr, ok := err.(interface{ Temporary() bool })
+ if ok && !terr.Temporary() {
+ return nil, err
+ }
+ }
}
if !cc.WaitForStateChange(ctx, s) {
// ctx got timeout or canceled.
@@ -374,12 +372,8 @@ type ClientConn struct {
balancerWrapper *ccBalancerWrapper
retryThrottler atomic.Value
- channelzID int64 // channelz unique identification number
- czmu sync.RWMutex
- callsStarted int64
- callsSucceeded int64
- callsFailed int64
- lastCallStartedTime time.Time
+ channelzID int64 // channelz unique identification number
+ czData *channelzData
}
// WaitForStateChange waits until the connectivity.State of ClientConn changes from sourceState or
@@ -532,9 +526,11 @@ func (cc *ClientConn) handleSubConnStateChange(sc balancer.SubConn, s connectivi
// Caller needs to make sure len(addrs) > 0.
func (cc *ClientConn) newAddrConn(addrs []resolver.Address) (*addrConn, error) {
ac := &addrConn{
- cc: cc,
- addrs: addrs,
- dopts: cc.dopts,
+ cc: cc,
+ addrs: addrs,
+ dopts: cc.dopts,
+ czData: new(channelzData),
+ resetBackoff: make(chan struct{}),
}
ac.ctx, ac.cancel = context.WithCancel(cc.ctx)
// Track ac in cc. This needs to be done before any getTransport(...) is called.
@@ -564,19 +560,14 @@ func (cc *ClientConn) removeAddrConn(ac *addrConn, err error) {
ac.tearDown(err)
}
-// ChannelzMetric returns ChannelInternalMetric of current ClientConn.
-// This is an EXPERIMENTAL API.
-func (cc *ClientConn) ChannelzMetric() *channelz.ChannelInternalMetric {
- state := cc.GetState()
- cc.czmu.RLock()
- defer cc.czmu.RUnlock()
+func (cc *ClientConn) channelzMetric() *channelz.ChannelInternalMetric {
return &channelz.ChannelInternalMetric{
- State: state,
+ State: cc.GetState(),
Target: cc.target,
- CallsStarted: cc.callsStarted,
- CallsSucceeded: cc.callsSucceeded,
- CallsFailed: cc.callsFailed,
- LastCallStartedTimestamp: cc.lastCallStartedTime,
+ CallsStarted: atomic.LoadInt64(&cc.czData.callsStarted),
+ CallsSucceeded: atomic.LoadInt64(&cc.czData.callsSucceeded),
+ CallsFailed: atomic.LoadInt64(&cc.czData.callsFailed),
+ LastCallStartedTimestamp: time.Unix(0, atomic.LoadInt64(&cc.czData.lastCallStartedTime)),
}
}
@@ -587,23 +578,16 @@ func (cc *ClientConn) Target() string {
}
func (cc *ClientConn) incrCallsStarted() {
- cc.czmu.Lock()
- cc.callsStarted++
- // TODO(yuxuanli): will make this a time.Time pointer improve performance?
- cc.lastCallStartedTime = time.Now()
- cc.czmu.Unlock()
+ atomic.AddInt64(&cc.czData.callsStarted, 1)
+ atomic.StoreInt64(&cc.czData.lastCallStartedTime, time.Now().UnixNano())
}
func (cc *ClientConn) incrCallsSucceeded() {
- cc.czmu.Lock()
- cc.callsSucceeded++
- cc.czmu.Unlock()
+ atomic.AddInt64(&cc.czData.callsSucceeded, 1)
}
func (cc *ClientConn) incrCallsFailed() {
- cc.czmu.Lock()
- cc.callsFailed++
- cc.czmu.Unlock()
+ atomic.AddInt64(&cc.czData.callsFailed, 1)
}
// connect starts to creating transport and also starts the transport monitor
@@ -754,6 +738,24 @@ func (cc *ClientConn) resolveNow(o resolver.ResolveNowOption) {
go r.resolveNow(o)
}
+// ResetConnectBackoff wakes up all subchannels in transient failure and causes
+// them to attempt another connection immediately. It also resets the backoff
+// times used for subsequent attempts regardless of the current state.
+//
+// In general, this function should not be used. Typical service or network
+// outages result in a reasonable client reconnection strategy by default.
+// However, if a previously unavailable network becomes available, this may be
+// used to trigger an immediate reconnect.
+//
+// This API is EXPERIMENTAL.
+func (cc *ClientConn) ResetConnectBackoff() {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+ for ac := range cc.conns {
+ ac.resetConnectBackoff()
+ }
+}
+
// Close tears down the ClientConn and all underlying connections.
func (cc *ClientConn) Close() error {
defer cc.cancel()
@@ -822,12 +824,10 @@ type addrConn struct {
// negotiations must complete.
connectDeadline time.Time
- channelzID int64 // channelz unique identification number
- czmu sync.RWMutex
- callsStarted int64
- callsSucceeded int64
- callsFailed int64
- lastCallStartedTime time.Time
+ resetBackoff chan struct{}
+
+ channelzID int64 // channelz unique identification number
+ czData *channelzData
}
// adjustParams updates parameters used to create transports upon
@@ -852,14 +852,6 @@ func (ac *addrConn) printf(format string, a ...interface{}) {
}
}
-// errorf records an error in ac's event log, unless ac has been closed.
-// REQUIRES ac.mu is held.
-func (ac *addrConn) errorf(format string, a ...interface{}) {
- if ac.events != nil {
- ac.events.Errorf(format, a...)
- }
-}
-
// resetTransport recreates a transport to the address for ac. The old
// transport will close itself on error or when the clientconn is closed.
// The created transport must receive initial settings frame from the server.
@@ -890,6 +882,7 @@ func (ac *addrConn) resetTransport() error {
ac.dopts.copts.KeepaliveParams = ac.cc.mkp
ac.cc.mu.RUnlock()
var backoffDeadline, connectDeadline time.Time
+ var resetBackoff chan struct{}
for connectRetryNum := 0; ; connectRetryNum++ {
ac.mu.Lock()
if ac.backoffDeadline.IsZero() {
@@ -897,6 +890,7 @@ func (ac *addrConn) resetTransport() error {
// or this is the first time this addrConn is trying to establish a
// connection.
backoffFor := ac.dopts.bs.Backoff(connectRetryNum) // time.Duration.
+ resetBackoff = ac.resetBackoff
// This will be the duration that dial gets to finish.
dialDuration := getMinConnectTimeout()
if backoffFor > dialDuration {
@@ -930,7 +924,7 @@ func (ac *addrConn) resetTransport() error {
copy(addrsIter, ac.addrs)
copts := ac.dopts.copts
ac.mu.Unlock()
- connected, err := ac.createTransport(connectRetryNum, ridx, backoffDeadline, connectDeadline, addrsIter, copts)
+ connected, err := ac.createTransport(connectRetryNum, ridx, backoffDeadline, connectDeadline, addrsIter, copts, resetBackoff)
if err != nil {
return err
}
@@ -942,7 +936,7 @@ func (ac *addrConn) resetTransport() error {
// createTransport creates a connection to one of the backends in addrs.
// It returns true if a connection was established.
-func (ac *addrConn) createTransport(connectRetryNum, ridx int, backoffDeadline, connectDeadline time.Time, addrs []resolver.Address, copts transport.ConnectOptions) (bool, error) {
+func (ac *addrConn) createTransport(connectRetryNum, ridx int, backoffDeadline, connectDeadline time.Time, addrs []resolver.Address, copts transport.ConnectOptions, resetBackoff chan struct{}) (bool, error) {
for i := ridx; i < len(addrs); i++ {
addr := addrs[i]
target := transport.TargetInfo{
@@ -1042,6 +1036,8 @@ func (ac *addrConn) createTransport(connectRetryNum, ridx int, backoffDeadline,
timer := time.NewTimer(backoffDeadline.Sub(time.Now()))
select {
case <-timer.C:
+ case <-resetBackoff:
+ timer.Stop()
case <-ac.ctx.Done():
timer.Stop()
return false, ac.ctx.Err()
@@ -1049,6 +1045,14 @@ func (ac *addrConn) createTransport(connectRetryNum, ridx int, backoffDeadline,
return false, nil
}
+func (ac *addrConn) resetConnectBackoff() {
+ ac.mu.Lock()
+ close(ac.resetBackoff)
+ ac.resetBackoff = make(chan struct{})
+ ac.connectRetryNum = 0
+ ac.mu.Unlock()
+}
+
// Run in a goroutine to track the error in transport and create the
// new transport if an error happens. It returns when the channel is closing.
func (ac *addrConn) transportMonitor() {
@@ -1197,36 +1201,27 @@ func (ac *addrConn) ChannelzMetric() *channelz.ChannelInternalMetric {
ac.mu.Lock()
addr := ac.curAddr.Addr
ac.mu.Unlock()
- state := ac.getState()
- ac.czmu.RLock()
- defer ac.czmu.RUnlock()
return &channelz.ChannelInternalMetric{
- State: state,
+ State: ac.getState(),
Target: addr,
- CallsStarted: ac.callsStarted,
- CallsSucceeded: ac.callsSucceeded,
- CallsFailed: ac.callsFailed,
- LastCallStartedTimestamp: ac.lastCallStartedTime,
+ CallsStarted: atomic.LoadInt64(&ac.czData.callsStarted),
+ CallsSucceeded: atomic.LoadInt64(&ac.czData.callsSucceeded),
+ CallsFailed: atomic.LoadInt64(&ac.czData.callsFailed),
+ LastCallStartedTimestamp: time.Unix(0, atomic.LoadInt64(&ac.czData.lastCallStartedTime)),
}
}
func (ac *addrConn) incrCallsStarted() {
- ac.czmu.Lock()
- ac.callsStarted++
- ac.lastCallStartedTime = time.Now()
- ac.czmu.Unlock()
+ atomic.AddInt64(&ac.czData.callsStarted, 1)
+ atomic.StoreInt64(&ac.czData.lastCallStartedTime, time.Now().UnixNano())
}
func (ac *addrConn) incrCallsSucceeded() {
- ac.czmu.Lock()
- ac.callsSucceeded++
- ac.czmu.Unlock()
+ atomic.AddInt64(&ac.czData.callsSucceeded, 1)
}
func (ac *addrConn) incrCallsFailed() {
- ac.czmu.Lock()
- ac.callsFailed++
- ac.czmu.Unlock()
+ atomic.AddInt64(&ac.czData.callsFailed, 1)
}
type retryThrottler struct {
@@ -1266,6 +1261,14 @@ func (rt *retryThrottler) successfulRPC() {
}
}
+type channelzChannel struct {
+ cc *ClientConn
+}
+
+func (c *channelzChannel) ChannelzMetric() *channelz.ChannelInternalMetric {
+ return c.cc.channelzMetric()
+}
+
// ErrClientConnTimeout indicates that the ClientConn cannot establish the
// underlying connections within the specified timeout.
//
diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go
index 20accf1a1..3d3c9e231 100644
--- a/vendor/google.golang.org/grpc/dialoptions.go
+++ b/vendor/google.golang.org/grpc/dialoptions.go
@@ -349,6 +349,9 @@ func WithStatsHandler(h stats.Handler) DialOption {
// error, gRPC will fail the connection to the network address and won't try to
// reconnect. The default value of FailOnNonTempDialError is false.
//
+// FailOnNonTempDialError only affects the initial dial, and does not do
+// anything useful unless you are also using WithBlock().
+//
// This is an EXPERIMENTAL API.
func FailOnNonTempDialError(f bool) DialOption {
return newFuncDialOption(func(o *dialOptions) {
diff --git a/vendor/google.golang.org/grpc/go.mod b/vendor/google.golang.org/grpc/go.mod
new file mode 100644
index 000000000..1d16f5d4d
--- /dev/null
+++ b/vendor/google.golang.org/grpc/go.mod
@@ -0,0 +1,21 @@
+module google.golang.org/grpc
+
+require (
+ cloud.google.com/go v0.26.0 // indirect
+ github.com/client9/misspell v0.3.4
+ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
+ github.com/golang/lint v0.0.0-20180702182130-06c8688daad7
+ github.com/golang/mock v1.1.1
+ github.com/golang/protobuf v1.2.0
+ github.com/kisielk/gotool v1.0.0 // indirect
+ golang.org/x/lint v0.0.0-20180702182130-06c8688daad7 // indirect
+ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d
+ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
+ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f // indirect
+ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522
+ golang.org/x/text v0.3.0 // indirect
+ golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52
+ google.golang.org/appengine v1.1.0 // indirect
+ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8
+ honnef.co/go/tools v0.0.0-20180728063816-88497007e858
+)
diff --git a/vendor/google.golang.org/grpc/go.sum b/vendor/google.golang.org/grpc/go.sum
new file mode 100644
index 000000000..6b70e58e5
--- /dev/null
+++ b/vendor/google.golang.org/grpc/go.sum
@@ -0,0 +1,34 @@
+cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ=
+cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/lint v0.0.0-20180702182130-06c8688daad7 h1:2hRPrmiwPrp3fQX967rNJIhQPtiGXdlQWAxKbKw3VHA=
+github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
+github.com/golang/mock v1.1.1 h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+golang.org/x/lint v0.0.0-20180702182130-06c8688daad7 h1:00BeQWmeaGazuOrq8Q5K5d3/cHaGuFrZzpaHBXfrsUA=
+golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/net v0.0.0-20180826012351-8a410e7b638d h1:g9qWBGx4puODJTMVyoPrpoxPFgVGd+z1DZwjfRu4d0I=
+golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+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=
+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/sys v0.0.0-20180830151530-49385e6e1522 h1:Ve1ORMCxvRmSXBwJK+t3Oy+V2vRW2OetUQBq4rJIkZE=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+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/tools v0.0.0-20180828015842-6cd1fcedba52 h1:JG/0uqcGdTNgq7FdU+61l5Pdmb8putNZlXb65bJBROs=
+golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+honnef.co/go/tools v0.0.0-20180728063816-88497007e858 h1:wN+eVZ7U+gqdqkec6C6VXR1OFf9a5Ul9ETzeYsYv20g=
+honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go
index a1fda2801..c2f2c7729 100644
--- a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go
+++ b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go
@@ -26,27 +26,30 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type HealthCheckResponse_ServingStatus int32
const (
- HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0
- HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1
- HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2
+ HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0
+ HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1
+ HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2
+ HealthCheckResponse_SERVICE_UNKNOWN HealthCheckResponse_ServingStatus = 3
)
var HealthCheckResponse_ServingStatus_name = map[int32]string{
0: "UNKNOWN",
1: "SERVING",
2: "NOT_SERVING",
+ 3: "SERVICE_UNKNOWN",
}
var HealthCheckResponse_ServingStatus_value = map[string]int32{
- "UNKNOWN": 0,
- "SERVING": 1,
- "NOT_SERVING": 2,
+ "UNKNOWN": 0,
+ "SERVING": 1,
+ "NOT_SERVING": 2,
+ "SERVICE_UNKNOWN": 3,
}
func (x HealthCheckResponse_ServingStatus) String() string {
return proto.EnumName(HealthCheckResponse_ServingStatus_name, int32(x))
}
func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_health_85731b6c49265086, []int{1, 0}
+ return fileDescriptor_health_6b1a06aa67f91efd, []int{1, 0}
}
type HealthCheckRequest struct {
@@ -60,7 +63,7 @@ func (m *HealthCheckRequest) Reset() { *m = HealthCheckRequest{} }
func (m *HealthCheckRequest) String() string { return proto.CompactTextString(m) }
func (*HealthCheckRequest) ProtoMessage() {}
func (*HealthCheckRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_health_85731b6c49265086, []int{0}
+ return fileDescriptor_health_6b1a06aa67f91efd, []int{0}
}
func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HealthCheckRequest.Unmarshal(m, b)
@@ -98,7 +101,7 @@ func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} }
func (m *HealthCheckResponse) String() string { return proto.CompactTextString(m) }
func (*HealthCheckResponse) ProtoMessage() {}
func (*HealthCheckResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_health_85731b6c49265086, []int{1}
+ return fileDescriptor_health_6b1a06aa67f91efd, []int{1}
}
func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HealthCheckResponse.Unmarshal(m, b)
@@ -143,7 +146,25 @@ const _ = grpc.SupportPackageIsVersion4
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type HealthClient interface {
+ // If the requested service is unknown, the call will fail with status
+ // NOT_FOUND.
Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
+ // Performs a watch for the serving status of the requested service.
+ // The server will immediately send back a message indicating the current
+ // serving status. It will then subsequently send a new message whenever
+ // the service's serving status changes.
+ //
+ // If the requested service is unknown when the call is received, the
+ // server will send a message setting the serving status to
+ // SERVICE_UNKNOWN but will *not* terminate the call. If at some
+ // future point, the serving status of the service becomes known, the
+ // server will send a new message with the service's serving status.
+ //
+ // If the call terminates with status UNIMPLEMENTED, then clients
+ // should assume this method is not supported and should not retry the
+ // call. If the call terminates with any other status (including OK),
+ // clients should retry the call with appropriate exponential backoff.
+ Watch(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (Health_WatchClient, error)
}
type healthClient struct {
@@ -163,9 +184,59 @@ func (c *healthClient) Check(ctx context.Context, in *HealthCheckRequest, opts .
return out, nil
}
+func (c *healthClient) Watch(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (Health_WatchClient, error) {
+ stream, err := c.cc.NewStream(ctx, &_Health_serviceDesc.Streams[0], "/grpc.health.v1.Health/Watch", opts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &healthWatchClient{stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+type Health_WatchClient interface {
+ Recv() (*HealthCheckResponse, error)
+ grpc.ClientStream
+}
+
+type healthWatchClient struct {
+ grpc.ClientStream
+}
+
+func (x *healthWatchClient) Recv() (*HealthCheckResponse, error) {
+ m := new(HealthCheckResponse)
+ if err := x.ClientStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
// HealthServer is the server API for Health service.
type HealthServer interface {
+ // If the requested service is unknown, the call will fail with status
+ // NOT_FOUND.
Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
+ // Performs a watch for the serving status of the requested service.
+ // The server will immediately send back a message indicating the current
+ // serving status. It will then subsequently send a new message whenever
+ // the service's serving status changes.
+ //
+ // If the requested service is unknown when the call is received, the
+ // server will send a message setting the serving status to
+ // SERVICE_UNKNOWN but will *not* terminate the call. If at some
+ // future point, the serving status of the service becomes known, the
+ // server will send a new message with the service's serving status.
+ //
+ // If the call terminates with status UNIMPLEMENTED, then clients
+ // should assume this method is not supported and should not retry the
+ // call. If the call terminates with any other status (including OK),
+ // clients should retry the call with appropriate exponential backoff.
+ Watch(*HealthCheckRequest, Health_WatchServer) error
}
func RegisterHealthServer(s *grpc.Server, srv HealthServer) {
@@ -190,6 +261,27 @@ func _Health_Check_Handler(srv interface{}, ctx context.Context, dec func(interf
return interceptor(ctx, in, info, handler)
}
+func _Health_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(HealthCheckRequest)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(HealthServer).Watch(m, &healthWatchServer{stream})
+}
+
+type Health_WatchServer interface {
+ Send(*HealthCheckResponse) error
+ grpc.ServerStream
+}
+
+type healthWatchServer struct {
+ grpc.ServerStream
+}
+
+func (x *healthWatchServer) Send(m *HealthCheckResponse) error {
+ return x.ServerStream.SendMsg(m)
+}
+
var _Health_serviceDesc = grpc.ServiceDesc{
ServiceName: "grpc.health.v1.Health",
HandlerType: (*HealthServer)(nil),
@@ -199,29 +291,37 @@ var _Health_serviceDesc = grpc.ServiceDesc{
Handler: _Health_Check_Handler,
},
},
- Streams: []grpc.StreamDesc{},
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "Watch",
+ Handler: _Health_Watch_Handler,
+ ServerStreams: true,
+ },
+ },
Metadata: "grpc/health/v1/health.proto",
}
-func init() { proto.RegisterFile("grpc/health/v1/health.proto", fileDescriptor_health_85731b6c49265086) }
+func init() { proto.RegisterFile("grpc/health/v1/health.proto", fileDescriptor_health_6b1a06aa67f91efd) }
-var fileDescriptor_health_85731b6c49265086 = []byte{
- // 271 bytes of a gzipped FileDescriptorProto
+var fileDescriptor_health_6b1a06aa67f91efd = []byte{
+ // 297 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0x2f, 0x2a, 0x48,
0xd6, 0xcf, 0x48, 0x4d, 0xcc, 0x29, 0xc9, 0xd0, 0x2f, 0x33, 0x84, 0xb2, 0xf4, 0x0a, 0x8a, 0xf2,
0x4b, 0xf2, 0x85, 0xf8, 0x40, 0x92, 0x7a, 0x50, 0xa1, 0x32, 0x43, 0x25, 0x3d, 0x2e, 0x21, 0x0f,
0x30, 0xc7, 0x39, 0x23, 0x35, 0x39, 0x3b, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x48, 0x82,
0x8b, 0xbd, 0x38, 0xb5, 0xa8, 0x2c, 0x33, 0x39, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08,
- 0xc6, 0x55, 0x9a, 0xc3, 0xc8, 0x25, 0x8c, 0xa2, 0xa1, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0xc8,
+ 0xc6, 0x55, 0xda, 0xc8, 0xc8, 0x25, 0x8c, 0xa2, 0xa1, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0xc8,
0x93, 0x8b, 0xad, 0xb8, 0x24, 0xb1, 0xa4, 0xb4, 0x18, 0xac, 0x81, 0xcf, 0xc8, 0x50, 0x0f, 0xd5,
0x22, 0x3d, 0x2c, 0x9a, 0xf4, 0x82, 0x41, 0x86, 0xe6, 0xa5, 0x07, 0x83, 0x35, 0x06, 0x41, 0x0d,
- 0x50, 0xb2, 0xe2, 0xe2, 0x45, 0x91, 0x10, 0xe2, 0xe6, 0x62, 0x0f, 0xf5, 0xf3, 0xf6, 0xf3, 0x0f,
+ 0x50, 0xf2, 0xe7, 0xe2, 0x45, 0x91, 0x10, 0xe2, 0xe6, 0x62, 0x0f, 0xf5, 0xf3, 0xf6, 0xf3, 0x0f,
0xf7, 0x13, 0x60, 0x00, 0x71, 0x82, 0x5d, 0x83, 0xc2, 0x3c, 0xfd, 0xdc, 0x05, 0x18, 0x85, 0xf8,
- 0xb9, 0xb8, 0xfd, 0xfc, 0x43, 0xe2, 0x61, 0x02, 0x4c, 0x46, 0x51, 0x5c, 0x6c, 0x10, 0x8b, 0x84,
- 0x02, 0xb8, 0x58, 0xc1, 0x96, 0x09, 0x29, 0xe1, 0x75, 0x09, 0xd8, 0xbf, 0x52, 0xca, 0x44, 0xb8,
- 0xd6, 0x29, 0x91, 0x4b, 0x30, 0x33, 0x1f, 0x4d, 0xa1, 0x13, 0x37, 0x44, 0x65, 0x00, 0x28, 0x70,
- 0x03, 0x18, 0xa3, 0x74, 0xd2, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0xd2, 0xf3, 0x73, 0x12, 0xf3,
- 0xd2, 0xf5, 0xf2, 0x8b, 0xd2, 0xf5, 0x91, 0x63, 0x03, 0xc4, 0x8e, 0x87, 0xb0, 0xe3, 0xcb, 0x0c,
- 0x57, 0x31, 0xf1, 0xb9, 0x83, 0x4c, 0x83, 0x18, 0xa1, 0x17, 0x66, 0x98, 0xc4, 0x06, 0x8e, 0x24,
- 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xec, 0x66, 0x81, 0xcb, 0xc3, 0x01, 0x00, 0x00,
+ 0xb9, 0xb8, 0xfd, 0xfc, 0x43, 0xe2, 0x61, 0x02, 0x4c, 0x42, 0xc2, 0x5c, 0xfc, 0x60, 0x8e, 0xb3,
+ 0x6b, 0x3c, 0x4c, 0x0b, 0xb3, 0xd1, 0x3a, 0x46, 0x2e, 0x36, 0x88, 0xf5, 0x42, 0x01, 0x5c, 0xac,
+ 0x60, 0x27, 0x08, 0x29, 0xe1, 0x75, 0x1f, 0x38, 0x14, 0xa4, 0x94, 0x89, 0xf0, 0x83, 0x50, 0x10,
+ 0x17, 0x6b, 0x78, 0x62, 0x49, 0x72, 0x06, 0xd5, 0x4c, 0x34, 0x60, 0x74, 0x4a, 0xe4, 0x12, 0xcc,
+ 0xcc, 0x47, 0x53, 0xea, 0xc4, 0x0d, 0x51, 0x1b, 0x00, 0x8a, 0xc6, 0x00, 0xc6, 0x28, 0x9d, 0xf4,
+ 0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0xbd, 0xf4, 0xfc, 0x9c, 0xc4, 0xbc, 0x74, 0xbd, 0xfc, 0xa2, 0x74,
+ 0x7d, 0xe4, 0x78, 0x07, 0xb1, 0xe3, 0x21, 0xec, 0xf8, 0x32, 0xc3, 0x55, 0x4c, 0x7c, 0xee, 0x20,
+ 0xd3, 0x20, 0x46, 0xe8, 0x85, 0x19, 0x26, 0xb1, 0x81, 0x93, 0x83, 0x31, 0x20, 0x00, 0x00, 0xff,
+ 0xff, 0x12, 0x7d, 0x96, 0xcb, 0x2d, 0x02, 0x00, 0x00,
}
diff --git a/vendor/google.golang.org/grpc/health/health.go b/vendor/google.golang.org/grpc/health/health.go
index c2588867e..4c671f6a3 100644
--- a/vendor/google.golang.org/grpc/health/health.go
+++ b/vendor/google.golang.org/grpc/health/health.go
@@ -63,6 +63,11 @@ func (s *Server) Check(ctx context.Context, in *healthpb.HealthCheckRequest) (*h
return nil, status.Error(codes.NotFound, "unknown service")
}
+// Watch implements `service Health`.
+func (s *Server) Watch(in *healthpb.HealthCheckRequest, stream healthpb.Health_WatchServer) error {
+ return status.Error(codes.Unimplemented, "Watching is not supported")
+}
+
// SetServingStatus is called when need to reset the serving status of a service
// or insert a new service entry into the statusMap.
func (s *Server) SetServingStatus(service string, status healthpb.HealthCheckResponse_ServingStatus) {
diff --git a/vendor/google.golang.org/grpc/internal/channelz/types_linux.go b/vendor/google.golang.org/grpc/internal/channelz/types_linux.go
index 9801c3e2c..07215396d 100644
--- a/vendor/google.golang.org/grpc/internal/channelz/types_linux.go
+++ b/vendor/google.golang.org/grpc/internal/channelz/types_linux.go
@@ -50,5 +50,4 @@ func (s *SocketOptionData) Getsockopt(fd uintptr) {
if v, err := unix.GetsockoptTCPInfo(int(fd), syscall.SOL_TCP, syscall.TCP_INFO); err == nil {
s.TCPInfo = v
}
- return
}
diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go
index cd34267f7..c35afb05e 100644
--- a/vendor/google.golang.org/grpc/internal/internal.go
+++ b/vendor/google.golang.org/grpc/internal/internal.go
@@ -21,14 +21,6 @@
package internal
var (
-
- // TestingUseHandlerImpl enables the http.Handler-based server implementation.
- // It must be called before Serve and requires TLS credentials.
- //
- // The provided grpcServer must be of type *grpc.Server. It is untyped
- // for circular dependency reasons.
- TestingUseHandlerImpl func(grpcServer interface{})
-
// WithContextDialer is exported by clientconn.go
WithContextDialer interface{} // func(context.Context, string) (net.Conn, error) grpc.DialOption
// WithResolverBuilder is exported by clientconn.go
diff --git a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
index ce135c4d1..204ba1588 100644
--- a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
+++ b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
@@ -104,7 +104,6 @@ type headerFrame struct {
type cleanupStream struct {
streamID uint32
- idPtr *uint32
rst bool
rstCode http2.ErrCode
onWrite func()
@@ -138,9 +137,6 @@ type outgoingSettings struct {
ss []http2.Setting
}
-type settingsAck struct {
-}
-
type incomingGoAway struct {
}
diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go
index bc8564345..c6fb4b9c1 100644
--- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go
+++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go
@@ -237,9 +237,9 @@ func (ht *serverHandlerTransport) WriteStatus(s *Stream, st *status.Status) erro
if ht.stats != nil {
ht.stats.HandleRPC(s.Context(), &stats.OutTrailer{})
}
- ht.Close()
close(ht.writes)
}
+ ht.Close()
return err
}
@@ -326,11 +326,11 @@ func (ht *serverHandlerTransport) HandleStreams(startStream func(*Stream), trace
go func() {
select {
case <-requestOver:
- return
case <-ht.closedCh:
case <-clientGone:
}
cancel()
+ ht.Close()
}()
req := ht.req
@@ -442,5 +442,8 @@ func mapRecvMsgError(err error) error {
return status.Error(code, se.Error())
}
}
+ if strings.Contains(err.Error(), "body closed by handler") {
+ return status.Error(codes.Canceled, err.Error())
+ }
return connectionErrorf(true, err, err.Error())
}
diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go
index 88d1c1612..904e790c4 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go
@@ -111,19 +111,7 @@ type http2Client struct {
// Fields below are for channelz metric collection.
channelzID int64 // channelz unique identification number
- czmu sync.RWMutex
- kpCount int64
- // The number of streams that have started, including already finished ones.
- streamsStarted int64
- // The number of streams that have ended successfully by receiving EoS bit set
- // frame from server.
- streamsSucceeded int64
- streamsFailed int64
- lastStreamCreated time.Time
- msgSent int64
- msgRecv int64
- lastMsgSent time.Time
- lastMsgRecv time.Time
+ czData *channelzData
}
func dial(ctx context.Context, fn func(context.Context, string) (net.Conn, error), addr string) (net.Conn, error) {
@@ -234,6 +222,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr TargetInfo, opts Conne
maxConcurrentStreams: defaultMaxStreamsClient,
streamQuota: defaultMaxStreamsClient,
streamsQuotaAvailable: make(chan struct{}, 1),
+ czData: new(channelzData),
}
t.controlBuf = newControlBuffer(t.ctxDone)
if opts.InitialWindowSize >= defaultWindowSize {
@@ -550,10 +539,8 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Strea
}
t.activeStreams[id] = s
if channelz.IsOn() {
- t.czmu.Lock()
- t.streamsStarted++
- t.lastStreamCreated = time.Now()
- t.czmu.Unlock()
+ atomic.AddInt64(&t.czData.streamsStarted, 1)
+ atomic.StoreInt64(&t.czData.lastStreamCreatedTime, time.Now().UnixNano())
}
var sendPing bool
// If the number of active streams change from 0 to 1, then check if keepalive
@@ -707,13 +694,11 @@ func (t *http2Client) closeStream(s *Stream, err error, rst bool, rstCode http2.
}
t.mu.Unlock()
if channelz.IsOn() {
- t.czmu.Lock()
if eosReceived {
- t.streamsSucceeded++
+ atomic.AddInt64(&t.czData.streamsSucceeded, 1)
} else {
- t.streamsFailed++
+ atomic.AddInt64(&t.czData.streamsFailed, 1)
}
- t.czmu.Unlock()
}
},
rst: rst,
@@ -1263,9 +1248,7 @@ func (t *http2Client) keepalive() {
} else {
t.mu.Unlock()
if channelz.IsOn() {
- t.czmu.Lock()
- t.kpCount++
- t.czmu.Unlock()
+ atomic.AddInt64(&t.czData.kpCount, 1)
}
// Send ping.
t.controlBuf.put(p)
@@ -1305,17 +1288,16 @@ func (t *http2Client) GoAway() <-chan struct{} {
}
func (t *http2Client) ChannelzMetric() *channelz.SocketInternalMetric {
- t.czmu.RLock()
s := channelz.SocketInternalMetric{
- StreamsStarted: t.streamsStarted,
- StreamsSucceeded: t.streamsSucceeded,
- StreamsFailed: t.streamsFailed,
- MessagesSent: t.msgSent,
- MessagesReceived: t.msgRecv,
- KeepAlivesSent: t.kpCount,
- LastLocalStreamCreatedTimestamp: t.lastStreamCreated,
- LastMessageSentTimestamp: t.lastMsgSent,
- LastMessageReceivedTimestamp: t.lastMsgRecv,
+ StreamsStarted: atomic.LoadInt64(&t.czData.streamsStarted),
+ StreamsSucceeded: atomic.LoadInt64(&t.czData.streamsSucceeded),
+ StreamsFailed: atomic.LoadInt64(&t.czData.streamsFailed),
+ MessagesSent: atomic.LoadInt64(&t.czData.msgSent),
+ MessagesReceived: atomic.LoadInt64(&t.czData.msgRecv),
+ KeepAlivesSent: atomic.LoadInt64(&t.czData.kpCount),
+ LastLocalStreamCreatedTimestamp: time.Unix(0, atomic.LoadInt64(&t.czData.lastStreamCreatedTime)),
+ LastMessageSentTimestamp: time.Unix(0, atomic.LoadInt64(&t.czData.lastMsgSentTime)),
+ LastMessageReceivedTimestamp: time.Unix(0, atomic.LoadInt64(&t.czData.lastMsgRecvTime)),
LocalFlowControlWindow: int64(t.fc.getSize()),
SocketOptions: channelz.GetSocketOption(t.conn),
LocalAddr: t.localAddr,
@@ -1325,23 +1307,18 @@ func (t *http2Client) ChannelzMetric() *channelz.SocketInternalMetric {
if au, ok := t.authInfo.(credentials.ChannelzSecurityInfo); ok {
s.Security = au.GetSecurityValue()
}
- t.czmu.RUnlock()
s.RemoteFlowControlWindow = t.getOutFlowWindow()
return &s
}
func (t *http2Client) IncrMsgSent() {
- t.czmu.Lock()
- t.msgSent++
- t.lastMsgSent = time.Now()
- t.czmu.Unlock()
+ atomic.AddInt64(&t.czData.msgSent, 1)
+ atomic.StoreInt64(&t.czData.lastMsgSentTime, time.Now().UnixNano())
}
func (t *http2Client) IncrMsgRecv() {
- t.czmu.Lock()
- t.msgRecv++
- t.lastMsgRecv = time.Now()
- t.czmu.Unlock()
+ atomic.AddInt64(&t.czData.msgRecv, 1)
+ atomic.StoreInt64(&t.czData.lastMsgRecvTime, time.Now().UnixNano())
}
func (t *http2Client) getOutFlowWindow() int64 {
diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
index a8a09270b..efb7f53ff 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
@@ -118,19 +118,7 @@ type http2Server struct {
// Fields below are for channelz metric collection.
channelzID int64 // channelz unique identification number
- czmu sync.RWMutex
- kpCount int64
- // The number of streams that have started, including already finished ones.
- streamsStarted int64
- // The number of streams that have ended successfully by sending frame with
- // EoS bit set.
- streamsSucceeded int64
- streamsFailed int64
- lastStreamCreated time.Time
- msgSent int64
- msgRecv int64
- lastMsgSent time.Time
- lastMsgRecv time.Time
+ czData *channelzData
}
// newHTTP2Server constructs a ServerTransport based on HTTP2. ConnectionError is
@@ -231,6 +219,7 @@ func newHTTP2Server(conn net.Conn, config *ServerConfig) (_ ServerTransport, err
idle: time.Now(),
kep: kep,
initialWindowSize: iwz,
+ czData: new(channelzData),
}
t.controlBuf = newControlBuffer(t.ctxDone)
if dynamicWindow {
@@ -295,7 +284,7 @@ func newHTTP2Server(conn net.Conn, config *ServerConfig) (_ ServerTransport, err
}
// operateHeader takes action on the decoded headers.
-func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(*Stream), traceCtx func(context.Context, string) context.Context) (close bool) {
+func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(*Stream), traceCtx func(context.Context, string) context.Context) (fatal bool) {
streamID := frame.Header().StreamID
state := decodeState{serverSide: true}
if err := state.decodeHeader(frame); err != nil {
@@ -307,7 +296,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
onWrite: func() {},
})
}
- return
+ return false
}
buf := newRecvBuffer()
@@ -361,13 +350,13 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
rstCode: http2.ErrCodeRefusedStream,
onWrite: func() {},
})
- return
+ return false
}
}
t.mu.Lock()
if t.state != reachable {
t.mu.Unlock()
- return
+ return false
}
if uint32(len(t.activeStreams)) >= t.maxStreams {
t.mu.Unlock()
@@ -377,7 +366,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
rstCode: http2.ErrCodeRefusedStream,
onWrite: func() {},
})
- return
+ return false
}
if streamID%2 != 1 || streamID <= t.maxStreamID {
t.mu.Unlock()
@@ -392,10 +381,8 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
}
t.mu.Unlock()
if channelz.IsOn() {
- t.czmu.Lock()
- t.streamsStarted++
- t.lastStreamCreated = time.Now()
- t.czmu.Unlock()
+ atomic.AddInt64(&t.czData.streamsStarted, 1)
+ atomic.StoreInt64(&t.czData.lastStreamCreatedTime, time.Now().UnixNano())
}
s.requestRead = func(n int) {
t.adjustWindow(s, uint32(n))
@@ -430,7 +417,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
wq: s.wq,
})
handle(s)
- return
+ return false
}
// HandleStreams receives incoming streams using the given handler. This is
@@ -977,9 +964,7 @@ func (t *http2Server) keepalive() {
}
pingSent = true
if channelz.IsOn() {
- t.czmu.Lock()
- t.kpCount++
- t.czmu.Unlock()
+ atomic.AddInt64(&t.czData.kpCount, 1)
}
t.controlBuf.put(p)
keepalive.Reset(t.kp.Timeout)
@@ -1044,13 +1029,11 @@ func (t *http2Server) closeStream(s *Stream, rst bool, rstCode http2.ErrCode, hd
}
t.mu.Unlock()
if channelz.IsOn() {
- t.czmu.Lock()
if eosReceived {
- t.streamsSucceeded++
+ atomic.AddInt64(&t.czData.streamsSucceeded, 1)
} else {
- t.streamsFailed++
+ atomic.AddInt64(&t.czData.streamsFailed, 1)
}
- t.czmu.Unlock()
}
},
}
@@ -1138,17 +1121,16 @@ func (t *http2Server) outgoingGoAwayHandler(g *goAway) (bool, error) {
}
func (t *http2Server) ChannelzMetric() *channelz.SocketInternalMetric {
- t.czmu.RLock()
s := channelz.SocketInternalMetric{
- StreamsStarted: t.streamsStarted,
- StreamsSucceeded: t.streamsSucceeded,
- StreamsFailed: t.streamsFailed,
- MessagesSent: t.msgSent,
- MessagesReceived: t.msgRecv,
- KeepAlivesSent: t.kpCount,
- LastRemoteStreamCreatedTimestamp: t.lastStreamCreated,
- LastMessageSentTimestamp: t.lastMsgSent,
- LastMessageReceivedTimestamp: t.lastMsgRecv,
+ StreamsStarted: atomic.LoadInt64(&t.czData.streamsStarted),
+ StreamsSucceeded: atomic.LoadInt64(&t.czData.streamsSucceeded),
+ StreamsFailed: atomic.LoadInt64(&t.czData.streamsFailed),
+ MessagesSent: atomic.LoadInt64(&t.czData.msgSent),
+ MessagesReceived: atomic.LoadInt64(&t.czData.msgRecv),
+ KeepAlivesSent: atomic.LoadInt64(&t.czData.kpCount),
+ LastRemoteStreamCreatedTimestamp: time.Unix(0, atomic.LoadInt64(&t.czData.lastStreamCreatedTime)),
+ LastMessageSentTimestamp: time.Unix(0, atomic.LoadInt64(&t.czData.lastMsgSentTime)),
+ LastMessageReceivedTimestamp: time.Unix(0, atomic.LoadInt64(&t.czData.lastMsgRecvTime)),
LocalFlowControlWindow: int64(t.fc.getSize()),
SocketOptions: channelz.GetSocketOption(t.conn),
LocalAddr: t.localAddr,
@@ -1158,23 +1140,18 @@ func (t *http2Server) ChannelzMetric() *channelz.SocketInternalMetric {
if au, ok := t.authInfo.(credentials.ChannelzSecurityInfo); ok {
s.Security = au.GetSecurityValue()
}
- t.czmu.RUnlock()
s.RemoteFlowControlWindow = t.getOutFlowWindow()
return &s
}
func (t *http2Server) IncrMsgSent() {
- t.czmu.Lock()
- t.msgSent++
- t.lastMsgSent = time.Now()
- t.czmu.Unlock()
+ atomic.AddInt64(&t.czData.msgSent, 1)
+ atomic.StoreInt64(&t.czData.lastMsgSentTime, time.Now().UnixNano())
}
func (t *http2Server) IncrMsgRecv() {
- t.czmu.Lock()
- t.msgRecv++
- t.lastMsgRecv = time.Now()
- t.czmu.Unlock()
+ atomic.AddInt64(&t.czData.msgRecv, 1)
+ atomic.StoreInt64(&t.czData.lastMsgRecvTime, time.Now().UnixNano())
}
func (t *http2Server) getOutFlowWindow() int64 {
diff --git a/vendor/google.golang.org/grpc/internal/transport/log.go b/vendor/google.golang.org/grpc/internal/transport/log.go
index ac8e358c5..879df80c4 100644
--- a/vendor/google.golang.org/grpc/internal/transport/log.go
+++ b/vendor/google.golang.org/grpc/internal/transport/log.go
@@ -42,9 +42,3 @@ func errorf(format string, args ...interface{}) {
grpclog.Errorf(format, args...)
}
}
-
-func fatalf(format string, args ...interface{}) {
- if grpclog.V(logLevel) {
- grpclog.Fatalf(format, args...)
- }
-}
diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go
index 9775eeb81..fdf8ad684 100644
--- a/vendor/google.golang.org/grpc/internal/transport/transport.go
+++ b/vendor/google.golang.org/grpc/internal/transport/transport.go
@@ -176,7 +176,6 @@ type Stream struct {
buf *recvBuffer
trReader io.Reader
fc *inFlow
- recvQuota uint32
wq *writeQuota
// Callback to state application's intentions to read data. This
@@ -683,3 +682,27 @@ const (
// "too_many_pings".
GoAwayTooManyPings GoAwayReason = 2
)
+
+// channelzData is used to store channelz related data for http2Client and http2Server.
+// These fields cannot be embedded in the original structs (e.g. http2Client), since to do atomic
+// operation on int64 variable on 32-bit machine, user is responsible to enforce memory alignment.
+// Here, by grouping those int64 fields inside a struct, we are enforcing the alignment.
+type channelzData struct {
+ kpCount int64
+ // The number of streams that have started, including already finished ones.
+ streamsStarted int64
+ // Client side: The number of streams that have ended successfully by receiving
+ // EoS bit set frame from server.
+ // Server side: The number of streams that have ended successfully by sending
+ // frame with EoS bit set.
+ streamsSucceeded int64
+ streamsFailed int64
+ // lastStreamCreatedTime stores the timestamp that the last stream gets created. It is of int64 type
+ // instead of time.Time since it's more costly to atomically update time.Time variable than int64
+ // variable. The same goes for lastMsgSentTime and lastMsgRecvTime.
+ lastStreamCreatedTime int64
+ msgSent int64
+ msgRecv int64
+ lastMsgSentTime int64
+ lastMsgRecvTime int64
+}
diff --git a/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go b/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go
index 084bdbfe6..4ce81671d 100644
--- a/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go
+++ b/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go
@@ -74,7 +74,7 @@ type dnsBuilder struct {
// Build creates and starts a DNS resolver that watches the name resolution of the target.
func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOption) (resolver.Resolver, error) {
if target.Authority != "" {
- return nil, fmt.Errorf("Default DNS resolver does not support custom DNS server")
+ return nil, fmt.Errorf("default DNS resolver does not support custom DNS server")
}
host, port, err := parseTarget(target.Endpoint)
if err != nil {
diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go
index 61342c9cd..fa0568302 100644
--- a/vendor/google.golang.org/grpc/rpc_util.go
+++ b/vendor/google.golang.org/grpc/rpc_util.go
@@ -156,13 +156,11 @@ type callInfo struct {
compressorType string
failFast bool
stream *clientStream
- traceInfo traceInfo // in trace.go
maxReceiveMessageSize *int
maxSendMessageSize *int
creds credentials.PerRPCCredentials
contentSubtype string
codec baseCodec
- disableRetry bool
maxRetryRPCBufferSize int
}
@@ -750,6 +748,19 @@ func parseDialTarget(target string) (net string, addr string) {
return net, target
}
+// channelzData is used to store channelz related data for ClientConn, addrConn and Server.
+// These fields cannot be embedded in the original structs (e.g. ClientConn), since to do atomic
+// operation on int64 variable on 32-bit machine, user is responsible to enforce memory alignment.
+// Here, by grouping those int64 fields inside a struct, we are enforcing the alignment.
+type channelzData struct {
+ callsStarted int64
+ callsFailed int64
+ callsSucceeded int64
+ // lastCallStartedTime stores the timestamp that last call starts. It is of int64 type instead of
+ // time.Time since it's more costly to atomically update time.Time variable than int64 variable.
+ lastCallStartedTime int64
+}
+
// The SupportPackageIsVersion variables are referenced from generated protocol
// buffer files to ensure compatibility with the gRPC version used. The latest
// support package version is 5.
diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go
index f5bea7238..5c7d5b635 100644
--- a/vendor/google.golang.org/grpc/server.go
+++ b/vendor/google.golang.org/grpc/server.go
@@ -30,12 +30,12 @@ import (
"runtime"
"strings"
"sync"
+ "sync/atomic"
"time"
"io/ioutil"
"golang.org/x/net/context"
- "golang.org/x/net/http2"
"golang.org/x/net/trace"
"google.golang.org/grpc/codes"
@@ -43,7 +43,6 @@ import (
"google.golang.org/grpc/encoding"
"google.golang.org/grpc/encoding/proto"
"google.golang.org/grpc/grpclog"
- "google.golang.org/grpc/internal"
"google.golang.org/grpc/internal/channelz"
"google.golang.org/grpc/internal/transport"
"google.golang.org/grpc/keepalive"
@@ -106,12 +105,8 @@ type Server struct {
channelzRemoveOnce sync.Once
serveWG sync.WaitGroup // counts active Serve goroutines for GracefulStop
- channelzID int64 // channelz unique identification number
- czmu sync.RWMutex
- callsStarted int64
- callsFailed int64
- callsSucceeded int64
- lastCallStartedTime time.Time
+ channelzID int64 // channelz unique identification number
+ czData *channelzData
}
type options struct {
@@ -126,7 +121,6 @@ type options struct {
maxConcurrentStreams uint32
maxReceiveMessageSize int
maxSendMessageSize int
- useHandlerImpl bool // use http.Handler-based server
unknownStreamDesc *StreamDesc
keepaliveParams keepalive.ServerParameters
keepalivePolicy keepalive.EnforcementPolicy
@@ -360,12 +354,13 @@ func NewServer(opt ...ServerOption) *Server {
o(&opts)
}
s := &Server{
- lis: make(map[net.Listener]bool),
- opts: opts,
- conns: make(map[io.Closer]bool),
- m: make(map[string]*service),
- quit: make(chan struct{}),
- done: make(chan struct{}),
+ lis: make(map[net.Listener]bool),
+ opts: opts,
+ conns: make(map[io.Closer]bool),
+ m: make(map[string]*service),
+ quit: make(chan struct{}),
+ done: make(chan struct{}),
+ czData: new(channelzData),
}
s.cv = sync.NewCond(&s.mu)
if EnableTracing {
@@ -374,7 +369,7 @@ func NewServer(opt ...ServerOption) *Server {
}
if channelz.IsOn() {
- s.channelzID = channelz.RegisterServer(s, "")
+ s.channelzID = channelz.RegisterServer(&channelzServer{s}, "")
}
return s
}
@@ -635,27 +630,19 @@ func (s *Server) handleRawConn(rawConn net.Conn) {
}
s.mu.Unlock()
- var serve func()
- c := conn.(io.Closer)
- if s.opts.useHandlerImpl {
- serve = func() { s.serveUsingHandler(conn) }
- } else {
- // Finish handshaking (HTTP2)
- st := s.newHTTP2Transport(conn, authInfo)
- if st == nil {
- return
- }
- c = st
- serve = func() { s.serveStreams(st) }
+ // Finish handshaking (HTTP2)
+ st := s.newHTTP2Transport(conn, authInfo)
+ if st == nil {
+ return
}
rawConn.SetDeadline(time.Time{})
- if !s.addConn(c) {
+ if !s.addConn(st) {
return
}
go func() {
- serve()
- s.removeConn(c)
+ s.serveStreams(st)
+ s.removeConn(st)
}()
}
@@ -710,27 +697,6 @@ func (s *Server) serveStreams(st transport.ServerTransport) {
var _ http.Handler = (*Server)(nil)
-// serveUsingHandler is called from handleRawConn when s is configured
-// to handle requests via the http.Handler interface. It sets up a
-// net/http.Server to handle the just-accepted conn. The http.Server
-// is configured to route all incoming requests (all HTTP/2 streams)
-// to ServeHTTP, which creates a new ServerTransport for each stream.
-// serveUsingHandler blocks until conn closes.
-//
-// This codepath is only used when Server.TestingUseHandlerImpl has
-// been configured. This lets the end2end tests exercise the ServeHTTP
-// method as one of the environment types.
-//
-// conn is the *tls.Conn that's already been authenticated.
-func (s *Server) serveUsingHandler(conn net.Conn) {
- h2s := &http2.Server{
- MaxConcurrentStreams: s.opts.maxConcurrentStreams,
- }
- h2s.ServeConn(conn, &http2.ServeConnOpts{
- Handler: s,
- })
-}
-
// ServeHTTP implements the Go standard library's http.Handler
// interface by responding to the gRPC request r, by looking up
// the requested gRPC method in the gRPC server s.
@@ -813,36 +779,26 @@ func (s *Server) removeConn(c io.Closer) {
}
}
-// ChannelzMetric returns ServerInternalMetric of current server.
-// This is an EXPERIMENTAL API.
-func (s *Server) ChannelzMetric() *channelz.ServerInternalMetric {
- s.czmu.RLock()
- defer s.czmu.RUnlock()
+func (s *Server) channelzMetric() *channelz.ServerInternalMetric {
return &channelz.ServerInternalMetric{
- CallsStarted: s.callsStarted,
- CallsSucceeded: s.callsSucceeded,
- CallsFailed: s.callsFailed,
- LastCallStartedTimestamp: s.lastCallStartedTime,
+ CallsStarted: atomic.LoadInt64(&s.czData.callsStarted),
+ CallsSucceeded: atomic.LoadInt64(&s.czData.callsSucceeded),
+ CallsFailed: atomic.LoadInt64(&s.czData.callsFailed),
+ LastCallStartedTimestamp: time.Unix(0, atomic.LoadInt64(&s.czData.lastCallStartedTime)),
}
}
func (s *Server) incrCallsStarted() {
- s.czmu.Lock()
- s.callsStarted++
- s.lastCallStartedTime = time.Now()
- s.czmu.Unlock()
+ atomic.AddInt64(&s.czData.callsStarted, 1)
+ atomic.StoreInt64(&s.czData.lastCallStartedTime, time.Now().UnixNano())
}
func (s *Server) incrCallsSucceeded() {
- s.czmu.Lock()
- s.callsSucceeded++
- s.czmu.Unlock()
+ atomic.AddInt64(&s.czData.callsSucceeded, 1)
}
func (s *Server) incrCallsFailed() {
- s.czmu.Lock()
- s.callsFailed++
- s.czmu.Unlock()
+ atomic.AddInt64(&s.czData.callsFailed, 1)
}
func (s *Server) sendResponse(t transport.ServerTransport, stream *transport.Stream, msg interface{}, cp Compressor, opts *transport.Options, comp encoding.Compressor) error {
@@ -1107,11 +1063,11 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
}
ctx := NewContextWithServerTransportStream(stream.Context(), stream)
ss := &serverStream{
- ctx: ctx,
- t: t,
- s: stream,
- p: &parser{r: stream},
- codec: s.getCodec(stream.ContentSubtype()),
+ ctx: ctx,
+ t: t,
+ s: stream,
+ p: &parser{r: stream},
+ codec: s.getCodec(stream.ContentSubtype()),
maxReceiveMessageSize: s.opts.maxReceiveMessageSize,
maxSendMessageSize: s.opts.maxSendMessageSize,
trInfo: trInfo,
@@ -1413,12 +1369,6 @@ func (s *Server) GracefulStop() {
s.mu.Unlock()
}
-func init() {
- internal.TestingUseHandlerImpl = func(arg interface{}) {
- arg.(*Server).opts.useHandlerImpl = true
- }
-}
-
// contentSubtype must be lowercase
// cannot return nil
func (s *Server) getCodec(contentSubtype string) baseCodec {
@@ -1487,3 +1437,11 @@ func Method(ctx context.Context) (string, bool) {
}
return s.Method(), true
}
+
+type channelzServer struct {
+ s *Server
+}
+
+func (c *channelzServer) ChannelzMetric() *channelz.ServerInternalMetric {
+ return c.s.channelzMetric()
+}
diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go
index d668a424d..8ee619bf6 100644
--- a/vendor/google.golang.org/grpc/version.go
+++ b/vendor/google.golang.org/grpc/version.go
@@ -19,4 +19,4 @@
package grpc
// Version is the current grpc version.
-const Version = "1.14.0"
+const Version = "1.15.0"
diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh
index 44a310e55..f42c034f7 100755
--- a/vendor/google.golang.org/grpc/vet.sh
+++ b/vendor/google.golang.org/grpc/vet.sh
@@ -13,19 +13,46 @@ die() {
exit 1
}
-PATH="$GOPATH/bin:$GOROOT/bin:$PATH"
+# Check to make sure it's safe to modify the user's git repo.
+if git status --porcelain | read; then
+ die "Uncommitted or untracked files found; commit changes first"
+fi
+
+if [[ -d "${GOPATH}/src" ]]; then
+ die "\${GOPATH}/src (${GOPATH}/src) exists; this script will delete it."
+fi
+
+# Undo any edits made by this script.
+cleanup() {
+ rm -rf "${GOPATH}/src"
+ git reset --hard HEAD
+}
+trap cleanup EXIT
-if [ "$1" = "-install" ]; then
- go get -d \
- google.golang.org/grpc/...
- go get -u \
- github.com/golang/lint/golint \
- golang.org/x/tools/cmd/goimports \
- honnef.co/go/tools/cmd/staticcheck \
- github.com/client9/misspell/cmd/misspell \
- github.com/golang/protobuf/protoc-gen-go
- if [[ -z "$VET_SKIP_PROTO" ]]; then
- if [[ "$TRAVIS" = "true" ]]; then
+PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"
+
+if [[ "$1" = "-install" ]]; then
+ # Check for module support
+ if go help mod >& /dev/null; then
+ go install \
+ github.com/golang/lint/golint \
+ golang.org/x/tools/cmd/goimports \
+ honnef.co/go/tools/cmd/staticcheck \
+ github.com/client9/misspell/cmd/misspell \
+ github.com/golang/protobuf/protoc-gen-go
+ else
+ # Ye olde `go get` incantation.
+ # Note: this gets the latest version of all tools (vs. the pinned versions
+ # with Go modules).
+ go get -u \
+ github.com/golang/lint/golint \
+ golang.org/x/tools/cmd/goimports \
+ honnef.co/go/tools/cmd/staticcheck \
+ github.com/client9/misspell/cmd/misspell \
+ github.com/golang/protobuf/protoc-gen-go
+ fi
+ if [[ -z "${VET_SKIP_PROTO}" ]]; then
+ if [[ "${TRAVIS}" = "true" ]]; then
PROTOBUF_VERSION=3.3.0
PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip
pushd /home/travis
@@ -42,48 +69,54 @@ elif [[ "$#" -ne 0 ]]; then
die "Unknown argument(s): $*"
fi
-# TODO: Remove this check and the mangling below once "context" is imported
-# directly.
-if git status --porcelain | read; then
- die "Uncommitted or untracked files found; commit changes first"
-fi
-
git ls-files "*.go" | xargs grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" 2>&1 | tee /dev/stderr | (! read)
-git ls-files "*.go" | xargs grep -l '"unsafe"' 2>&1 | (! grep -v '_test.go') | tee /dev/stderr | (! read)
git ls-files "*.go" | xargs grep -l '"math/rand"' 2>&1 | (! grep -v '^examples\|^stress\|grpcrand') | tee /dev/stderr | (! read)
+git ls-files | xargs dirname | sort | uniq | xargs go run go_vet/vet.go | tee /dev/stderr | (! read)
gofmt -s -d -l . 2>&1 | tee /dev/stderr | (! read)
goimports -l . 2>&1 | tee /dev/stderr | (! read)
golint ./... 2>&1 | (grep -vE "(_mock|\.pb)\.go:" || true) | tee /dev/stderr | (! read)
-# Undo any edits made by this script.
-cleanup() {
- git reset --hard HEAD
-}
-trap cleanup EXIT
-
# Rewrite golang.org/x/net/context -> context imports (see grpc/grpc-go#1484).
# TODO: Remove this mangling once "context" is imported directly (grpc/grpc-go#711).
git ls-files "*.go" | xargs sed -i 's:"golang.org/x/net/context":"context":'
-set +o pipefail
-# TODO: Stop filtering pb.go files once golang/protobuf#214 is fixed.
-go tool vet -all . 2>&1 | grep -vE '(clientconn|transport\/transport_test).go:.*cancel (function|var)' | grep -vF '.pb.go:' | tee /dev/stderr | (! read)
+set +o pipefail # vet exits with non-zero error if issues are found
+go tool vet -all . 2>&1 | grep -vE 'clientconn.go:.*cancel (function|var)' | tee /dev/stderr | (! read)
set -o pipefail
git reset --hard HEAD
-if [[ -z "$VET_SKIP_PROTO" ]]; then
- PATH="/home/travis/bin:$PATH" make proto && \
+if [[ -z "${VET_SKIP_PROTO}" ]]; then
+ PATH="/home/travis/bin:${PATH}" make proto && \
git status --porcelain 2>&1 | (! read) || \
(git status; git --no-pager diff; exit 1)
fi
+if go help mod >& /dev/null; then
+ go mod tidy && \
+ git status --porcelain 2>&1 | (! read) || \
+ (git status; git --no-pager diff; exit 1)
+fi
+
+### HACK HACK HACK: Remove once staticcheck works with modules.
+# Make a symlink in ${GOPATH}/src to its ${GOPATH}/pkg/mod equivalent for every package we use.
+for x in $(find "${GOPATH}/pkg/mod" -name '*@*' | grep -v \/mod\/cache\/); do
+ pkg="$(echo ${x#"${GOPATH}/pkg/mod/"} | cut -f1 -d@)";
+ # If multiple versions exist, just use the existing one.
+ if [[ -L "${GOPATH}/src/${pkg}" ]]; then continue; fi
+ mkdir -p "$(dirname "${GOPATH}/src/${pkg}")";
+ ln -s $x "${GOPATH}/src/${pkg}";
+done
+### END HACK HACK HACK
+
# TODO(menghanl): fix errors in transport_test.
staticcheck -ignore '
-google.golang.org/grpc/internal/transport/transport_test.go:SA2002
-google.golang.org/grpc/benchmark/benchmain/main.go:SA1019
-google.golang.org/grpc/stats/stats_test.go:SA1019
-google.golang.org/grpc/test/end2end_test.go:SA1019
-google.golang.org/grpc/balancer_test.go:SA1019
-google.golang.org/grpc/balancer.go:SA1019
-google.golang.org/grpc/clientconn_test.go:SA1019
+internal/transport/transport_test.go:SA2002
+benchmark/benchmain/main.go:SA1019
+stats/stats_test.go:SA1019
+test/end2end_test.go:SA1019
+balancer_test.go:SA1019
+balancer.go:SA1019
+clientconn_test.go:SA1019
+internal/transport/handler_server_test.go:SA1019
+internal/transport/handler_server.go:SA1019
' ./...
misspell -error .
diff --git a/vendor/gopkg.in/olivere/elastic.v5/.travis.yml b/vendor/gopkg.in/olivere/elastic.v5/.travis.yml
index 24e24ecc8..59ac0527d 100644
--- a/vendor/gopkg.in/olivere/elastic.v5/.travis.yml
+++ b/vendor/gopkg.in/olivere/elastic.v5/.travis.yml
@@ -2,10 +2,11 @@ sudo: required
language: go
go:
- "1.10.x"
-- "1.11rc1"
+- "1.11.x"
#- tip
env:
- GO111MODULE=on
+- GO111MODULE=off
matrix:
allow_failures:
- go: tip
@@ -15,11 +16,11 @@ before_install:
# Install netcat
- if [[ "$TRAVIS_OS_NAME" == "linux" && ! $(which nc) ]] ; then sudo apt-get install -y netcat ; fi
- sudo sysctl -w vm.max_map_count=262144
-- docker run --rm --privileged=true -p 9200:9200 -p 9300:9300 -e "bootstrap.memory_lock=true" -e "ES_JAVA_OPTS=-Xms1g -Xmx1g" docker.elastic.co/elasticsearch/elasticsearch:5.6.10 elasticsearch -Expack.security.enabled=false -Escript.inline=true -Escript.stored=true -Escript.file=true -Enetwork.host=_local_,_site_ -Enetwork.publish_host=_local_ >& /dev/null &
+- docker run --rm --privileged=true -p 9200:9200 -p 9300:9300 -e "bootstrap.memory_lock=true" -e "ES_JAVA_OPTS=-Xms1g -Xmx1g" docker.elastic.co/elasticsearch/elasticsearch:5.6.12 elasticsearch -Expack.security.enabled=false -Escript.inline=true -Escript.stored=true -Escript.file=true -Enetwork.host=_local_,_site_ -Enetwork.publish_host=_local_ >& /dev/null &
- go get -u github.com/fortytw2/leaktest
-- go get . ./config/... ./aws/...
+- go get . ./aws/... ./config/... ./uritemplates/...
# Wait for Elasticsearch
- while ! nc -z localhost 9200; do sleep 1; done
install: true
script:
-- go test -race -v . ./aws/... ./config/...
+- go test -race -v . ./aws/... ./config/... ./uritemplates/...
diff --git a/vendor/gopkg.in/olivere/elastic.v5/CONTRIBUTORS b/vendor/gopkg.in/olivere/elastic.v5/CONTRIBUTORS
index 1beea081f..db6c1e443 100644
--- a/vendor/gopkg.in/olivere/elastic.v5/CONTRIBUTORS
+++ b/vendor/gopkg.in/olivere/elastic.v5/CONTRIBUTORS
@@ -29,6 +29,7 @@ Braden Bassingthwaite [@bbassingthwaite-va](https://github.com/bbassingthwaite-v
Brady Love [@bradylove](https://github.com/bradylove)
Bryan Conklin [@bmconklin](https://github.com/bmconklin)
Bruce Zhou [@brucez-isell](https://github.com/brucez-isell)
+Carl Dunham [@carldunham](https://github.com/carldunham)
César Jiménez [@cesarjimenez](https://github.com/cesarjimenez)
cforbes [@cforbes](https://github.com/cforbes)
Chris M [@tebriel](https://github.com/tebriel)
@@ -36,6 +37,7 @@ Chris Rice [@donutmonger](https://github.com/donutmonger)
Claudiu Olteanu [@claudiuolteanu](https://github.com/claudiuolteanu)
Chris Duncan [@veqryn](https://github.com/veqryn)
Christophe Courtaut [@kri5](https://github.com/kri5)
+cmitchell [@cmitchell](https://github.com/cmitchell)
Connor Peet [@connor4312](https://github.com/connor4312)
Conrad Pankoff [@deoxxa](https://github.com/deoxxa)
Corey Scott [@corsc](https://github.com/corsc)
@@ -51,6 +53,7 @@ Evan Shaw [@edsrzf](https://github.com/edsrzf)
Fanfan [@wenpos](https://github.com/wenpos)
Faolan C-P [@fcheslack](https://github.com/fcheslack)
Filip Tepper [@filiptepper](https://github.com/filiptepper)
+Garrett Kelley [@GarrettKelley](https://github.com/GarrettKelley)
Gaspard Douady [@plopik](https://github.com/plopik)
Gaylord Aulke [@blafasel42](https://github.com/blafasel42)
Gerhard Häring [@ghaering](https://github.com/ghaering)
@@ -78,6 +81,7 @@ John Goodall [@jgoodall](https://github.com/jgoodall)
John Stanford [@jxstanford](https://github.com/jxstanford)
Jonas Groenaas Drange [@semafor](https://github.com/semafor)
Josef Fröhle [@Dexus](https://github.com/Dexus)
+José Martínez [@xose](https://github.com/xose)
Josh Chorlton [@jchorl](https://github.com/jchorl)
jun [@coseyo](https://github.com/coseyo)
Junpei Tsuji [@jun06t](https://github.com/jun06t)
@@ -100,6 +104,7 @@ Mike Beshai [@mbesh](https://github.com/mbesh)
mmfrb [@mmfrb](https://github.com/mmfrb)
mnpritula [@mnpritula](https://github.com/mnpritula)
mosa [@mosasiru](https://github.com/mosasiru)
+Muhammet Çakır [@cakirmuha](https://github.com/cakirmuha)
naimulhaider [@naimulhaider](https://github.com/naimulhaider)
Naoya Yoshizawa [@azihsoyn](https://github.com/azihsoyn)
navins [@ishare](https://github.com/ishare)
@@ -111,6 +116,7 @@ Nick Whyte [@nickw444](https://github.com/nickw444)
Nicolae Vartolomei [@nvartolomei](https://github.com/nvartolomei)
Orne Brocaar [@brocaar](https://github.com/brocaar)
Paul [@eyeamera](https://github.com/eyeamera)
+Paul Oldenburg [@lr-paul](https://github.com/lr-paul)
Pete C [@peteclark-ft](https://github.com/peteclark-ft)
Paolo [@ppiccolo](https://github.com/ppiccolo)
Radoslaw Wesolowski [r--w](https://github.com/r--w)
@@ -120,9 +126,11 @@ Ryan Schmukler [@rschmukler](https://github.com/rschmukler)
Ryan Wynn [@rwynn](https://github.com/rwynn)
Sacheendra talluri [@sacheendra](https://github.com/sacheendra)
Sean DuBois [@Sean-Der](https://github.com/Sean-Der)
+Sagan Yaroslav [@sgnrslv](https://github.com/sgnrslv)
Shalin LK [@shalinlk](https://github.com/shalinlk)
singham [@zhaochenxiao90](https://github.com/zhaochenxiao90)
Slawomir CALUCH [@slawo](https://github.com/slawo)
+Stephan Krynauw [@skrynauw](https://github.com/skrynauw)
Stephen Kubovic [@stephenkubovic](https://github.com/stephenkubovic)
Stuart Warren [@Woz](https://github.com/stuart-warren)
Sulaiman [@salajlan](https://github.com/salajlan)
diff --git a/vendor/gopkg.in/olivere/elastic.v5/client.go b/vendor/gopkg.in/olivere/elastic.v5/client.go
index b5f5c75ad..7617e1443 100644
--- a/vendor/gopkg.in/olivere/elastic.v5/client.go
+++ b/vendor/gopkg.in/olivere/elastic.v5/client.go
@@ -26,7 +26,7 @@ import (
const (
// Version is the current version of Elastic.
- Version = "5.0.74"
+ Version = "5.0.76"
// DefaultURL is the default endpoint of Elasticsearch on the local machine.
// It is used e.g. when initializing a new Client without a specific URL.
diff --git a/vendor/gopkg.in/olivere/elastic.v5/run-es.sh b/vendor/gopkg.in/olivere/elastic.v5/run-es.sh
index 68967a5c3..f8f3d8daf 100755
--- a/vendor/gopkg.in/olivere/elastic.v5/run-es.sh
+++ b/vendor/gopkg.in/olivere/elastic.v5/run-es.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-VERSION=${VERSION:=5.6.10}
+VERSION=${VERSION:=5.6.12}
docker run --rm --privileged=true -p 9200:9200 -p 9300:9300 -v "$PWD/etc:/usr/share/elasticsearch/config" -e "bootstrap.memory_lock=true" -e "ES_JAVA_OPTS=-Xms1g -Xmx1g" docker.elastic.co/elasticsearch/elasticsearch:$VERSION elasticsearch -Expack.security.enabled=false -Expack.ml.enabled=false -Escript.inline=true -Escript.stored=true -Escript.file=true
diff --git a/vendor/gopkg.in/olivere/elastic.v5/search.go b/vendor/gopkg.in/olivere/elastic.v5/search.go
index a9eb212f4..80beafdf3 100644
--- a/vendor/gopkg.in/olivere/elastic.v5/search.go
+++ b/vendor/gopkg.in/olivere/elastic.v5/search.go
@@ -461,6 +461,13 @@ type SearchHits struct {
Hits []*SearchHit `json:"hits"` // the actual hits returned
}
+// NestedHit is a nested innerhit
+type NestedHit struct {
+ Field string `json:"field"`
+ Offset int `json:"offset,omitempty"`
+ Child *NestedHit `json:"_nested,omitempty"`
+}
+
// SearchHit is a single hit.
type SearchHit struct {
Score *float64 `json:"_score"` // computed score
@@ -478,6 +485,7 @@ type SearchHit struct {
Explanation *SearchExplanation `json:"_explanation"` // explains how the score was computed
MatchedQueries []string `json:"matched_queries"` // matched queries
InnerHits map[string]*SearchHitInnerHits `json:"inner_hits"` // inner hits with ES >= 1.5.0
+ Nested *NestedHit `json:"_nested"` // for nested inner hits
// Shard
// HighlightFields
diff --git a/vendor/gopkg.in/olivere/elastic.v5/search_aggs.go b/vendor/gopkg.in/olivere/elastic.v5/search_aggs.go
index 999a57d60..cc4921aeb 100644
--- a/vendor/gopkg.in/olivere/elastic.v5/search_aggs.go
+++ b/vendor/gopkg.in/olivere/elastic.v5/search_aggs.go
@@ -459,6 +459,7 @@ func (a Aggregations) Histogram(name string) (*AggregationBucketHistogramItems,
}
// DateHistogram returns date histogram aggregation results.
+//
// See: https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-aggregations-bucket-datehistogram-aggregation.html
func (a Aggregations) DateHistogram(name string) (*AggregationBucketHistogramItems, bool) {
if raw, found := a[name]; found {
@@ -473,6 +474,22 @@ func (a Aggregations) DateHistogram(name string) (*AggregationBucketHistogramIte
return nil, false
}
+// KeyedDateHistogram returns date histogram aggregation results for keyed responses.
+//
+// See: https://www.elastic.co/guide/en/elasticsearch/reference/5.6/search-aggregations-bucket-datehistogram-aggregation.html#_keyed_response_3
+func (a Aggregations) KeyedDateHistogram(name string) (*AggregationBucketKeyedHistogramItems, bool) {
+ if raw, found := a[name]; found {
+ agg := new(AggregationBucketKeyedHistogramItems)
+ if raw == nil {
+ return agg, true
+ }
+ if err := json.Unmarshal(*raw, agg); err == nil {
+ return agg, true
+ }
+ }
+ return nil, false
+}
+
// GeoBounds returns geo-bounds aggregation results.
// See: https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-aggregations-metrics-geobounds-aggregation.html
func (a Aggregations) GeoBounds(name string) (*AggregationGeoBoundsMetric, bool) {
@@ -1332,6 +1349,31 @@ func (a *AggregationBucketHistogramItems) UnmarshalJSON(data []byte) error {
return nil
}
+// AggregationBucketKeyedHistogramItems is a bucket aggregation that is returned
+// with a (keyed) date histogram aggregation.
+type AggregationBucketKeyedHistogramItems struct {
+ Aggregations
+
+ Buckets map[string]*AggregationBucketHistogramItem //`json:"buckets"`
+ Meta map[string]interface{} // `json:"meta,omitempty"`
+}
+
+// UnmarshalJSON decodes JSON data and initializes an AggregationBucketKeyedHistogramItems structure.
+func (a *AggregationBucketKeyedHistogramItems) UnmarshalJSON(data []byte) error {
+ var aggs map[string]*json.RawMessage
+ if err := json.Unmarshal(data, &aggs); err != nil {
+ return err
+ }
+ if v, ok := aggs["buckets"]; ok && v != nil {
+ json.Unmarshal(*v, &a.Buckets)
+ }
+ if v, ok := aggs["meta"]; ok && v != nil {
+ json.Unmarshal(*v, &a.Meta)
+ }
+ a.Aggregations = aggs
+ return nil
+}
+
// AggregationBucketHistogramItem is a single bucket of an AggregationBucketHistogramItems structure.
type AggregationBucketHistogramItem struct {
Aggregations
diff --git a/vendor/gopkg.in/olivere/elastic.v5/search_aggs_bucket_date_histogram.go b/vendor/gopkg.in/olivere/elastic.v5/search_aggs_bucket_date_histogram.go
index 17916b490..aaebe0a92 100644
--- a/vendor/gopkg.in/olivere/elastic.v5/search_aggs_bucket_date_histogram.go
+++ b/vendor/gopkg.in/olivere/elastic.v5/search_aggs_bucket_date_histogram.go
@@ -23,6 +23,7 @@ type DateHistogramAggregation struct {
timeZone string
format string
offset string
+ keyed *bool
}
// NewDateHistogramAggregation creates a new DateHistogramAggregation.
@@ -196,6 +197,13 @@ func (a *DateHistogramAggregation) ExtendedBoundsMax(max interface{}) *DateHisto
return a
}
+// Keyed specifies whether to return the results with a keyed response (or not).
+// See https://www.elastic.co/guide/en/elasticsearch/reference/5.6/search-aggregations-bucket-datehistogram-aggregation.html#_keyed_response_3.
+func (a *DateHistogramAggregation) Keyed(keyed bool) *DateHistogramAggregation {
+ a.keyed = &keyed
+ return a
+}
+
func (a *DateHistogramAggregation) Source() (interface{}, error) {
// Example:
// {
@@ -262,6 +270,9 @@ func (a *DateHistogramAggregation) Source() (interface{}, error) {
}
opts["extended_bounds"] = bounds
}
+ if a.keyed != nil {
+ opts["keyed"] = *a.keyed
+ }
// AggregationBuilder (SubAggregations)
if len(a.subAggregations) > 0 {
diff --git a/vendor/gopkg.in/olivere/elastic.v5/search_shards.go b/vendor/gopkg.in/olivere/elastic.v5/search_shards.go
index edd9b0547..ad7fa17d5 100644
--- a/vendor/gopkg.in/olivere/elastic.v5/search_shards.go
+++ b/vendor/gopkg.in/olivere/elastic.v5/search_shards.go
@@ -176,5 +176,5 @@ type ShardsInfo struct {
Shard uint `json:"shard"`
State string `json:"state"`
AllocationId interface{} `json:"allocation_id"`
- RelocatingNode bool `json:"relocating_node"`
+ RelocatingNode string `json:"relocating_node"`
}