Merge pull request #4626 from dims/bump-to-newer-docker-tag

Updating to latest docker
This commit is contained in:
Akihiro Suda 2020-10-14 16:11:13 +09:00 committed by GitHub
commit b6d7ca7c47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
72 changed files with 3763 additions and 4314 deletions

View File

@ -275,7 +275,7 @@ func launchService(s *server.Server, done chan struct{}) error {
done: done, done: done,
} }
interactive, err := svc.IsAnInteractiveSession() interactive, err := svc.IsAnInteractiveSession() // nolint:staticcheck
if err != nil { if err != nil {
return err return err
} }

View File

@ -47,7 +47,7 @@ go.etcd.io/bbolt v1.3.5
go.opencensus.io v0.22.0 go.opencensus.io v0.22.0
golang.org/x/net ab34263943818b32f575efc978a3d24e80b04bd7 golang.org/x/net ab34263943818b32f575efc978a3d24e80b04bd7
golang.org/x/sync 42b317875d0fa942474b76e1b46a6060d720ae6e golang.org/x/sync 42b317875d0fa942474b76e1b46a6060d720ae6e
golang.org/x/sys 2334cc1a136f0a5b4384f1a27e3634457be08553 golang.org/x/sys 0aaa2718063a42560507fce2cc04508608ca23b3
golang.org/x/text v0.3.3 golang.org/x/text v0.3.3
google.golang.org/genproto e50cd9704f63023d62cd06a1994b98227fc4d21a google.golang.org/genproto e50cd9704f63023d62cd06a1994b98227fc4d21a
google.golang.org/grpc v1.27.1 google.golang.org/grpc v1.27.1
@ -58,7 +58,7 @@ github.com/cilium/ebpf 1c8d4c9ef7759622653a1d319284
# cri dependencies # cri dependencies
github.com/davecgh/go-spew v1.1.1 github.com/davecgh/go-spew v1.1.1
github.com/docker/docker 4634ce647cf2ce2c6031129ccd109e557244986f github.com/docker/docker 9c15e82f19b0ad3c5fe8617a8ec2dddc6639f40a
github.com/docker/spdystream 449fdfce4d962303d702fec724ef0ad181c92528 github.com/docker/spdystream 449fdfce4d962303d702fec724ef0ad181c92528
github.com/emicklei/go-restful v2.9.5 github.com/emicklei/go-restful v2.9.5
github.com/go-logr/logr v0.2.0 github.com/go-logr/logr v0.2.0

View File

@ -1,45 +1,47 @@
github.com/Azure/go-ansiterm d6e3b3328b783f23731bc4d058875b0371ff8109 github.com/Azure/go-ansiterm d6e3b3328b783f23731bc4d058875b0371ff8109
github.com/Microsoft/hcsshim b3f49c06ffaeef24d09c6c08ec8ec8425a0303e2 # v0.8.7 github.com/Microsoft/hcsshim 9dcb42f100215f8d375b4a9265e5bba009217a85 # moby branch
github.com/Microsoft/go-winio 6c72808b55902eae4c5943626030429ff20f3b63 # v0.4.14 github.com/Microsoft/go-winio 5b44b70ab3ab4d291a7c1d28afe7b4afeced0ed4 # v0.4.15-0.20200908182639-5b44b70ab3ab
github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a
github.com/golang/gddo 72a348e765d293ed6d1ded7b699591f14d6cd921 github.com/golang/gddo 72a348e765d293ed6d1ded7b699591f14d6cd921
github.com/google/uuid 0cd6bf5da1e1c83f8b45653022c74f71af0538a4 # v1.1.1 github.com/google/uuid 0cd6bf5da1e1c83f8b45653022c74f71af0538a4 # v1.1.1
github.com/gorilla/mux 00bdffe0f3c77e27d2cf6f5c70232a2d3e4d9c15 # v1.7.3 github.com/gorilla/mux 98cb6bf42e086f6af920b965c38cacc07402d51b # v1.8.0
github.com/Microsoft/opengcs a10967154e143a36014584a6f664344e3bb0aa64 github.com/Microsoft/opengcs a10967154e143a36014584a6f664344e3bb0aa64
github.com/moby/locker 281af2d563954745bea9d1487c965f24d30742fe # v1.0.1
github.com/moby/term 7f0af18e79f2784809e9cef63d0df5aa2c79d76e
github.com/creack/pty 3a6a957789163cacdfe0e291617a1c8e80612c11 # v1.1.9 github.com/creack/pty 3a6a957789163cacdfe0e291617a1c8e80612c11 # v1.1.9
github.com/konsorten/go-windows-terminal-sequences f55edac94c9bbba5d6182a4be46d86a2c9b5b50e # v1.0.2 github.com/sirupsen/logrus 6699a89a232f3db797f2e280639854bbc4b89725 # v1.7.0
github.com/mattn/go-shellwords 36a9b3c57cb5caa559ff63fb7e9b585f1c00df75 # v1.0.6
github.com/sirupsen/logrus 839c75faf7f98a33d445d181f3018b5c3409a45e # v1.4.2
github.com/tchap/go-patricia a7f0089c6f496e8e70402f61733606daa326cac5 # v2.3.0 github.com/tchap/go-patricia a7f0089c6f496e8e70402f61733606daa326cac5 # v2.3.0
golang.org/x/net 0de0cce0169b09b364e001f108dc0399ea8630b3 golang.org/x/net ab34263943818b32f575efc978a3d24e80b04bd7
golang.org/x/sys d5e6a3e2c0ae16fc7480523ebcb7fd4dd3215489 golang.org/x/sys aee5d888a86055dc6ab0342f9cdc7b53aaeaec62
github.com/docker/go-units 519db1ee28dcc9fd2474ae59fca29a810482bfb1 # v0.4.0 github.com/docker/go-units 519db1ee28dcc9fd2474ae59fca29a810482bfb1 # v0.4.0
github.com/docker/go-connections 7395e3f8aa162843a74ed6d48e79627d9792ac55 # v0.4.0 github.com/docker/go-connections 7395e3f8aa162843a74ed6d48e79627d9792ac55 # v0.4.0
golang.org/x/text 342b2e1fbaa52c93f31447ad2c6abc048c63e475 # v0.3.2 github.com/moby/sys 6154f11e6840c0d6b0dbb23f4125a6134b3013c9 # mountinfo/v0.1.3
golang.org/x/text 23ae387dee1f90d29a23c0e87ee0b46038fbed0e # v0.3.3
gotest.tools/v3 bb0d8a963040ea5048dcef1a14d8f8b58a33d4b3 # v3.0.2 gotest.tools/v3 bb0d8a963040ea5048dcef1a14d8f8b58a33d4b3 # v3.0.2
github.com/google/go-cmp 3af367b6b30c263d47e8895973edcca9a49cf029 # v0.2.0 github.com/google/go-cmp 3af367b6b30c263d47e8895973edcca9a49cf029 # v0.2.0
github.com/syndtr/gocapability d98352740cb2c55f81556b63d4a1ec64c5a319c2 github.com/syndtr/gocapability 42c35b4376354fd554efc7ad35e0b7f94e3a0ffb
github.com/RackSec/srslog a4725f04ec91af1a91b380da679d6e0c2f061e59 github.com/RackSec/srslog a4725f04ec91af1a91b380da679d6e0c2f061e59
github.com/imdario/mergo 1afb36080aec31e0d1528973ebe6721b191b0369 # v0.3.8 github.com/imdario/mergo 1afb36080aec31e0d1528973ebe6721b191b0369 # v0.3.8
golang.org/x/sync cd5d95a43a6e21273425c7ae415d3df9ea832eeb golang.org/x/sync cd5d95a43a6e21273425c7ae415d3df9ea832eeb
# buildkit # buildkit
github.com/moby/buildkit 4d8d91bf49c769b8458e9aa84746c842b4a0e39a github.com/moby/buildkit 4d1f260e8490ec438ab66e08bb105577aca0ce06
github.com/tonistiigi/fsutil 013a9fe6aee2d1658457075bf9e688bc8c0be2e0 github.com/tonistiigi/fsutil ae3a8d753069d0f76fbee396457e8b6cfd7cb8c3
github.com/grpc-ecosystem/grpc-opentracing 8e809c8a86450a29b90dcc9efbf062d0fe6d9746 github.com/grpc-ecosystem/grpc-opentracing 8e809c8a86450a29b90dcc9efbf062d0fe6d9746
github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7 github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7
github.com/google/shlex e7afc7fbc51079733e9468cdfd1efcd7d196cd1d github.com/google/shlex e7afc7fbc51079733e9468cdfd1efcd7d196cd1d
github.com/opentracing-contrib/go-stdlib b1a47cfbdd7543e70e9ef3e73d0802ad306cc1cc github.com/opentracing-contrib/go-stdlib b1a47cfbdd7543e70e9ef3e73d0802ad306cc1cc
github.com/mitchellh/hashstructure 2bca23e0e452137f789efbc8610126fd8b94f73b github.com/mitchellh/hashstructure 2bca23e0e452137f789efbc8610126fd8b94f73b
github.com/gofrs/flock 392e7fae8f1b0bdbd67dad7237d23f618feb6dbb # v0.7.1 github.com/gofrs/flock 6caa7350c26b838538005fae7dbee4e69d9398db # v0.7.3
github.com/grpc-ecosystem/go-grpc-middleware 3c51f7f332123e8be5a157c0802a228ac85bf9db # v1.2.0
# libnetwork # libnetwork
# When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy.installer accordingly # When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy.installer accordingly
github.com/docker/libnetwork bf2bd42abc0a3734f12b5ec724e571434e42c669 github.com/docker/libnetwork d0951081b35fa4216fc4f0064bf065beeb55a74b
github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9 github.com/docker/go-events e31b211e4f1cd09aa76fe4ac244571fab96ae47f
github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80 github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
github.com/hashicorp/go-msgpack 71c2886f5a673a35f909803f38ece5810165097b github.com/hashicorp/go-msgpack 71c2886f5a673a35f909803f38ece5810165097b
@ -50,8 +52,9 @@ github.com/hashicorp/go-sockaddr c7188e74f6acae5a989bdc959aa7
github.com/hashicorp/go-multierror 886a7fbe3eb1c874d46f623bfa70af45f425b3d1 # v1.0.0 github.com/hashicorp/go-multierror 886a7fbe3eb1c874d46f623bfa70af45f425b3d1 # v1.0.0
github.com/hashicorp/serf 598c54895cc5a7b1a24a398d635e8c0ea0959870 github.com/hashicorp/serf 598c54895cc5a7b1a24a398d635e8c0ea0959870
github.com/docker/libkv 458977154600b9f23984d9f4b82e79570b5ae12b github.com/docker/libkv 458977154600b9f23984d9f4b82e79570b5ae12b
github.com/vishvananda/netns 7109fa855b0ff1ebef7fbd2f6aa613e8db7cfbc0 github.com/vishvananda/netns db3c7e526aae966c4ccfa6c8189b693d6ac5d202
github.com/vishvananda/netlink a2ad57a690f3caf3015351d2d6e1c0b95c349752 github.com/vishvananda/netlink f049be6f391489d3f374498fe0c8df8449258372 # v1.1.0
github.com/moby/ipvs 4566ccea0e08d68e9614c3e7a64a23b850c4bb35 # v1.0.1
# When updating, consider updating TOMLV_COMMIT in hack/dockerfile/install/tomlv.installer accordingly # When updating, consider updating TOMLV_COMMIT in hack/dockerfile/install/tomlv.installer accordingly
github.com/BurntSushi/toml 3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005 # v0.3.1 github.com/BurntSushi/toml 3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005 # v0.3.1
@ -63,12 +66,12 @@ github.com/ugorji/go b4c50a2b199d93b13dc15e78929c
github.com/hashicorp/consul 9a9cc9341bb487651a0399e3fc5e1e8a42e62dd9 # v0.5.2 github.com/hashicorp/consul 9a9cc9341bb487651a0399e3fc5e1e8a42e62dd9 # v0.5.2
github.com/miekg/dns 6c0c4e6581f8e173cc562c8b3363ab984e4ae071 # v1.1.27 github.com/miekg/dns 6c0c4e6581f8e173cc562c8b3363ab984e4ae071 # v1.1.27
github.com/ishidawataru/sctp 6e2cb1366111dcf547c13531e3a263a067715847 github.com/ishidawataru/sctp 6e2cb1366111dcf547c13531e3a263a067715847
go.etcd.io/bbolt a0458a2b35708eef59eb5f620ceb3cd1c01a824d # v1.3.3 go.etcd.io/bbolt 232d8fc87f50244f9c808f4745759e08a304c029 # v1.3.5
# get graph and distribution packages # get graph and distribution packages
github.com/docker/distribution 0d3efadf0154c2b8a4e7b6621fff9809655cc580 github.com/docker/distribution 0d3efadf0154c2b8a4e7b6621fff9809655cc580
github.com/vbatts/tar-split 620714a4c508c880ac1bdda9c8370a2b19af1a55 # v0.11.0 github.com/vbatts/tar-split 620714a4c508c880ac1bdda9c8370a2b19af1a55 # v0.11.1
github.com/opencontainers/go-digest 279bed98673dd5bef374d3b6e4b09e2af76183bf # v1.0.0-rc1 github.com/opencontainers/go-digest ea51bea511f75cfa3ef6098cc253c5c3609b037a # v1.0.0
# get go-zfs packages # get go-zfs packages
github.com/mistifyio/go-zfs f784269be439d704d3dfa1906f45dd848fed2beb github.com/mistifyio/go-zfs f784269be439d704d3dfa1906f45dd848fed2beb
@ -80,16 +83,17 @@ google.golang.org/grpc f495f5b15ae7ccda3b38c53a1bfc
# the containerd project first, and update both after that is merged. # the containerd project first, and update both after that is merged.
# This commit does not need to match RUNC_COMMIT as it is used for helper # This commit does not need to match RUNC_COMMIT as it is used for helper
# packages but should be newer or equal. # packages but should be newer or equal.
github.com/opencontainers/runc dc9208a3303feef5b3839f4323d9beb36df0a9dd # v1.0.0-rc10 github.com/opencontainers/runc ff819c7e9184c13b7c2607fe6c30ae19403a7aff # v1.0.0-rc92
github.com/opencontainers/runtime-spec 29686dbc5559d93fb1ef402eeda3e35c38d75af4 # v1.0.1-59-g29686db github.com/opencontainers/runtime-spec 4d89ac9fbff6c455f46a5bb59c6b1bb7184a5e43 # v1.0.3-0.20200728170252-4d89ac9fbff6
github.com/opencontainers/image-spec d60099175f88c47cd379c4738d158884749ed235 # v1.0.1 github.com/opencontainers/image-spec d60099175f88c47cd379c4738d158884749ed235 # v1.0.1
github.com/seccomp/libseccomp-golang 689e3c1541a84461afc49c1c87352a6cedf72e9c # v0.9.1 github.com/cyphar/filepath-securejoin a261ee33d7a517f054effbf451841abaafe3e0fd # v0.2.2
# go-systemd v17 is required by github.com/coreos/pkg/capnslog/journald_formatter.go
github.com/coreos/go-systemd 39ca1b05acc7ad1220e09f133283b8859a8b71ab # v17
# systemd integration (journald, daemon/listeners, containerd/cgroups) # systemd integration (journald, daemon/listeners, containerd/cgroups)
github.com/coreos/go-systemd/v22 2d78030078ef61b3cae27f42ad6d0e46db51b339 # v22.0.0 github.com/coreos/go-systemd/v22 2d78030078ef61b3cae27f42ad6d0e46db51b339 # v22.0.0
github.com/godbus/dbus/v5 37bf87eef99d69c4f1d3528bd66e3a87dc201472 # v5.0.3 github.com/godbus/dbus/v5 37bf87eef99d69c4f1d3528bd66e3a87dc201472 # v5.0.3
# go-systemd v17 is required by github.com/coreos/pkg/capnslog/journald_formatter.go
github.com/coreos/go-systemd 39ca1b05acc7ad1220e09f133283b8859a8b71ab # v17
# gelf logging driver deps # gelf logging driver deps
github.com/Graylog2/go-gelf 1550ee647df0510058c9d67a45c56f18911d80b8 # v2 branch github.com/Graylog2/go-gelf 1550ee647df0510058c9d67a45c56f18911d80b8 # v2 branch
@ -100,69 +104,82 @@ github.com/philhofer/fwd bb6d471dc95d4fe11e432687f8b7
github.com/tinylib/msgp af6442a0fcf6e2a1b824f70dd0c734f01e817751 # v1.1.0 github.com/tinylib/msgp af6442a0fcf6e2a1b824f70dd0c734f01e817751 # v1.1.0
# fsnotify # fsnotify
github.com/fsnotify/fsnotify 1485a34d5d5723fea214f5710708e19a831720e4 # v1.4.7-11-g1485a34 github.com/fsnotify/fsnotify 45d7d09e39ef4ac08d493309fa031790c15bfe8a # v1.4.9
# awslogs deps # awslogs deps
github.com/aws/aws-sdk-go 2590bc875c54c9fda225d8e4e56a9d28d90c6a47 # v1.28.11 github.com/aws/aws-sdk-go 2590bc875c54c9fda225d8e4e56a9d28d90c6a47 # v1.28.11
github.com/jmespath/go-jmespath c2b33e8439af944379acbdd9c3a5fe0bc44bd8a5 # see https://github.com/aws/aws-sdk-go/blob/2590bc875c54c9fda225d8e4e56a9d28d90c6a47/Gopkg.toml#L42 github.com/jmespath/go-jmespath 2d053f87d1d7f9f48196ae04cf3daea4273d207d # v0.3.0
# logentries # logentries
github.com/bsphere/le_go 7a984a84b5492ae539b79b62fb4a10afc63c7bcf github.com/bsphere/le_go 7a984a84b5492ae539b79b62fb4a10afc63c7bcf
# gcplogs deps # gcplogs deps
golang.org/x/oauth2 bf48bf16ab8d622ce64ec6ce98d2c98f916b6303 golang.org/x/oauth2 bf48bf16ab8d622ce64ec6ce98d2c98f916b6303
google.golang.org/api de943baf05a022a8f921b544b7827bacaba1aed5 google.golang.org/api dec2ee309f5b09fc59bc40676447c15736284d78 # v0.8.0
go.opencensus.io c3ed530f775d85e577ca652cb052a52c078aad26 # v0.11.0 github.com/golang/groupcache 869f871628b6baa9cfbc11732cdf6546b17c1298
cloud.google.com/go 0fd7230b2a7505833d5f69b75cbd6c9582401479 # v0.23.0 go.opencensus.io d835ff86be02193d324330acdb7d65546b05f814 # v0.22.3
github.com/googleapis/gax-go 317e0006254c44a0ac427cc52a0e083ff0b9622f # v2.0.0 cloud.google.com/go ceeb313ad77b789a7fa5287b36a1d127b69b7093 # v0.44.3
github.com/googleapis/gax-go bd5b16380fd03dc758d11cef74ba2e3bc8b0e8c2 # v2.0.5
google.golang.org/genproto 3f1135a288c9a07e340ae8ba4cc6c7065a3160e8 google.golang.org/genproto 3f1135a288c9a07e340ae8ba4cc6c7065a3160e8
# containerd # containerd
github.com/containerd/containerd 4d242818bf55542e5d7876ca276fea83029e803c github.com/containerd/containerd c623d1b36f09f8ef6536a057bd658b3aa8632828 # v1.4.1
github.com/containerd/fifo ff969a566b00877c63489baf6e8c35d60af6142c github.com/containerd/fifo f15a3290365b9d2627d189e619ab4008e0069caf
github.com/containerd/continuity 26c1120b8d4107d2471b93ad78ef7ce1fc84c4c4 github.com/containerd/continuity efbc4488d8fe1bdc16bde3b2d2990d9b3a899165
github.com/containerd/cgroups 44306b6a1d46985d916b48b4199f93a378af314f github.com/containerd/cgroups 318312a373405e5e91134d8063d04d59768a1bff
github.com/containerd/console 8375c3424e4d7b114e8a90a4a40c8e1b40d1d4e6 github.com/containerd/console 8375c3424e4d7b114e8a90a4a40c8e1b40d1d4e6 # v1.0.0
github.com/containerd/go-runc 7016d3ce2328dd2cb1192b2076ebd565c4e8df0c github.com/containerd/go-runc 7016d3ce2328dd2cb1192b2076ebd565c4e8df0c
github.com/containerd/typeurl b45ef1f1f737e10bd45b25b669df25f0da8b9ba0 github.com/containerd/typeurl cd3ce7159eae562a4f60ceff37dada11a939d247 # v1.0.1
github.com/containerd/ttrpc 0be804eadb152bc3b3c20c5edc314c4633833398 github.com/containerd/ttrpc 72bb1b21c5b0a4a107f59dd85f6ab58e564b68d6 # v1.0.1
github.com/gogo/googleapis 01e0f9cca9b92166042241267ee2a5cdf5cff46c # v1.3.2 github.com/gogo/googleapis 01e0f9cca9b92166042241267ee2a5cdf5cff46c # v1.3.2
github.com/cilium/ebpf 1c8d4c9ef7759622653a1d319284a44652333b28
# cluster # cluster
github.com/docker/swarmkit 49e35619b18200845c9365c1e953440c28868002 github.com/docker/swarmkit d6592ddefd8a5319aadff74c558b816b1a0b2590
github.com/gogo/protobuf 5628607bb4c51c3157aacc3a50f0ab707582b805 # v1.3.1 github.com/gogo/protobuf 5628607bb4c51c3157aacc3a50f0ab707582b805 # v1.3.1
github.com/golang/protobuf d23c5127dc24889085f8ccea5c9d560a57a879d8 # v1.3.3 github.com/golang/protobuf 84668698ea25b64748563aa20726db66a6b8d299 # v1.3.5
github.com/cloudflare/cfssl 5d63dbd981b5c408effbb58c442d54761ff94fbd # 1.3.2 github.com/cloudflare/cfssl 5d63dbd981b5c408effbb58c442d54761ff94fbd # 1.3.2
github.com/fernet/fernet-go 9eac43b88a5efb8651d24de9b68e87567e029736 github.com/fernet/fernet-go 9eac43b88a5efb8651d24de9b68e87567e029736
github.com/google/certificate-transparency-go 37a384cd035e722ea46e55029093e26687138edf # v1.0.20 github.com/google/certificate-transparency-go 37a384cd035e722ea46e55029093e26687138edf # v1.0.20
golang.org/x/crypto 2aa609cf4a9d7d1126360de73b55b6002f9e052a golang.org/x/crypto 75b288015ac94e66e3d6715fb68a9b41bf046ec2
golang.org/x/time 555d28b269f0569763d25dbe1a237ae74c6bcc82 golang.org/x/time 555d28b269f0569763d25dbe1a237ae74c6bcc82
github.com/hashicorp/go-memdb cb9a474f84cc5e41b273b20c6927680b2a8776ad github.com/hashicorp/go-memdb cb9a474f84cc5e41b273b20c6927680b2a8776ad
github.com/hashicorp/go-immutable-radix 826af9ccf0feeee615d546d69b11f8e98da8c8f1 git://github.com/tonistiigi/go-immutable-radix.git github.com/hashicorp/go-immutable-radix 826af9ccf0feeee615d546d69b11f8e98da8c8f1 git://github.com/tonistiigi/go-immutable-radix.git
github.com/hashicorp/golang-lru 7f827b33c0f158ec5dfbba01bb0b14a4541fd81d # v0.5.3 github.com/hashicorp/golang-lru 7f827b33c0f158ec5dfbba01bb0b14a4541fd81d # v0.5.3
github.com/coreos/pkg 3ac0863d7acf3bc44daf49afef8919af12f704ef # v3 github.com/coreos/pkg 3ac0863d7acf3bc44daf49afef8919af12f704ef # v3
code.cloudfoundry.org/clock 02e53af36e6c978af692887ed449b74026d76fec code.cloudfoundry.org/clock 02e53af36e6c978af692887ed449b74026d76fec # v1.0.0
# prometheus # prometheus
github.com/prometheus/client_golang c42bebe5a5cddfc6b28cd639103369d8a75dfa89 # v1.3.0 github.com/prometheus/client_golang 6edbbd9e560190e318cdc5b4d3e630b442858380 # v1.6.0
github.com/beorn7/perks 37c8de3658fcb183f997c4e13e8337516ab753e6 # v1.0.1 github.com/beorn7/perks 37c8de3658fcb183f997c4e13e8337516ab753e6 # v1.0.1
github.com/prometheus/client_model d1d2010b5beead3fa1c5f271a5cf626e40b3ad6e # v0.1.0 github.com/prometheus/client_model 7bc5445566f0fe75b15de23e6b93886e982d7bf9 # v0.2.0
github.com/prometheus/common 287d3e634a1e550c9e463dd7e5a75a422c614505 # v0.7.0 github.com/prometheus/common d978bcb1309602d68bb4ba69cf3f8ed900e07308 # v0.9.1
github.com/prometheus/procfs 6d489fc7f1d9cd890a250f3ea3431b1744b9623f # v0.0.8 github.com/prometheus/procfs 46159f73e74d1cb8dc223deef9b2d049286f46b1 # v0.0.11
github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0ee0650e56c # v1.0.1 github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0ee0650e56c # v1.0.1
github.com/pkg/errors ba968bfe8b2f7e042a574c888954fccecfa385b4 # v0.8.1 github.com/pkg/errors 614d223910a179a466c1767a985424175c39b465 # v0.9.1
github.com/grpc-ecosystem/go-grpc-prometheus c225b8c3b01faf2899099b768856a9e916e5087b # v1.2.0 github.com/grpc-ecosystem/go-grpc-prometheus c225b8c3b01faf2899099b768856a9e916e5087b # v1.2.0
github.com/cespare/xxhash/v2 d7df74196a9e781ede915320c11c378c1b2f3a1f # v2.1.1 github.com/cespare/xxhash/v2 d7df74196a9e781ede915320c11c378c1b2f3a1f # v2.1.1
# cli # cli
github.com/spf13/cobra ef82de70bb3f60c65fb8eebacbb2d122ef517385 # v0.0.3 github.com/spf13/cobra a684a6d7f5e37385d954dd3b5a14fc6912c6ab9d # v1.0.0
github.com/spf13/pflag 583c0c0531f06d5278b7d917446061adc344b5cd # v1.0.1 github.com/spf13/pflag 2e9d26c8c37aae03e3f9d4e90b7116f5accb7cab # v1.0.5
github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 # v1.0.0 github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 # v1.0.0
github.com/morikuni/aec 39771216ff4c63d11f5e604076f9c45e8be1067b github.com/morikuni/aec 39771216ff4c63d11f5e604076f9c45e8be1067b # v1.0.0
# metrics # metrics
github.com/docker/go-metrics b619b3592b65de4f087d9f16863a7e6ff905973c # v0.0.1 github.com/docker/go-metrics b619b3592b65de4f087d9f16863a7e6ff905973c # v0.0.1
github.com/opencontainers/selinux 31f70552238c5e017d78c3f1ba65e85f593f48e0 # v1.3.3 github.com/opencontainers/selinux 25504e34a9826d481f6e2903963ecaa881749124 # v1.6.0
github.com/willf/bitset 559910e8471e48d76d9e5a1ba15842dee77ad45d # v1.1.11
# archive/tar
# rm -rf vendor/archive
# mkdir -p ./vendor/archive
# git clone -b go$GOLANG_VERSION --depth=1 git://github.com/golang/go.git ./go
# git --git-dir ./go/.git --work-tree ./go am ../patches/0001-archive-tar-do-not-populate-user-group-names.patch
# cp -a go/src/archive/tar ./vendor/archive/tar
# rm -rf ./go
# vndr -whitelist=^archive/tar
# DO NOT EDIT BELOW THIS LINE -------- reserved for downstream projects -------- # DO NOT EDIT BELOW THIS LINE -------- reserved for downstream projects --------

60
vendor/golang.org/x/sys/cpu/cpu.go generated vendored
View File

@ -29,26 +29,46 @@ type CacheLinePad struct{ _ [cacheLineSize]byte }
// and HasAVX2 are only set if the OS supports XMM and YMM // and HasAVX2 are only set if the OS supports XMM and YMM
// registers in addition to the CPUID feature bit being set. // registers in addition to the CPUID feature bit being set.
var X86 struct { var X86 struct {
_ CacheLinePad _ CacheLinePad
HasAES bool // AES hardware implementation (AES NI) HasAES bool // AES hardware implementation (AES NI)
HasADX bool // Multi-precision add-carry instruction extensions HasADX bool // Multi-precision add-carry instruction extensions
HasAVX bool // Advanced vector extension HasAVX bool // Advanced vector extension
HasAVX2 bool // Advanced vector extension 2 HasAVX2 bool // Advanced vector extension 2
HasBMI1 bool // Bit manipulation instruction set 1 HasAVX512 bool // Advanced vector extension 512
HasBMI2 bool // Bit manipulation instruction set 2 HasAVX512F bool // Advanced vector extension 512 Foundation Instructions
HasERMS bool // Enhanced REP for MOVSB and STOSB HasAVX512CD bool // Advanced vector extension 512 Conflict Detection Instructions
HasFMA bool // Fused-multiply-add instructions HasAVX512ER bool // Advanced vector extension 512 Exponential and Reciprocal Instructions
HasOSXSAVE bool // OS supports XSAVE/XRESTOR for saving/restoring XMM registers. HasAVX512PF bool // Advanced vector extension 512 Prefetch Instructions Instructions
HasPCLMULQDQ bool // PCLMULQDQ instruction - most often used for AES-GCM HasAVX512VL bool // Advanced vector extension 512 Vector Length Extensions
HasPOPCNT bool // Hamming weight instruction POPCNT. HasAVX512BW bool // Advanced vector extension 512 Byte and Word Instructions
HasRDRAND bool // RDRAND instruction (on-chip random number generator) HasAVX512DQ bool // Advanced vector extension 512 Doubleword and Quadword Instructions
HasRDSEED bool // RDSEED instruction (on-chip random number generator) HasAVX512IFMA bool // Advanced vector extension 512 Integer Fused Multiply Add
HasSSE2 bool // Streaming SIMD extension 2 (always available on amd64) HasAVX512VBMI bool // Advanced vector extension 512 Vector Byte Manipulation Instructions
HasSSE3 bool // Streaming SIMD extension 3 HasAVX5124VNNIW bool // Advanced vector extension 512 Vector Neural Network Instructions Word variable precision
HasSSSE3 bool // Supplemental streaming SIMD extension 3 HasAVX5124FMAPS bool // Advanced vector extension 512 Fused Multiply Accumulation Packed Single precision
HasSSE41 bool // Streaming SIMD extension 4 and 4.1 HasAVX512VPOPCNTDQ bool // Advanced vector extension 512 Double and quad word population count instructions
HasSSE42 bool // Streaming SIMD extension 4 and 4.2 HasAVX512VPCLMULQDQ bool // Advanced vector extension 512 Vector carry-less multiply operations
_ CacheLinePad HasAVX512VNNI bool // Advanced vector extension 512 Vector Neural Network Instructions
HasAVX512GFNI bool // Advanced vector extension 512 Galois field New Instructions
HasAVX512VAES bool // Advanced vector extension 512 Vector AES instructions
HasAVX512VBMI2 bool // Advanced vector extension 512 Vector Byte Manipulation Instructions 2
HasAVX512BITALG bool // Advanced vector extension 512 Bit Algorithms
HasAVX512BF16 bool // Advanced vector extension 512 BFloat16 Instructions
HasBMI1 bool // Bit manipulation instruction set 1
HasBMI2 bool // Bit manipulation instruction set 2
HasERMS bool // Enhanced REP for MOVSB and STOSB
HasFMA bool // Fused-multiply-add instructions
HasOSXSAVE bool // OS supports XSAVE/XRESTOR for saving/restoring XMM registers.
HasPCLMULQDQ bool // PCLMULQDQ instruction - most often used for AES-GCM
HasPOPCNT bool // Hamming weight instruction POPCNT.
HasRDRAND bool // RDRAND instruction (on-chip random number generator)
HasRDSEED bool // RDSEED instruction (on-chip random number generator)
HasSSE2 bool // Streaming SIMD extension 2 (always available on amd64)
HasSSE3 bool // Streaming SIMD extension 3
HasSSSE3 bool // Supplemental streaming SIMD extension 3
HasSSE41 bool // Streaming SIMD extension 4 and 4.1
HasSSE42 bool // Streaming SIMD extension 4 and 4.2
_ CacheLinePad
} }
// ARM64 contains the supported CPU features of the // ARM64 contains the supported CPU features of the

View File

@ -39,7 +39,7 @@ func initOptions() {
func archInit() { func archInit() {
switch runtime.GOOS { switch runtime.GOOS {
case "android", "darwin", "netbsd": case "android", "darwin", "ios", "netbsd":
// Android and iOS don't seem to allow reading these registers. // Android and iOS don't seem to allow reading these registers.
// //
// NetBSD: // NetBSD:

View File

@ -16,6 +16,26 @@ func initOptions() {
{Name: "aes", Feature: &X86.HasAES}, {Name: "aes", Feature: &X86.HasAES},
{Name: "avx", Feature: &X86.HasAVX}, {Name: "avx", Feature: &X86.HasAVX},
{Name: "avx2", Feature: &X86.HasAVX2}, {Name: "avx2", Feature: &X86.HasAVX2},
{Name: "avx512", Feature: &X86.HasAVX512},
{Name: "avx512f", Feature: &X86.HasAVX512F},
{Name: "avx512cd", Feature: &X86.HasAVX512CD},
{Name: "avx512er", Feature: &X86.HasAVX512ER},
{Name: "avx512pf", Feature: &X86.HasAVX512PF},
{Name: "avx512vl", Feature: &X86.HasAVX512VL},
{Name: "avx512bw", Feature: &X86.HasAVX512BW},
{Name: "avx512dq", Feature: &X86.HasAVX512DQ},
{Name: "avx512ifma", Feature: &X86.HasAVX512IFMA},
{Name: "avx512vbmi", Feature: &X86.HasAVX512VBMI},
{Name: "avx512vnniw", Feature: &X86.HasAVX5124VNNIW},
{Name: "avx5124fmaps", Feature: &X86.HasAVX5124FMAPS},
{Name: "avx512vpopcntdq", Feature: &X86.HasAVX512VPOPCNTDQ},
{Name: "avx512vpclmulqdq", Feature: &X86.HasAVX512VPCLMULQDQ},
{Name: "avx512vnni", Feature: &X86.HasAVX512VNNI},
{Name: "avx512gfni", Feature: &X86.HasAVX512GFNI},
{Name: "avx512vaes", Feature: &X86.HasAVX512VAES},
{Name: "avx512vbmi2", Feature: &X86.HasAVX512VBMI2},
{Name: "avx512bitalg", Feature: &X86.HasAVX512BITALG},
{Name: "avx512bf16", Feature: &X86.HasAVX512BF16},
{Name: "bmi1", Feature: &X86.HasBMI1}, {Name: "bmi1", Feature: &X86.HasBMI1},
{Name: "bmi2", Feature: &X86.HasBMI2}, {Name: "bmi2", Feature: &X86.HasBMI2},
{Name: "erms", Feature: &X86.HasERMS}, {Name: "erms", Feature: &X86.HasERMS},
@ -59,12 +79,15 @@ func archInit() {
X86.HasOSXSAVE = isSet(27, ecx1) X86.HasOSXSAVE = isSet(27, ecx1)
X86.HasRDRAND = isSet(30, ecx1) X86.HasRDRAND = isSet(30, ecx1)
osSupportsAVX := false var osSupportsAVX, osSupportsAVX512 bool
// For XGETBV, OSXSAVE bit is required and sufficient. // For XGETBV, OSXSAVE bit is required and sufficient.
if X86.HasOSXSAVE { if X86.HasOSXSAVE {
eax, _ := xgetbv() eax, _ := xgetbv()
// Check if XMM and YMM registers have OS support. // Check if XMM and YMM registers have OS support.
osSupportsAVX = isSet(1, eax) && isSet(2, eax) osSupportsAVX = isSet(1, eax) && isSet(2, eax)
// Check if OPMASK and ZMM registers have OS support.
osSupportsAVX512 = osSupportsAVX && isSet(5, eax) && isSet(6, eax) && isSet(7, eax)
} }
X86.HasAVX = isSet(28, ecx1) && osSupportsAVX X86.HasAVX = isSet(28, ecx1) && osSupportsAVX
@ -73,7 +96,7 @@ func archInit() {
return return
} }
_, ebx7, _, _ := cpuid(7, 0) _, ebx7, ecx7, edx7 := cpuid(7, 0)
X86.HasBMI1 = isSet(3, ebx7) X86.HasBMI1 = isSet(3, ebx7)
X86.HasAVX2 = isSet(5, ebx7) && osSupportsAVX X86.HasAVX2 = isSet(5, ebx7) && osSupportsAVX
X86.HasBMI2 = isSet(8, ebx7) X86.HasBMI2 = isSet(8, ebx7)
@ -81,6 +104,30 @@ func archInit() {
X86.HasRDSEED = isSet(18, ebx7) X86.HasRDSEED = isSet(18, ebx7)
X86.HasADX = isSet(19, ebx7) X86.HasADX = isSet(19, ebx7)
X86.HasAVX512 = isSet(16, ebx7) && osSupportsAVX512 // Because avx-512 foundation is the core required extension
if X86.HasAVX512 {
X86.HasAVX512F = true
X86.HasAVX512CD = isSet(28, ebx7)
X86.HasAVX512ER = isSet(27, ebx7)
X86.HasAVX512PF = isSet(26, ebx7)
X86.HasAVX512VL = isSet(31, ebx7)
X86.HasAVX512BW = isSet(30, ebx7)
X86.HasAVX512DQ = isSet(17, ebx7)
X86.HasAVX512IFMA = isSet(21, ebx7)
X86.HasAVX512VBMI = isSet(1, ecx7)
X86.HasAVX5124VNNIW = isSet(2, edx7)
X86.HasAVX5124FMAPS = isSet(3, edx7)
X86.HasAVX512VPOPCNTDQ = isSet(14, ecx7)
X86.HasAVX512VPCLMULQDQ = isSet(10, ecx7)
X86.HasAVX512VNNI = isSet(11, ecx7)
X86.HasAVX512GFNI = isSet(8, ecx7)
X86.HasAVX512VAES = isSet(9, ecx7)
X86.HasAVX512VBMI2 = isSet(6, ecx7)
X86.HasAVX512BITALG = isSet(12, ecx7)
eax71, _, _, _ := cpuid(7, 1)
X86.HasAVX512BF16 = isSet(5, eax71)
}
} }
func isSet(bitpos uint, value uint32) bool { func isSet(bitpos uint, value uint32) bool {

View File

@ -16,3 +16,9 @@ func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
_, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))
return err return err
} }
// FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command.
func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error {
_, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore))))
return err
}

View File

@ -12,10 +12,8 @@ import "syscall"
// We can't use the gc-syntax .s files for gccgo. On the plus side // We can't use the gc-syntax .s files for gccgo. On the plus side
// much of the functionality can be written directly in Go. // much of the functionality can be written directly in Go.
//extern gccgoRealSyscallNoError
func realSyscallNoError(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r uintptr) func realSyscallNoError(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r uintptr)
//extern gccgoRealSyscall
func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr) func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr)
func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) { func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {

View File

@ -21,6 +21,9 @@ struct ret {
uintptr_t err; uintptr_t err;
}; };
struct ret gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
__asm__(GOSYM_PREFIX GOPKGPATH ".realSyscall");
struct ret struct ret
gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
{ {
@ -32,6 +35,9 @@ gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintp
return r; return r;
} }
uintptr_t gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
__asm__(GOSYM_PREFIX GOPKGPATH ".realSyscallNoError");
uintptr_t uintptr_t
gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
{ {

View File

@ -20,7 +20,7 @@ func cmsgAlignOf(salen int) int {
case "aix": case "aix":
// There is no alignment on AIX. // There is no alignment on AIX.
salign = 1 salign = 1
case "darwin", "illumos", "solaris": case "darwin", "ios", "illumos", "solaris":
// NOTE: It seems like 64-bit Darwin, Illumos and Solaris // NOTE: It seems like 64-bit Darwin, Illumos and Solaris
// kernels still require 32-bit aligned access to network // kernels still require 32-bit aligned access to network
// subsystem. // subsystem.
@ -32,6 +32,10 @@ func cmsgAlignOf(salen int) int {
if runtime.GOARCH == "arm" { if runtime.GOARCH == "arm" {
salign = 8 salign = 8
} }
// NetBSD aarch64 requires 128-bit alignment.
if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm64" {
salign = 16
}
} }
return (salen + salign - 1) & ^(salign - 1) return (salen + salign - 1) & ^(salign - 1)

View File

@ -18,6 +18,21 @@ import (
"unsafe" "unsafe"
) )
const ImplementsGetwd = true
func Getwd() (string, error) {
var buf [PathMax]byte
_, err := Getcwd(buf[0:])
if err != nil {
return "", err
}
n := clen(buf[:])
if n < 1 {
return "", EINVAL
}
return string(buf[:n]), nil
}
/* /*
* Wrapped * Wrapped
*/ */
@ -272,7 +287,7 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
if err != nil { if err != nil {
return return
} }
if runtime.GOOS == "darwin" && len == 0 { if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && len == 0 {
// Accepted socket has no address. // Accepted socket has no address.
// This is likely due to a bug in xnu kernels, // This is likely due to a bug in xnu kernels,
// where instead of ECONNABORTED error socket // where instead of ECONNABORTED error socket

View File

@ -13,29 +13,10 @@
package unix package unix
import ( import (
"errors"
"syscall" "syscall"
"unsafe" "unsafe"
) )
const ImplementsGetwd = true
func Getwd() (string, error) {
buf := make([]byte, 2048)
attrs, err := getAttrList(".", attrList{CommonAttr: attrCmnFullpath}, buf, 0)
if err == nil && len(attrs) == 1 && len(attrs[0]) >= 2 {
wd := string(attrs[0])
// Sanity check that it's an absolute path and ends
// in a null byte, which we then strip.
if wd[0] == '/' && wd[len(wd)-1] == 0 {
return wd[:len(wd)-1], nil
}
}
// If pkg/os/getwd.go gets ENOTSUP, it will fall back to the
// slow algorithm.
return "", ENOTSUP
}
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
type SockaddrDatalink struct { type SockaddrDatalink struct {
Len uint8 Len uint8
@ -97,11 +78,6 @@ func direntNamlen(buf []byte) (uint64, bool) {
func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) } func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) } func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
const (
attrBitMapCount = 5
attrCmnFullpath = 0x08000000
)
type attrList struct { type attrList struct {
bitmapCount uint16 bitmapCount uint16
_ uint16 _ uint16
@ -112,54 +88,6 @@ type attrList struct {
Forkattr uint32 Forkattr uint32
} }
func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (attrs [][]byte, err error) {
if len(attrBuf) < 4 {
return nil, errors.New("attrBuf too small")
}
attrList.bitmapCount = attrBitMapCount
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return nil, err
}
if err := getattrlist(_p0, unsafe.Pointer(&attrList), unsafe.Pointer(&attrBuf[0]), uintptr(len(attrBuf)), int(options)); err != nil {
return nil, err
}
size := *(*uint32)(unsafe.Pointer(&attrBuf[0]))
// dat is the section of attrBuf that contains valid data,
// without the 4 byte length header. All attribute offsets
// are relative to dat.
dat := attrBuf
if int(size) < len(attrBuf) {
dat = dat[:size]
}
dat = dat[4:] // remove length prefix
for i := uint32(0); int(i) < len(dat); {
header := dat[i:]
if len(header) < 8 {
return attrs, errors.New("truncated attribute header")
}
datOff := *(*int32)(unsafe.Pointer(&header[0]))
attrLen := *(*uint32)(unsafe.Pointer(&header[4]))
if datOff < 0 || uint32(datOff)+attrLen > uint32(len(dat)) {
return attrs, errors.New("truncated results; attrBuf too small")
}
end := uint32(datOff) + attrLen
attrs = append(attrs, dat[datOff:end])
i = end
if r := i % 4; r != 0 {
i += (4 - r)
}
}
return
}
//sys getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
//sysnb pipe() (r int, w int, err error) //sysnb pipe() (r int, w int, err error)
func Pipe(p []int) (err error) { func Pipe(p []int) (err error) {
@ -419,6 +347,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Fpathconf(fd int, name int) (val int, err error) //sys Fpathconf(fd int, name int) (val int, err error)
//sys Fsync(fd int) (err error) //sys Fsync(fd int) (err error)
//sys Ftruncate(fd int, length int64) (err error) //sys Ftruncate(fd int, length int64) (err error)
//sys Getcwd(buf []byte) (n int, err error)
//sys Getdtablesize() (size int) //sys Getdtablesize() (size int)
//sysnb Getegid() (egid int) //sysnb Getegid() (egid int)
//sysnb Geteuid() (uid int) //sysnb Geteuid() (uid int)

View File

@ -129,23 +129,8 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
return return
} }
const ImplementsGetwd = true
//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD //sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
func Getwd() (string, error) {
var buf [PathMax]byte
_, err := Getcwd(buf[0:])
if err != nil {
return "", err
}
n := clen(buf[:])
if n < 1 {
return "", EINVAL
}
return string(buf[:n]), nil
}
func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
var _p0 unsafe.Pointer var _p0 unsafe.Pointer
var bufsize uintptr var bufsize uintptr

View File

@ -140,23 +140,8 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
return return
} }
const ImplementsGetwd = true
//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD //sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
func Getwd() (string, error) {
var buf [PathMax]byte
_, err := Getcwd(buf[0:])
if err != nil {
return "", err
}
n := clen(buf[:])
if n < 1 {
return "", EINVAL
}
return string(buf[:n]), nil
}
func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
var ( var (
_p0 unsafe.Pointer _p0 unsafe.Pointer

View File

@ -56,7 +56,7 @@ func Pwritev(fd int, iovs [][]byte, off int64) (n int, err error) {
return n, err return n, err
} }
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) = libsocket.accept4
func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) { func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
var rsa RawSockaddrAny var rsa RawSockaddrAny
@ -75,3 +75,16 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
} }
return return
} }
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) 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 err
}

View File

@ -106,12 +106,53 @@ func IoctlGetRTCTime(fd int) (*RTCTime, error) {
return &value, err return &value, err
} }
// IoctlGetWatchdogInfo fetches information about a watchdog device from the
// Linux watchdog API. For more information, see:
// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
func IoctlGetWatchdogInfo(fd int) (*WatchdogInfo, error) {
var value WatchdogInfo
err := ioctl(fd, WDIOC_GETSUPPORT, uintptr(unsafe.Pointer(&value)))
return &value, err
}
func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) { func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) {
var value RTCWkAlrm var value RTCWkAlrm
err := ioctl(fd, RTC_WKALM_RD, uintptr(unsafe.Pointer(&value))) err := ioctl(fd, RTC_WKALM_RD, uintptr(unsafe.Pointer(&value)))
return &value, err return &value, err
} }
// IoctlFileCloneRange performs an FICLONERANGE ioctl operation to clone the
// range of data conveyed in value to the file associated with the file
// descriptor destFd. See the ioctl_ficlonerange(2) man page for details.
func IoctlFileCloneRange(destFd int, value *FileCloneRange) error {
err := ioctl(destFd, FICLONERANGE, uintptr(unsafe.Pointer(value)))
runtime.KeepAlive(value)
return err
}
// IoctlFileClone performs an FICLONE ioctl operation to clone the entire file
// associated with the file description srcFd to the file associated with the
// file descriptor destFd. See the ioctl_ficlone(2) man page for details.
func IoctlFileClone(destFd, srcFd int) error {
return ioctl(destFd, FICLONE, uintptr(srcFd))
}
// IoctlFileDedupeRange performs an FIDEDUPERANGE ioctl operation to share the
// range of data conveyed in value with the file associated with the file
// descriptor destFd. See the ioctl_fideduperange(2) man page for details.
func IoctlFileDedupeRange(destFd int, value *FileDedupeRange) error {
err := ioctl(destFd, FIDEDUPERANGE, uintptr(unsafe.Pointer(value)))
runtime.KeepAlive(value)
return err
}
// IoctlWatchdogKeepalive issues a keepalive ioctl to a watchdog device. For
// more information, see:
// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
func IoctlWatchdogKeepalive(fd int) error {
return ioctl(fd, WDIOC_KEEPALIVE, 0)
}
//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) //sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
func Link(oldpath string, newpath string) (err error) { func Link(oldpath string, newpath string) (err error) {

View File

@ -141,23 +141,8 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
return return
} }
const ImplementsGetwd = true
//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD //sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
func Getwd() (string, error) {
var buf [PathMax]byte
_, err := Getcwd(buf[0:])
if err != nil {
return "", err
}
n := clen(buf[:])
if n < 1 {
return "", EINVAL
}
return string(buf[:n]), nil
}
// TODO // TODO
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
return -1, ENOSYS return -1, ENOSYS

View File

@ -114,23 +114,8 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
return return
} }
const ImplementsGetwd = true
//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD //sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
func Getwd() (string, error) {
var buf [PathMax]byte
_, err := Getcwd(buf[0:])
if err != nil {
return "", err
}
n := clen(buf[:])
if n < 1 {
return "", EINVAL
}
return string(buf[:n]), nil
}
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
if raceenabled { if raceenabled {
raceReleaseMerge(unsafe.Pointer(&ioSync)) raceReleaseMerge(unsafe.Pointer(&ioSync))

View File

@ -13,6 +13,7 @@
package unix package unix
import ( import (
"runtime"
"syscall" "syscall"
"unsafe" "unsafe"
) )
@ -553,8 +554,10 @@ func Minor(dev uint64) uint32 {
//sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctl(fd int, req uint, arg uintptr) (err error)
func IoctlSetTermio(fd int, req uint, value *Termio) (err error) { func IoctlSetTermio(fd int, req uint, value *Termio) error {
return ioctl(fd, req, uintptr(unsafe.Pointer(value))) err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
runtime.KeepAlive(value)
return err
} }
func IoctlGetTermio(fd int, req uint) (*Termio, error) { func IoctlGetTermio(fd int, req uint) (*Termio, error) {

View File

@ -232,6 +232,8 @@ const (
CLOCK_THREAD_CPUTIME_ID = 0x10 CLOCK_THREAD_CPUTIME_ID = 0x10
CLOCK_UPTIME_RAW = 0x8 CLOCK_UPTIME_RAW = 0x8
CLOCK_UPTIME_RAW_APPROX = 0x9 CLOCK_UPTIME_RAW_APPROX = 0x9
CLONE_NOFOLLOW = 0x1
CLONE_NOOWNERCOPY = 0x2
CR0 = 0x0 CR0 = 0x0
CR1 = 0x1000 CR1 = 0x1000
CR2 = 0x2000 CR2 = 0x2000

View File

@ -232,6 +232,8 @@ const (
CLOCK_THREAD_CPUTIME_ID = 0x10 CLOCK_THREAD_CPUTIME_ID = 0x10
CLOCK_UPTIME_RAW = 0x8 CLOCK_UPTIME_RAW = 0x8
CLOCK_UPTIME_RAW_APPROX = 0x9 CLOCK_UPTIME_RAW_APPROX = 0x9
CLONE_NOFOLLOW = 0x1
CLONE_NOOWNERCOPY = 0x2
CR0 = 0x0 CR0 = 0x0
CR1 = 0x1000 CR1 = 0x1000
CR2 = 0x2000 CR2 = 0x2000

View File

@ -232,6 +232,8 @@ const (
CLOCK_THREAD_CPUTIME_ID = 0x10 CLOCK_THREAD_CPUTIME_ID = 0x10
CLOCK_UPTIME_RAW = 0x8 CLOCK_UPTIME_RAW = 0x8
CLOCK_UPTIME_RAW_APPROX = 0x9 CLOCK_UPTIME_RAW_APPROX = 0x9
CLONE_NOFOLLOW = 0x1
CLONE_NOOWNERCOPY = 0x2
CR0 = 0x0 CR0 = 0x0
CR1 = 0x1000 CR1 = 0x1000
CR2 = 0x2000 CR2 = 0x2000

View File

@ -232,6 +232,8 @@ const (
CLOCK_THREAD_CPUTIME_ID = 0x10 CLOCK_THREAD_CPUTIME_ID = 0x10
CLOCK_UPTIME_RAW = 0x8 CLOCK_UPTIME_RAW = 0x8
CLOCK_UPTIME_RAW_APPROX = 0x9 CLOCK_UPTIME_RAW_APPROX = 0x9
CLONE_NOFOLLOW = 0x1
CLONE_NOOWNERCOPY = 0x2
CR0 = 0x0 CR0 = 0x0
CR1 = 0x1000 CR1 = 0x1000
CR2 = 0x2000 CR2 = 0x2000

View File

@ -62,6 +62,7 @@ const (
B28800 = 0x7080 B28800 = 0x7080
B300 = 0x12c B300 = 0x12c
B38400 = 0x9600 B38400 = 0x9600
B460800 = 0x70800
B4800 = 0x12c0 B4800 = 0x12c0
B50 = 0x32 B50 = 0x32
B57600 = 0xe100 B57600 = 0xe100
@ -69,12 +70,15 @@ const (
B7200 = 0x1c20 B7200 = 0x1c20
B75 = 0x4b B75 = 0x4b
B76800 = 0x12c00 B76800 = 0x12c00
B921600 = 0xe1000
B9600 = 0x2580 B9600 = 0x2580
BIOCFEEDBACK = 0x8004427d
BIOCFLUSH = 0x20004268 BIOCFLUSH = 0x20004268
BIOCGBLEN = 0x40044266 BIOCGBLEN = 0x40044266
BIOCGDLT = 0x4004426a BIOCGDLT = 0x4004426a
BIOCGDLTLIST = 0xc0104279 BIOCGDLTLIST = 0xc0104279
BIOCGETIF = 0x4020426b BIOCGETIF = 0x4020426b
BIOCGFEEDBACK = 0x4004427c
BIOCGHDRCMPLT = 0x40044274 BIOCGHDRCMPLT = 0x40044274
BIOCGRSIG = 0x40044272 BIOCGRSIG = 0x40044272
BIOCGRTIMEOUT = 0x4010426e BIOCGRTIMEOUT = 0x4010426e
@ -88,6 +92,7 @@ const (
BIOCSETF = 0x80104267 BIOCSETF = 0x80104267
BIOCSETIF = 0x8020426c BIOCSETIF = 0x8020426c
BIOCSETWF = 0x8010427b BIOCSETWF = 0x8010427b
BIOCSFEEDBACK = 0x8004427d
BIOCSHDRCMPLT = 0x80044275 BIOCSHDRCMPLT = 0x80044275
BIOCSRSIG = 0x80044273 BIOCSRSIG = 0x80044273
BIOCSRTIMEOUT = 0x8010426d BIOCSRTIMEOUT = 0x8010426d
@ -125,6 +130,7 @@ const (
BPF_MINBUFSIZE = 0x20 BPF_MINBUFSIZE = 0x20
BPF_MINOR_VERSION = 0x1 BPF_MINOR_VERSION = 0x1
BPF_MISC = 0x7 BPF_MISC = 0x7
BPF_MOD = 0x90
BPF_MSH = 0xa0 BPF_MSH = 0xa0
BPF_MUL = 0x20 BPF_MUL = 0x20
BPF_NEG = 0x80 BPF_NEG = 0x80
@ -139,6 +145,7 @@ const (
BPF_TXA = 0x80 BPF_TXA = 0x80
BPF_W = 0x0 BPF_W = 0x0
BPF_X = 0x8 BPF_X = 0x8
BPF_XOR = 0xa0
BRKINT = 0x2 BRKINT = 0x2
CFLUSH = 0xf CFLUSH = 0xf
CLOCAL = 0x8000 CLOCAL = 0x8000
@ -156,6 +163,12 @@ const (
CLOCK_UPTIME_FAST = 0x8 CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7 CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1 CLOCK_VIRTUAL = 0x1
CPUSTATES = 0x5
CP_IDLE = 0x4
CP_INTR = 0x3
CP_NICE = 0x1
CP_SYS = 0x2
CP_USER = 0x0
CREAD = 0x800 CREAD = 0x800
CRTSCTS = 0x30000 CRTSCTS = 0x30000
CS5 = 0x0 CS5 = 0x0
@ -175,6 +188,7 @@ const (
DLT_A429 = 0xb8 DLT_A429 = 0xb8
DLT_A653_ICM = 0xb9 DLT_A653_ICM = 0xb9
DLT_AIRONET_HEADER = 0x78 DLT_AIRONET_HEADER = 0x78
DLT_AOS = 0xde
DLT_APPLE_IP_OVER_IEEE1394 = 0x8a DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
DLT_ARCNET = 0x7 DLT_ARCNET = 0x7
DLT_ARCNET_LINUX = 0x81 DLT_ARCNET_LINUX = 0x81
@ -184,22 +198,33 @@ const (
DLT_AX25 = 0x3 DLT_AX25 = 0x3
DLT_AX25_KISS = 0xca DLT_AX25_KISS = 0xca
DLT_BACNET_MS_TP = 0xa5 DLT_BACNET_MS_TP = 0xa5
DLT_BLUETOOTH_BREDR_BB = 0xff
DLT_BLUETOOTH_HCI_H4 = 0xbb DLT_BLUETOOTH_HCI_H4 = 0xbb
DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
DLT_BLUETOOTH_LE_LL = 0xfb
DLT_BLUETOOTH_LE_LL_WITH_PHDR = 0x100
DLT_BLUETOOTH_LINUX_MONITOR = 0xfe
DLT_CAN20B = 0xbe DLT_CAN20B = 0xbe
DLT_CAN_SOCKETCAN = 0xe3
DLT_CHAOS = 0x5 DLT_CHAOS = 0x5
DLT_CHDLC = 0x68 DLT_CHDLC = 0x68
DLT_CISCO_IOS = 0x76 DLT_CISCO_IOS = 0x76
DLT_C_HDLC = 0x68 DLT_C_HDLC = 0x68
DLT_C_HDLC_WITH_DIR = 0xcd DLT_C_HDLC_WITH_DIR = 0xcd
DLT_DBUS = 0xe7
DLT_DECT = 0xdd
DLT_DOCSIS = 0x8f DLT_DOCSIS = 0x8f
DLT_DVB_CI = 0xeb
DLT_ECONET = 0x73 DLT_ECONET = 0x73
DLT_EN10MB = 0x1 DLT_EN10MB = 0x1
DLT_EN3MB = 0x2 DLT_EN3MB = 0x2
DLT_ENC = 0x6d DLT_ENC = 0x6d
DLT_EPON = 0x103
DLT_ERF = 0xc5 DLT_ERF = 0xc5
DLT_ERF_ETH = 0xaf DLT_ERF_ETH = 0xaf
DLT_ERF_POS = 0xb0 DLT_ERF_POS = 0xb0
DLT_FC_2 = 0xe0
DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
DLT_FDDI = 0xa DLT_FDDI = 0xa
DLT_FLEXRAY = 0xd2 DLT_FLEXRAY = 0xd2
DLT_FRELAY = 0x6b DLT_FRELAY = 0x6b
@ -209,6 +234,8 @@ const (
DLT_GPF_F = 0xab DLT_GPF_F = 0xab
DLT_GPF_T = 0xaa DLT_GPF_T = 0xaa
DLT_GPRS_LLC = 0xa9 DLT_GPRS_LLC = 0xa9
DLT_GSMTAP_ABIS = 0xda
DLT_GSMTAP_UM = 0xd9
DLT_HHDLC = 0x79 DLT_HHDLC = 0x79
DLT_IBM_SN = 0x92 DLT_IBM_SN = 0x92
DLT_IBM_SP = 0x91 DLT_IBM_SP = 0x91
@ -218,18 +245,28 @@ const (
DLT_IEEE802_11_RADIO_AVS = 0xa3 DLT_IEEE802_11_RADIO_AVS = 0xa3
DLT_IEEE802_15_4 = 0xc3 DLT_IEEE802_15_4 = 0xc3
DLT_IEEE802_15_4_LINUX = 0xbf DLT_IEEE802_15_4_LINUX = 0xbf
DLT_IEEE802_15_4_NOFCS = 0xe6
DLT_IEEE802_15_4_NONASK_PHY = 0xd7 DLT_IEEE802_15_4_NONASK_PHY = 0xd7
DLT_IEEE802_16_MAC_CPS = 0xbc DLT_IEEE802_16_MAC_CPS = 0xbc
DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
DLT_INFINIBAND = 0xf7
DLT_IPFILTER = 0x74 DLT_IPFILTER = 0x74
DLT_IPMB = 0xc7 DLT_IPMB = 0xc7
DLT_IPMB_LINUX = 0xd1 DLT_IPMB_LINUX = 0xd1
DLT_IPMI_HPM_2 = 0x104
DLT_IPNET = 0xe2
DLT_IPOIB = 0xf2
DLT_IPV4 = 0xe4
DLT_IPV6 = 0xe5
DLT_IP_OVER_FC = 0x7a DLT_IP_OVER_FC = 0x7a
DLT_ISO_14443 = 0x108
DLT_JUNIPER_ATM1 = 0x89 DLT_JUNIPER_ATM1 = 0x89
DLT_JUNIPER_ATM2 = 0x87 DLT_JUNIPER_ATM2 = 0x87
DLT_JUNIPER_ATM_CEMIC = 0xee
DLT_JUNIPER_CHDLC = 0xb5 DLT_JUNIPER_CHDLC = 0xb5
DLT_JUNIPER_ES = 0x84 DLT_JUNIPER_ES = 0x84
DLT_JUNIPER_ETHER = 0xb2 DLT_JUNIPER_ETHER = 0xb2
DLT_JUNIPER_FIBRECHANNEL = 0xea
DLT_JUNIPER_FRELAY = 0xb4 DLT_JUNIPER_FRELAY = 0xb4
DLT_JUNIPER_GGSN = 0x85 DLT_JUNIPER_GGSN = 0x85
DLT_JUNIPER_ISM = 0xc2 DLT_JUNIPER_ISM = 0xc2
@ -242,25 +279,40 @@ const (
DLT_JUNIPER_PPPOE = 0xa7 DLT_JUNIPER_PPPOE = 0xa7
DLT_JUNIPER_PPPOE_ATM = 0xa8 DLT_JUNIPER_PPPOE_ATM = 0xa8
DLT_JUNIPER_SERVICES = 0x88 DLT_JUNIPER_SERVICES = 0x88
DLT_JUNIPER_SRX_E2E = 0xe9
DLT_JUNIPER_ST = 0xc8 DLT_JUNIPER_ST = 0xc8
DLT_JUNIPER_VP = 0xb7 DLT_JUNIPER_VP = 0xb7
DLT_JUNIPER_VS = 0xe8
DLT_LAPB_WITH_DIR = 0xcf DLT_LAPB_WITH_DIR = 0xcf
DLT_LAPD = 0xcb DLT_LAPD = 0xcb
DLT_LIN = 0xd4 DLT_LIN = 0xd4
DLT_LINUX_EVDEV = 0xd8
DLT_LINUX_IRDA = 0x90 DLT_LINUX_IRDA = 0x90
DLT_LINUX_LAPD = 0xb1 DLT_LINUX_LAPD = 0xb1
DLT_LINUX_SLL = 0x71 DLT_LINUX_SLL = 0x71
DLT_LOOP = 0x6c DLT_LOOP = 0x6c
DLT_LTALK = 0x72 DLT_LTALK = 0x72
DLT_MATCHING_MAX = 0x109
DLT_MATCHING_MIN = 0x68
DLT_MFR = 0xb6 DLT_MFR = 0xb6
DLT_MOST = 0xd3 DLT_MOST = 0xd3
DLT_MPEG_2_TS = 0xf3
DLT_MPLS = 0xdb
DLT_MTP2 = 0x8c DLT_MTP2 = 0x8c
DLT_MTP2_WITH_PHDR = 0x8b DLT_MTP2_WITH_PHDR = 0x8b
DLT_MTP3 = 0x8d DLT_MTP3 = 0x8d
DLT_MUX27010 = 0xec
DLT_NETANALYZER = 0xf0
DLT_NETANALYZER_TRANSPARENT = 0xf1
DLT_NETLINK = 0xfd
DLT_NFC_LLCP = 0xf5
DLT_NFLOG = 0xef
DLT_NG40 = 0xf4
DLT_NULL = 0x0 DLT_NULL = 0x0
DLT_PCI_EXP = 0x7d DLT_PCI_EXP = 0x7d
DLT_PFLOG = 0x75 DLT_PFLOG = 0x75
DLT_PFSYNC = 0x12 DLT_PFSYNC = 0x12
DLT_PKTAP = 0x102
DLT_PPI = 0xc0 DLT_PPI = 0xc0
DLT_PPP = 0x9 DLT_PPP = 0x9
DLT_PPP_BSDOS = 0x10 DLT_PPP_BSDOS = 0x10
@ -269,22 +321,51 @@ const (
DLT_PPP_SERIAL = 0x32 DLT_PPP_SERIAL = 0x32
DLT_PPP_WITH_DIR = 0xcc DLT_PPP_WITH_DIR = 0xcc
DLT_PRISM_HEADER = 0x77 DLT_PRISM_HEADER = 0x77
DLT_PROFIBUS_DL = 0x101
DLT_PRONET = 0x4 DLT_PRONET = 0x4
DLT_RAIF1 = 0xc6 DLT_RAIF1 = 0xc6
DLT_RAW = 0xc DLT_RAW = 0xc
DLT_RDS = 0x109
DLT_REDBACK_SMARTEDGE = 0x20 DLT_REDBACK_SMARTEDGE = 0x20
DLT_RIO = 0x7c DLT_RIO = 0x7c
DLT_RTAC_SERIAL = 0xfa
DLT_SCCP = 0x8e DLT_SCCP = 0x8e
DLT_SCTP = 0xf8
DLT_SITA = 0xc4 DLT_SITA = 0xc4
DLT_SLIP = 0x8 DLT_SLIP = 0x8
DLT_SLIP_BSDOS = 0xf DLT_SLIP_BSDOS = 0xf
DLT_STANAG_5066_D_PDU = 0xed
DLT_SUNATM = 0x7b DLT_SUNATM = 0x7b
DLT_SYMANTEC_FIREWALL = 0x63 DLT_SYMANTEC_FIREWALL = 0x63
DLT_TZSP = 0x80 DLT_TZSP = 0x80
DLT_USB = 0xba DLT_USB = 0xba
DLT_USBPCAP = 0xf9
DLT_USB_FREEBSD = 0xba
DLT_USB_LINUX = 0xbd DLT_USB_LINUX = 0xbd
DLT_USB_LINUX_MMAPPED = 0xdc
DLT_USER0 = 0x93
DLT_USER1 = 0x94
DLT_USER10 = 0x9d
DLT_USER11 = 0x9e
DLT_USER12 = 0x9f
DLT_USER13 = 0xa0
DLT_USER14 = 0xa1
DLT_USER15 = 0xa2
DLT_USER2 = 0x95
DLT_USER3 = 0x96
DLT_USER4 = 0x97
DLT_USER5 = 0x98
DLT_USER6 = 0x99
DLT_USER7 = 0x9a
DLT_USER8 = 0x9b
DLT_USER9 = 0x9c
DLT_WATTSTOPPER_DLM = 0x107
DLT_WIHART = 0xdf
DLT_WIRESHARK_UPPER_PDU = 0xfc
DLT_X2E_SERIAL = 0xd5 DLT_X2E_SERIAL = 0xd5
DLT_X2E_XORAYA = 0xd6 DLT_X2E_XORAYA = 0xd6
DLT_ZWAVE_R1_R2 = 0x105
DLT_ZWAVE_R3 = 0x106
DT_BLK = 0x6 DT_BLK = 0x6
DT_CHR = 0x2 DT_CHR = 0x2
DT_DBF = 0xf DT_DBF = 0xf
@ -323,10 +404,11 @@ const (
EV_EOF = 0x8000 EV_EOF = 0x8000
EV_ERROR = 0x4000 EV_ERROR = 0x4000
EV_FLAG1 = 0x2000 EV_FLAG1 = 0x2000
EV_HUP = 0x800
EV_NODATA = 0x1000 EV_NODATA = 0x1000
EV_ONESHOT = 0x10 EV_ONESHOT = 0x10
EV_RECEIPT = 0x40 EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000 EV_SYSFLAGS = 0xf800
EXTA = 0x4b00 EXTA = 0x4b00
EXTB = 0x9600 EXTB = 0x9600
EXTEXIT_LWP = 0x10000 EXTEXIT_LWP = 0x10000
@ -365,8 +447,9 @@ const (
IFF_ALLMULTI = 0x200 IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000 IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2 IFF_BROADCAST = 0x2
IFF_CANTCHANGE = 0x118e72 IFF_CANTCHANGE = 0x318e72
IFF_DEBUG = 0x4 IFF_DEBUG = 0x4
IFF_IDIRECT = 0x200000
IFF_LINK0 = 0x1000 IFF_LINK0 = 0x1000
IFF_LINK1 = 0x2000 IFF_LINK1 = 0x2000
IFF_LINK2 = 0x4000 IFF_LINK2 = 0x4000
@ -441,7 +524,6 @@ const (
IFT_EPLRS = 0x57 IFT_EPLRS = 0x57
IFT_ESCON = 0x49 IFT_ESCON = 0x49
IFT_ETHER = 0x6 IFT_ETHER = 0x6
IFT_FAITH = 0xf2
IFT_FAST = 0x7d IFT_FAST = 0x7d
IFT_FASTETHER = 0x3e IFT_FASTETHER = 0x3e
IFT_FASTETHERFX = 0x45 IFT_FASTETHERFX = 0x45
@ -614,6 +696,7 @@ const (
IN_CLASSD_NET = 0xf0000000 IN_CLASSD_NET = 0xf0000000
IN_CLASSD_NSHIFT = 0x1c IN_CLASSD_NSHIFT = 0x1c
IN_LOOPBACKNET = 0x7f IN_LOOPBACKNET = 0x7f
IN_RFC3021_MASK = 0xfffffffe
IPPROTO_3PC = 0x22 IPPROTO_3PC = 0x22
IPPROTO_ADFS = 0x44 IPPROTO_ADFS = 0x44
IPPROTO_AH = 0x33 IPPROTO_AH = 0x33
@ -735,7 +818,6 @@ const (
IPV6_DEFHLIM = 0x40 IPV6_DEFHLIM = 0x40
IPV6_DONTFRAG = 0x3e IPV6_DONTFRAG = 0x3e
IPV6_DSTOPTS = 0x32 IPV6_DSTOPTS = 0x32
IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00 IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FRAGTTL = 0x78 IPV6_FRAGTTL = 0x78
@ -747,7 +829,6 @@ const (
IPV6_HLIMDEC = 0x1 IPV6_HLIMDEC = 0x1
IPV6_HOPLIMIT = 0x2f IPV6_HOPLIMIT = 0x2f
IPV6_HOPOPTS = 0x31 IPV6_HOPOPTS = 0x31
IPV6_IPSEC_POLICY = 0x1c
IPV6_JOIN_GROUP = 0xc IPV6_JOIN_GROUP = 0xc
IPV6_LEAVE_GROUP = 0xd IPV6_LEAVE_GROUP = 0xd
IPV6_MAXHLIM = 0xff IPV6_MAXHLIM = 0xff
@ -795,16 +876,22 @@ const (
IP_DUMMYNET_DEL = 0x3d IP_DUMMYNET_DEL = 0x3d
IP_DUMMYNET_FLUSH = 0x3e IP_DUMMYNET_FLUSH = 0x3e
IP_DUMMYNET_GET = 0x40 IP_DUMMYNET_GET = 0x40
IP_FAITH = 0x16
IP_FW_ADD = 0x32 IP_FW_ADD = 0x32
IP_FW_DEL = 0x33 IP_FW_DEL = 0x33
IP_FW_FLUSH = 0x34 IP_FW_FLUSH = 0x34
IP_FW_GET = 0x36 IP_FW_GET = 0x36
IP_FW_RESETLOG = 0x37 IP_FW_RESETLOG = 0x37
IP_FW_TBL_ADD = 0x2a
IP_FW_TBL_CREATE = 0x28
IP_FW_TBL_DEL = 0x2b
IP_FW_TBL_DESTROY = 0x29
IP_FW_TBL_EXPIRE = 0x2f
IP_FW_TBL_FLUSH = 0x2c
IP_FW_TBL_GET = 0x2d
IP_FW_TBL_ZERO = 0x2e
IP_FW_X = 0x31 IP_FW_X = 0x31
IP_FW_ZERO = 0x35 IP_FW_ZERO = 0x35
IP_HDRINCL = 0x2 IP_HDRINCL = 0x2
IP_IPSEC_POLICY = 0x15
IP_MAXPACKET = 0xffff IP_MAXPACKET = 0xffff
IP_MAX_MEMBERSHIPS = 0x14 IP_MAX_MEMBERSHIPS = 0x14
IP_MF = 0x2000 IP_MF = 0x2000
@ -1080,12 +1167,10 @@ const (
RTM_MISS = 0x7 RTM_MISS = 0x7
RTM_NEWADDR = 0xc RTM_NEWADDR = 0xc
RTM_NEWMADDR = 0xf RTM_NEWMADDR = 0xf
RTM_OLDADD = 0x9
RTM_OLDDEL = 0xa
RTM_REDIRECT = 0x6 RTM_REDIRECT = 0x6
RTM_RESOLVE = 0xb RTM_RESOLVE = 0xb
RTM_RTTUNIT = 0xf4240 RTM_RTTUNIT = 0xf4240
RTM_VERSION = 0x6 RTM_VERSION = 0x7
RTV_EXPIRE = 0x4 RTV_EXPIRE = 0x4
RTV_HOPCOUNT = 0x2 RTV_HOPCOUNT = 0x2
RTV_IWCAPSEGS = 0x400 RTV_IWCAPSEGS = 0x400
@ -1106,13 +1191,13 @@ const (
SHUT_RDWR = 0x2 SHUT_RDWR = 0x2
SHUT_WR = 0x1 SHUT_WR = 0x1
SIOCADDMULTI = 0x80206931 SIOCADDMULTI = 0x80206931
SIOCADDRT = 0x8040720a
SIOCAIFADDR = 0x8040691a SIOCAIFADDR = 0x8040691a
SIOCAIFGROUP = 0x80286987
SIOCALIFADDR = 0x8118691b SIOCALIFADDR = 0x8118691b
SIOCATMARK = 0x40047307 SIOCATMARK = 0x40047307
SIOCDELMULTI = 0x80206932 SIOCDELMULTI = 0x80206932
SIOCDELRT = 0x8040720b
SIOCDIFADDR = 0x80206919 SIOCDIFADDR = 0x80206919
SIOCDIFGROUP = 0x80286989
SIOCDIFPHYADDR = 0x80206949 SIOCDIFPHYADDR = 0x80206949
SIOCDLIFADDR = 0x8118691d SIOCDLIFADDR = 0x8118691d
SIOCGDRVSPEC = 0xc028697b SIOCGDRVSPEC = 0xc028697b
@ -1120,6 +1205,7 @@ const (
SIOCGETVIFCNT = 0xc028720f SIOCGETVIFCNT = 0xc028720f
SIOCGHIWAT = 0x40047301 SIOCGHIWAT = 0x40047301
SIOCGIFADDR = 0xc0206921 SIOCGIFADDR = 0xc0206921
SIOCGIFALIAS = 0xc0406929
SIOCGIFBRDADDR = 0xc0206923 SIOCGIFBRDADDR = 0xc0206923
SIOCGIFCAP = 0xc020691f SIOCGIFCAP = 0xc020691f
SIOCGIFCONF = 0xc0106924 SIOCGIFCONF = 0xc0106924
@ -1128,6 +1214,7 @@ const (
SIOCGIFFLAGS = 0xc0206911 SIOCGIFFLAGS = 0xc0206911
SIOCGIFGENERIC = 0xc020693a SIOCGIFGENERIC = 0xc020693a
SIOCGIFGMEMB = 0xc028698a SIOCGIFGMEMB = 0xc028698a
SIOCGIFGROUP = 0xc0286988
SIOCGIFINDEX = 0xc0206920 SIOCGIFINDEX = 0xc0206920
SIOCGIFMEDIA = 0xc0306938 SIOCGIFMEDIA = 0xc0306938
SIOCGIFMETRIC = 0xc0206917 SIOCGIFMETRIC = 0xc0206917
@ -1194,6 +1281,7 @@ const (
SO_RCVBUF = 0x1002 SO_RCVBUF = 0x1002
SO_RCVLOWAT = 0x1004 SO_RCVLOWAT = 0x1004
SO_RCVTIMEO = 0x1006 SO_RCVTIMEO = 0x1006
SO_RERROR = 0x2000
SO_REUSEADDR = 0x4 SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200 SO_REUSEPORT = 0x200
SO_SNDBUF = 0x1001 SO_SNDBUF = 0x1001
@ -1233,6 +1321,9 @@ const (
S_IXGRP = 0x8 S_IXGRP = 0x8
S_IXOTH = 0x1 S_IXOTH = 0x1
S_IXUSR = 0x40 S_IXUSR = 0x40
TAB0 = 0x0
TAB3 = 0x4
TABDLY = 0x4
TCIFLUSH = 0x1 TCIFLUSH = 0x1
TCIOFF = 0x3 TCIOFF = 0x3
TCIOFLUSH = 0x3 TCIOFLUSH = 0x3
@ -1259,6 +1350,8 @@ const (
TCP_NOPUSH = 0x4 TCP_NOPUSH = 0x4
TCP_SIGNATURE_ENABLE = 0x10 TCP_SIGNATURE_ENABLE = 0x10
TCSAFLUSH = 0x2 TCSAFLUSH = 0x2
TIMER_ABSTIME = 0x1
TIMER_RELTIME = 0x0
TIOCCBRK = 0x2000747a TIOCCBRK = 0x2000747a
TIOCCDTR = 0x20007478 TIOCCDTR = 0x20007478
TIOCCONS = 0x80047462 TIOCCONS = 0x80047462
@ -1272,7 +1365,6 @@ const (
TIOCGETD = 0x4004741a TIOCGETD = 0x4004741a
TIOCGPGRP = 0x40047477 TIOCGPGRP = 0x40047477
TIOCGSID = 0x40047463 TIOCGSID = 0x40047463
TIOCGSIZE = 0x40087468
TIOCGWINSZ = 0x40087468 TIOCGWINSZ = 0x40087468
TIOCISPTMASTER = 0x20007455 TIOCISPTMASTER = 0x20007455
TIOCMBIC = 0x8004746b TIOCMBIC = 0x8004746b
@ -1317,7 +1409,6 @@ const (
TIOCSETD = 0x8004741b TIOCSETD = 0x8004741b
TIOCSIG = 0x2000745f TIOCSIG = 0x2000745f
TIOCSPGRP = 0x80047476 TIOCSPGRP = 0x80047476
TIOCSSIZE = 0x80087467
TIOCSTART = 0x2000746e TIOCSTART = 0x2000746e
TIOCSTAT = 0x20007465 TIOCSTAT = 0x20007465
TIOCSTI = 0x80017472 TIOCSTI = 0x80017472
@ -1326,6 +1417,8 @@ const (
TIOCTIMESTAMP = 0x40107459 TIOCTIMESTAMP = 0x40107459
TIOCUCNTL = 0x80047466 TIOCUCNTL = 0x80047466
TOSTOP = 0x400000 TOSTOP = 0x400000
UTIME_NOW = -0x1
UTIME_OMIT = -0x2
VCHECKPT = 0x13 VCHECKPT = 0x13
VDISCARD = 0xf VDISCARD = 0xf
VDSUSP = 0xb VDSUSP = 0xb
@ -1350,9 +1443,12 @@ const (
VWERASE = 0x4 VWERASE = 0x4
WCONTINUED = 0x4 WCONTINUED = 0x4
WCOREFLAG = 0x80 WCOREFLAG = 0x80
WEXITED = 0x10
WLINUXCLONE = 0x80000000 WLINUXCLONE = 0x80000000
WNOHANG = 0x1 WNOHANG = 0x1
WSTOPPED = 0x7f WNOWAIT = 0x8
WSTOPPED = 0x2
WTRAPPED = 0x20
WUNTRACED = 0x2 WUNTRACED = 0x2
) )
@ -1452,11 +1548,6 @@ const (
ETIMEDOUT = syscall.Errno(0x3c) ETIMEDOUT = syscall.Errno(0x3c)
ETOOMANYREFS = syscall.Errno(0x3b) ETOOMANYREFS = syscall.Errno(0x3b)
ETXTBSY = syscall.Errno(0x1a) ETXTBSY = syscall.Errno(0x1a)
EUNUSED94 = syscall.Errno(0x5e)
EUNUSED95 = syscall.Errno(0x5f)
EUNUSED96 = syscall.Errno(0x60)
EUNUSED97 = syscall.Errno(0x61)
EUNUSED98 = syscall.Errno(0x62)
EUSERS = syscall.Errno(0x44) EUSERS = syscall.Errno(0x44)
EWOULDBLOCK = syscall.Errno(0x23) EWOULDBLOCK = syscall.Errno(0x23)
EXDEV = syscall.Errno(0x12) EXDEV = syscall.Errno(0x12)
@ -1600,12 +1691,7 @@ var errorList = [...]struct {
{91, "ENOLINK", "link has been severed"}, {91, "ENOLINK", "link has been severed"},
{92, "EPROTO", "protocol error"}, {92, "EPROTO", "protocol error"},
{93, "ENOMEDIUM", "no medium found"}, {93, "ENOMEDIUM", "no medium found"},
{94, "EUNUSED94", "unknown error: 94"}, {99, "EASYNC", "unknown error: 99"},
{95, "EUNUSED95", "unknown error: 95"},
{96, "EUNUSED96", "unknown error: 96"},
{97, "EUNUSED97", "unknown error: 97"},
{98, "EUNUSED98", "unknown error: 98"},
{99, "ELAST", "unknown error: 99"},
} }
// Signal table // Signal table

View File

@ -324,6 +324,7 @@ const (
CAP_AUDIT_WRITE = 0x1d CAP_AUDIT_WRITE = 0x1d
CAP_BLOCK_SUSPEND = 0x24 CAP_BLOCK_SUSPEND = 0x24
CAP_BPF = 0x27 CAP_BPF = 0x27
CAP_CHECKPOINT_RESTORE = 0x28
CAP_CHOWN = 0x0 CAP_CHOWN = 0x0
CAP_DAC_OVERRIDE = 0x1 CAP_DAC_OVERRIDE = 0x1
CAP_DAC_READ_SEARCH = 0x2 CAP_DAC_READ_SEARCH = 0x2
@ -332,7 +333,7 @@ const (
CAP_IPC_LOCK = 0xe CAP_IPC_LOCK = 0xe
CAP_IPC_OWNER = 0xf CAP_IPC_OWNER = 0xf
CAP_KILL = 0x5 CAP_KILL = 0x5
CAP_LAST_CAP = 0x27 CAP_LAST_CAP = 0x28
CAP_LEASE = 0x1c CAP_LEASE = 0x1c
CAP_LINUX_IMMUTABLE = 0x9 CAP_LINUX_IMMUTABLE = 0x9
CAP_MAC_ADMIN = 0x21 CAP_MAC_ADMIN = 0x21
@ -650,8 +651,8 @@ const (
FAN_DELETE = 0x200 FAN_DELETE = 0x200
FAN_DELETE_SELF = 0x400 FAN_DELETE_SELF = 0x400
FAN_DENY = 0x2 FAN_DENY = 0x2
FAN_DIR_MODIFY = 0x80000
FAN_ENABLE_AUDIT = 0x40 FAN_ENABLE_AUDIT = 0x40
FAN_EVENT_INFO_TYPE_DFID = 0x3
FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2 FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
FAN_EVENT_INFO_TYPE_FID = 0x1 FAN_EVENT_INFO_TYPE_FID = 0x1
FAN_EVENT_METADATA_LEN = 0x18 FAN_EVENT_METADATA_LEN = 0x18
@ -679,13 +680,17 @@ const (
FAN_OPEN_EXEC_PERM = 0x40000 FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000 FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000 FAN_Q_OVERFLOW = 0x4000
FAN_REPORT_DFID_NAME = 0xc00
FAN_REPORT_DIR_FID = 0x400
FAN_REPORT_FID = 0x200 FAN_REPORT_FID = 0x200
FAN_REPORT_NAME = 0x800
FAN_REPORT_TID = 0x100 FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20 FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10 FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
FIDEDUPERANGE = 0xc0189436
FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8 FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
FSCRYPT_KEY_DESC_PREFIX = "fscrypt:" FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8 FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
@ -1507,6 +1512,92 @@ const (
PARITY_DEFAULT = 0x0 PARITY_DEFAULT = 0x0
PARITY_NONE = 0x1 PARITY_NONE = 0x1
PARMRK = 0x8 PARMRK = 0x8
PERF_ATTR_SIZE_VER0 = 0x40
PERF_ATTR_SIZE_VER1 = 0x48
PERF_ATTR_SIZE_VER2 = 0x50
PERF_ATTR_SIZE_VER3 = 0x60
PERF_ATTR_SIZE_VER4 = 0x68
PERF_ATTR_SIZE_VER5 = 0x70
PERF_ATTR_SIZE_VER6 = 0x78
PERF_AUX_FLAG_COLLISION = 0x8
PERF_AUX_FLAG_OVERWRITE = 0x2
PERF_AUX_FLAG_PARTIAL = 0x4
PERF_AUX_FLAG_TRUNCATED = 0x1
PERF_FLAG_FD_CLOEXEC = 0x8
PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4
PERF_MAX_CONTEXTS_PER_STACK = 0x8
PERF_MAX_STACK_DEPTH = 0x7f
PERF_MEM_LOCK_LOCKED = 0x2
PERF_MEM_LOCK_NA = 0x1
PERF_MEM_LOCK_SHIFT = 0x18
PERF_MEM_LVLNUM_ANY_CACHE = 0xb
PERF_MEM_LVLNUM_L1 = 0x1
PERF_MEM_LVLNUM_L2 = 0x2
PERF_MEM_LVLNUM_L3 = 0x3
PERF_MEM_LVLNUM_L4 = 0x4
PERF_MEM_LVLNUM_LFB = 0xc
PERF_MEM_LVLNUM_NA = 0xf
PERF_MEM_LVLNUM_PMEM = 0xe
PERF_MEM_LVLNUM_RAM = 0xd
PERF_MEM_LVLNUM_SHIFT = 0x21
PERF_MEM_LVL_HIT = 0x2
PERF_MEM_LVL_IO = 0x1000
PERF_MEM_LVL_L1 = 0x8
PERF_MEM_LVL_L2 = 0x20
PERF_MEM_LVL_L3 = 0x40
PERF_MEM_LVL_LFB = 0x10
PERF_MEM_LVL_LOC_RAM = 0x80
PERF_MEM_LVL_MISS = 0x4
PERF_MEM_LVL_NA = 0x1
PERF_MEM_LVL_REM_CCE1 = 0x400
PERF_MEM_LVL_REM_CCE2 = 0x800
PERF_MEM_LVL_REM_RAM1 = 0x100
PERF_MEM_LVL_REM_RAM2 = 0x200
PERF_MEM_LVL_SHIFT = 0x5
PERF_MEM_LVL_UNC = 0x2000
PERF_MEM_OP_EXEC = 0x10
PERF_MEM_OP_LOAD = 0x2
PERF_MEM_OP_NA = 0x1
PERF_MEM_OP_PFETCH = 0x8
PERF_MEM_OP_SHIFT = 0x0
PERF_MEM_OP_STORE = 0x4
PERF_MEM_REMOTE_REMOTE = 0x1
PERF_MEM_REMOTE_SHIFT = 0x25
PERF_MEM_SNOOPX_FWD = 0x1
PERF_MEM_SNOOPX_SHIFT = 0x25
PERF_MEM_SNOOP_HIT = 0x4
PERF_MEM_SNOOP_HITM = 0x10
PERF_MEM_SNOOP_MISS = 0x8
PERF_MEM_SNOOP_NA = 0x1
PERF_MEM_SNOOP_NONE = 0x2
PERF_MEM_SNOOP_SHIFT = 0x13
PERF_MEM_TLB_HIT = 0x2
PERF_MEM_TLB_L1 = 0x8
PERF_MEM_TLB_L2 = 0x10
PERF_MEM_TLB_MISS = 0x4
PERF_MEM_TLB_NA = 0x1
PERF_MEM_TLB_OS = 0x40
PERF_MEM_TLB_SHIFT = 0x1a
PERF_MEM_TLB_WK = 0x20
PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER = 0x1
PERF_RECORD_MISC_COMM_EXEC = 0x2000
PERF_RECORD_MISC_CPUMODE_MASK = 0x7
PERF_RECORD_MISC_CPUMODE_UNKNOWN = 0x0
PERF_RECORD_MISC_EXACT_IP = 0x4000
PERF_RECORD_MISC_EXT_RESERVED = 0x8000
PERF_RECORD_MISC_FORK_EXEC = 0x2000
PERF_RECORD_MISC_GUEST_KERNEL = 0x4
PERF_RECORD_MISC_GUEST_USER = 0x5
PERF_RECORD_MISC_HYPERVISOR = 0x3
PERF_RECORD_MISC_KERNEL = 0x1
PERF_RECORD_MISC_MMAP_DATA = 0x2000
PERF_RECORD_MISC_PROC_MAP_PARSE_TIMEOUT = 0x1000
PERF_RECORD_MISC_SWITCH_OUT = 0x2000
PERF_RECORD_MISC_SWITCH_OUT_PREEMPT = 0x4000
PERF_RECORD_MISC_USER = 0x2
PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
PIPEFS_MAGIC = 0x50495045 PIPEFS_MAGIC = 0x50495045
PPC_CMM_MAGIC = 0xc7571590 PPC_CMM_MAGIC = 0xc7571590
PPPIOCGNPMODE = 0xc008744c PPPIOCGNPMODE = 0xc008744c
@ -1893,6 +1984,7 @@ const (
RTPROT_EIGRP = 0xc0 RTPROT_EIGRP = 0xc0
RTPROT_GATED = 0x8 RTPROT_GATED = 0x8
RTPROT_ISIS = 0xbb RTPROT_ISIS = 0xbb
RTPROT_KEEPALIVED = 0x12
RTPROT_KERNEL = 0x2 RTPROT_KERNEL = 0x2
RTPROT_MROUTED = 0x11 RTPROT_MROUTED = 0x11
RTPROT_MRT = 0xa RTPROT_MRT = 0xa
@ -2083,6 +2175,7 @@ const (
SO_EE_ORIGIN_TXSTATUS = 0x4 SO_EE_ORIGIN_TXSTATUS = 0x4
SO_EE_ORIGIN_TXTIME = 0x6 SO_EE_ORIGIN_TXTIME = 0x6
SO_EE_ORIGIN_ZEROCOPY = 0x5 SO_EE_ORIGIN_ZEROCOPY = 0x5
SO_EE_RFC4884_FLAG_INVALID = 0x1
SO_GET_FILTER = 0x1a SO_GET_FILTER = 0x1a
SO_NO_CHECK = 0xb SO_NO_CHECK = 0xb
SO_PEERNAME = 0x1c SO_PEERNAME = 0x1c
@ -2356,6 +2449,23 @@ const (
WCONTINUED = 0x8 WCONTINUED = 0x8
WDIOC_SETPRETIMEOUT = 0xc0045708 WDIOC_SETPRETIMEOUT = 0xc0045708
WDIOC_SETTIMEOUT = 0xc0045706 WDIOC_SETTIMEOUT = 0xc0045706
WDIOF_ALARMONLY = 0x400
WDIOF_CARDRESET = 0x20
WDIOF_EXTERN1 = 0x4
WDIOF_EXTERN2 = 0x8
WDIOF_FANFAULT = 0x2
WDIOF_KEEPALIVEPING = 0x8000
WDIOF_MAGICCLOSE = 0x100
WDIOF_OVERHEAT = 0x1
WDIOF_POWEROVER = 0x40
WDIOF_POWERUNDER = 0x10
WDIOF_PRETIMEOUT = 0x200
WDIOF_SETTIMEOUT = 0x80
WDIOF_UNKNOWN = -0x1
WDIOS_DISABLECARD = 0x1
WDIOS_ENABLECARD = 0x2
WDIOS_TEMPPANIC = 0x4
WDIOS_UNKNOWN = -0x1
WEXITED = 0x4 WEXITED = 0x4
WIN_ACKMEDIACHANGE = 0xdb WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5 WIN_CHECKPOWERMODE1 = 0xe5

View File

@ -71,6 +71,8 @@ const (
EXTPROC = 0x10000 EXTPROC = 0x10000
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FICLONE = 0x40049409
FICLONERANGE = 0x4020940d
FLUSHO = 0x1000 FLUSHO = 0x1000
FP_XSTATE_MAGIC2 = 0x46505845 FP_XSTATE_MAGIC2 = 0x46505845
FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_ENABLE_VERITY = 0x40806685

View File

@ -71,6 +71,8 @@ const (
EXTPROC = 0x10000 EXTPROC = 0x10000
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FICLONE = 0x40049409
FICLONERANGE = 0x4020940d
FLUSHO = 0x1000 FLUSHO = 0x1000
FP_XSTATE_MAGIC2 = 0x46505845 FP_XSTATE_MAGIC2 = 0x46505845
FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_ENABLE_VERITY = 0x40806685

View File

@ -71,6 +71,8 @@ const (
EXTPROC = 0x10000 EXTPROC = 0x10000
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FICLONE = 0x40049409
FICLONERANGE = 0x4020940d
FLUSHO = 0x1000 FLUSHO = 0x1000
FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_ENABLE_VERITY = 0x40806685
FS_IOC_GETFLAGS = 0x80046601 FS_IOC_GETFLAGS = 0x80046601

View File

@ -73,6 +73,8 @@ const (
EXTRA_MAGIC = 0x45585401 EXTRA_MAGIC = 0x45585401
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FICLONE = 0x40049409
FICLONERANGE = 0x4020940d
FLUSHO = 0x1000 FLUSHO = 0x1000
FPSIMD_MAGIC = 0x46508001 FPSIMD_MAGIC = 0x46508001
FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_ENABLE_VERITY = 0x40806685

View File

@ -71,6 +71,8 @@ const (
EXTPROC = 0x10000 EXTPROC = 0x10000
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FICLONE = 0x80049409
FICLONERANGE = 0x8020940d
FLUSHO = 0x2000 FLUSHO = 0x2000
FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_ENABLE_VERITY = 0x80806685
FS_IOC_GETFLAGS = 0x40046601 FS_IOC_GETFLAGS = 0x40046601

View File

@ -71,6 +71,8 @@ const (
EXTPROC = 0x10000 EXTPROC = 0x10000
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FICLONE = 0x80049409
FICLONERANGE = 0x8020940d
FLUSHO = 0x2000 FLUSHO = 0x2000
FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_ENABLE_VERITY = 0x80806685
FS_IOC_GETFLAGS = 0x40086601 FS_IOC_GETFLAGS = 0x40086601

View File

@ -71,6 +71,8 @@ const (
EXTPROC = 0x10000 EXTPROC = 0x10000
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FICLONE = 0x80049409
FICLONERANGE = 0x8020940d
FLUSHO = 0x2000 FLUSHO = 0x2000
FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_ENABLE_VERITY = 0x80806685
FS_IOC_GETFLAGS = 0x40086601 FS_IOC_GETFLAGS = 0x40086601

View File

@ -71,6 +71,8 @@ const (
EXTPROC = 0x10000 EXTPROC = 0x10000
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FICLONE = 0x80049409
FICLONERANGE = 0x8020940d
FLUSHO = 0x2000 FLUSHO = 0x2000
FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_ENABLE_VERITY = 0x80806685
FS_IOC_GETFLAGS = 0x40046601 FS_IOC_GETFLAGS = 0x40046601

View File

@ -71,6 +71,8 @@ const (
EXTPROC = 0x10000000 EXTPROC = 0x10000000
FF1 = 0x4000 FF1 = 0x4000
FFDLY = 0x4000 FFDLY = 0x4000
FICLONE = 0x80049409
FICLONERANGE = 0x8020940d
FLUSHO = 0x800000 FLUSHO = 0x800000
FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_ENABLE_VERITY = 0x80806685
FS_IOC_GETFLAGS = 0x40086601 FS_IOC_GETFLAGS = 0x40086601

View File

@ -71,6 +71,8 @@ const (
EXTPROC = 0x10000000 EXTPROC = 0x10000000
FF1 = 0x4000 FF1 = 0x4000
FFDLY = 0x4000 FFDLY = 0x4000
FICLONE = 0x80049409
FICLONERANGE = 0x8020940d
FLUSHO = 0x800000 FLUSHO = 0x800000
FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_ENABLE_VERITY = 0x80806685
FS_IOC_GETFLAGS = 0x40086601 FS_IOC_GETFLAGS = 0x40086601

View File

@ -71,6 +71,8 @@ const (
EXTPROC = 0x10000 EXTPROC = 0x10000
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FICLONE = 0x40049409
FICLONERANGE = 0x4020940d
FLUSHO = 0x1000 FLUSHO = 0x1000
FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_ENABLE_VERITY = 0x40806685
FS_IOC_GETFLAGS = 0x80086601 FS_IOC_GETFLAGS = 0x80086601

View File

@ -71,6 +71,8 @@ const (
EXTPROC = 0x10000 EXTPROC = 0x10000
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FICLONE = 0x40049409
FICLONERANGE = 0x4020940d
FLUSHO = 0x1000 FLUSHO = 0x1000
FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_ENABLE_VERITY = 0x40806685
FS_IOC_GETFLAGS = 0x80086601 FS_IOC_GETFLAGS = 0x80086601

View File

@ -75,6 +75,8 @@ const (
EXTPROC = 0x10000 EXTPROC = 0x10000
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FICLONE = 0x80049409
FICLONERANGE = 0x8020940d
FLUSHO = 0x1000 FLUSHO = 0x1000
FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_ENABLE_VERITY = 0x80806685
FS_IOC_GETFLAGS = 0x40086601 FS_IOC_GETFLAGS = 0x40086601

View File

@ -490,21 +490,6 @@ func libc_munlockall_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
_, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
func libc_getattrlist_trampoline()
//go:linkname libc_getattrlist libc_getattrlist
//go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe() (r int, w int, err error) { func pipe() (r int, w int, err error) {
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0) r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
r = int(r0) r = int(r0)
@ -1277,6 +1262,28 @@ func libc_ftruncate_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // 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_syscall(funcPC(libc_getcwd_trampoline), uintptr(_p0), uintptr(len(buf)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
func libc_getcwd_trampoline()
//go:linkname libc_getcwd libc_getcwd
//go:cgo_import_dynamic libc_getcwd getcwd "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdtablesize() (size int) { func Getdtablesize() (size int) {
r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0) r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
size = int(r0) size = int(r0)

View File

@ -60,8 +60,6 @@ TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlock(SB) JMP libc_munlock(SB)
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlockall(SB) JMP libc_munlockall(SB)
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
JMP libc_getattrlist(SB)
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
JMP libc_pipe(SB) JMP libc_pipe(SB)
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
@ -146,6 +144,8 @@ TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
JMP libc_fsync(SB) JMP libc_fsync(SB)
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
JMP libc_ftruncate(SB) JMP libc_ftruncate(SB)
TEXT ·libc_getcwd_trampoline(SB),NOSPLIT,$0-0
JMP libc_getcwd(SB)
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
JMP libc_getdtablesize(SB) JMP libc_getdtablesize(SB)
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0

View File

@ -490,21 +490,6 @@ func libc_munlockall_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
_, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
func libc_getattrlist_trampoline()
//go:linkname libc_getattrlist libc_getattrlist
//go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe() (r int, w int, err error) { func pipe() (r int, w int, err error) {
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0) r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
r = int(r0) r = int(r0)
@ -1277,6 +1262,28 @@ func libc_ftruncate_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // 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_syscall(funcPC(libc_getcwd_trampoline), uintptr(_p0), uintptr(len(buf)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
func libc_getcwd_trampoline()
//go:linkname libc_getcwd libc_getcwd
//go:cgo_import_dynamic libc_getcwd getcwd "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdtablesize() (size int) { func Getdtablesize() (size int) {
r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0) r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
size = int(r0) size = int(r0)

View File

@ -60,8 +60,6 @@ TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlock(SB) JMP libc_munlock(SB)
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlockall(SB) JMP libc_munlockall(SB)
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
JMP libc_getattrlist(SB)
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
JMP libc_pipe(SB) JMP libc_pipe(SB)
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
@ -146,6 +144,8 @@ TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
JMP libc_fsync(SB) JMP libc_fsync(SB)
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
JMP libc_ftruncate(SB) JMP libc_ftruncate(SB)
TEXT ·libc_getcwd_trampoline(SB),NOSPLIT,$0-0
JMP libc_getcwd(SB)
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
JMP libc_getdtablesize(SB) JMP libc_getdtablesize(SB)
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0

View File

@ -490,21 +490,6 @@ func libc_munlockall_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
_, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
func libc_getattrlist_trampoline()
//go:linkname libc_getattrlist libc_getattrlist
//go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe() (r int, w int, err error) { func pipe() (r int, w int, err error) {
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0) r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
r = int(r0) r = int(r0)
@ -1277,6 +1262,28 @@ func libc_ftruncate_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // 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_syscall(funcPC(libc_getcwd_trampoline), uintptr(_p0), uintptr(len(buf)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
func libc_getcwd_trampoline()
//go:linkname libc_getcwd libc_getcwd
//go:cgo_import_dynamic libc_getcwd getcwd "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdtablesize() (size int) { func Getdtablesize() (size int) {
r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0) r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
size = int(r0) size = int(r0)

View File

@ -60,8 +60,6 @@ TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlock(SB) JMP libc_munlock(SB)
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlockall(SB) JMP libc_munlockall(SB)
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
JMP libc_getattrlist(SB)
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
JMP libc_pipe(SB) JMP libc_pipe(SB)
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
@ -146,6 +144,8 @@ TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
JMP libc_fsync(SB) JMP libc_fsync(SB)
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
JMP libc_ftruncate(SB) JMP libc_ftruncate(SB)
TEXT ·libc_getcwd_trampoline(SB),NOSPLIT,$0-0
JMP libc_getcwd(SB)
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
JMP libc_getdtablesize(SB) JMP libc_getdtablesize(SB)
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0

View File

@ -490,21 +490,6 @@ func libc_munlockall_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
_, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
func libc_getattrlist_trampoline()
//go:linkname libc_getattrlist libc_getattrlist
//go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe() (r int, w int, err error) { func pipe() (r int, w int, err error) {
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0) r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
r = int(r0) r = int(r0)
@ -1277,6 +1262,28 @@ func libc_ftruncate_trampoline()
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // 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_syscall(funcPC(libc_getcwd_trampoline), uintptr(_p0), uintptr(len(buf)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
func libc_getcwd_trampoline()
//go:linkname libc_getcwd libc_getcwd
//go:cgo_import_dynamic libc_getcwd getcwd "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdtablesize() (size int) { func Getdtablesize() (size int) {
r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0) r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
size = int(r0) size = int(r0)

View File

@ -60,8 +60,6 @@ TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlock(SB) JMP libc_munlock(SB)
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlockall(SB) JMP libc_munlockall(SB)
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
JMP libc_getattrlist(SB)
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
JMP libc_pipe(SB) JMP libc_pipe(SB)
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
@ -146,6 +144,8 @@ TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
JMP libc_fsync(SB) JMP libc_fsync(SB)
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
JMP libc_ftruncate(SB) JMP libc_ftruncate(SB)
TEXT ·libc_getcwd_trampoline(SB),NOSPLIT,$0-0
JMP libc_getcwd(SB)
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
JMP libc_getdtablesize(SB) JMP libc_getdtablesize(SB)
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0 TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0

View File

@ -214,22 +214,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
var _p0 unsafe.Pointer
if len(mib) > 0 {
_p0 = unsafe.Pointer(&mib[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimes(path string, timeval *[2]Timeval) (err error) { func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -439,6 +423,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
var _p0 unsafe.Pointer
if len(mib) > 0 {
_p0 = unsafe.Pointer(&mib[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) { func Access(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)

View File

@ -13,20 +13,23 @@ import (
//go:cgo_import_dynamic libc_preadv preadv "libc.so" //go:cgo_import_dynamic libc_preadv preadv "libc.so"
//go:cgo_import_dynamic libc_writev writev "libc.so" //go:cgo_import_dynamic libc_writev writev "libc.so"
//go:cgo_import_dynamic libc_pwritev pwritev "libc.so" //go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
//go:cgo_import_dynamic libc_accept4 accept4 "libc.so" //go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so"
//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
//go:linkname procreadv libc_readv //go:linkname procreadv libc_readv
//go:linkname procpreadv libc_preadv //go:linkname procpreadv libc_preadv
//go:linkname procwritev libc_writev //go:linkname procwritev libc_writev
//go:linkname procpwritev libc_pwritev //go:linkname procpwritev libc_pwritev
//go:linkname procaccept4 libc_accept4 //go:linkname procaccept4 libc_accept4
//go:linkname procpipe2 libc_pipe2
var ( var (
procreadv, procreadv,
procpreadv, procpreadv,
procwritev, procwritev,
procpwritev, procpwritev,
procaccept4 syscallFunc procaccept4,
procpipe2 syscallFunc
) )
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@ -99,3 +102,13 @@ func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int,
} }
return 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 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe2)), 2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0, 0, 0, 0)
if e1 != 0 {
err = e1
}
return
}

View File

@ -6,129 +6,125 @@
package unix package unix
const ( const (
// SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int SYS_EXIT = 1 // { void exit(int rval); }
SYS_EXIT = 1 // { void exit(int rval); } SYS_FORK = 2 // { int fork(void); }
SYS_FORK = 2 // { int fork(void); } SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); }
SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); } SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); }
SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); } SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
SYS_OPEN = 5 // { int open(char *path, int flags, int mode); } SYS_CLOSE = 6 // { int close(int fd); }
SYS_CLOSE = 6 // { int close(int fd); } SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, struct rusage *rusage); } wait4 wait_args int
SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, struct rusage *rusage); } wait4 wait_args int // SYS_NOSYS = 8; // { int nosys(void); } __nosys nosys_args int
SYS_LINK = 9 // { int link(char *path, char *link); } SYS_LINK = 9 // { int link(char *path, char *link); }
SYS_UNLINK = 10 // { int unlink(char *path); } SYS_UNLINK = 10 // { int unlink(char *path); }
SYS_CHDIR = 12 // { int chdir(char *path); } SYS_CHDIR = 12 // { int chdir(char *path); }
SYS_FCHDIR = 13 // { int fchdir(int fd); } SYS_FCHDIR = 13 // { int fchdir(int fd); }
SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); } SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
SYS_CHMOD = 15 // { int chmod(char *path, int mode); } SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, int flags); } SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, int flags); }
SYS_GETPID = 20 // { pid_t getpid(void); } SYS_GETPID = 20 // { pid_t getpid(void); }
SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); } SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); }
SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); } SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
SYS_SETUID = 23 // { int setuid(uid_t uid); } SYS_SETUID = 23 // { int setuid(uid_t uid); }
SYS_GETUID = 24 // { uid_t getuid(void); } SYS_GETUID = 24 // { uid_t getuid(void); }
SYS_GETEUID = 25 // { uid_t geteuid(void); } SYS_GETEUID = 25 // { uid_t geteuid(void); }
SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, int data); } SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }
SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); } SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); }
SYS_SENDMSG = 28 // { int sendmsg(int s, caddr_t msg, int flags); } SYS_SENDMSG = 28 // { int sendmsg(int s, caddr_t msg, int flags); }
SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, int flags, caddr_t from, int *fromlenaddr); } SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, int flags, caddr_t from, int *fromlenaddr); }
SYS_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); } SYS_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); }
SYS_GETPEERNAME = 31 // { int getpeername(int fdes, caddr_t asa, int *alen); } SYS_GETPEERNAME = 31 // { int getpeername(int fdes, caddr_t asa, int *alen); }
SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, caddr_t asa, int *alen); } SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, caddr_t asa, int *alen); }
SYS_ACCESS = 33 // { int access(char *path, int flags); } SYS_ACCESS = 33 // { int access(char *path, int flags); }
SYS_CHFLAGS = 34 // { int chflags(char *path, int flags); } SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
SYS_FCHFLAGS = 35 // { int fchflags(int fd, int flags); } SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
SYS_SYNC = 36 // { int sync(void); } SYS_SYNC = 36 // { int sync(void); }
SYS_KILL = 37 // { int kill(int pid, int signum); } SYS_KILL = 37 // { int kill(int pid, int signum); }
SYS_GETPPID = 39 // { pid_t getppid(void); } SYS_GETPPID = 39 // { pid_t getppid(void); }
SYS_DUP = 41 // { int dup(int fd); } SYS_DUP = 41 // { int dup(int fd); }
SYS_PIPE = 42 // { int pipe(void); } SYS_PIPE = 42 // { int pipe(void); }
SYS_GETEGID = 43 // { gid_t getegid(void); } SYS_GETEGID = 43 // { gid_t getegid(void); }
SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); } SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, u_long offset, u_int scale); }
SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); } SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); }
SYS_GETGID = 47 // { gid_t getgid(void); } SYS_GETGID = 47 // { gid_t getgid(void); }
SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); } SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, size_t namelen); }
SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); } SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
SYS_ACCT = 51 // { int acct(char *path); } SYS_ACCT = 51 // { int acct(char *path); }
SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); } SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); }
SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); } SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); }
SYS_REBOOT = 55 // { int reboot(int opt); } SYS_REBOOT = 55 // { int reboot(int opt); }
SYS_REVOKE = 56 // { int revoke(char *path); } SYS_REVOKE = 56 // { int revoke(char *path); }
SYS_SYMLINK = 57 // { int symlink(char *path, char *link); } SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); } SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); }
SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); } SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
SYS_CHROOT = 61 // { int chroot(char *path); } SYS_CHROOT = 61 // { int chroot(char *path); }
SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); } SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
SYS_VFORK = 66 // { pid_t vfork(void); } SYS_VFORK = 66 // { pid_t vfork(void); }
SYS_SBRK = 69 // { int sbrk(int incr); } SYS_SBRK = 69 // { caddr_t sbrk(size_t incr); }
SYS_SSTK = 70 // { int sstk(int incr); } SYS_SSTK = 70 // { int sstk(size_t incr); }
SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); } SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); } SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); }
SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); } SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); } SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); }
SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); } SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); } SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
SYS_GETPGRP = 81 // { int getpgrp(void); } SYS_GETPGRP = 81 // { int getpgrp(void); }
SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); } SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); } SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }
SYS_SWAPON = 85 // { int swapon(char *name); } SYS_SWAPON = 85 // { int swapon(char *name); }
SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); } SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
SYS_DUP2 = 90 // { int dup2(int from, int to); } SYS_DUP2 = 90 // { int dup2(int from, int to); }
SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
SYS_FSYNC = 95 // { int fsync(int fd); } SYS_FSYNC = 95 // { int fsync(int fd); }
SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); } SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); } SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); } SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); } SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); } SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); }
SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); } SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }
SYS_LISTEN = 106 // { int listen(int s, int backlog); } SYS_LISTEN = 106 // { int listen(int s, int backlog); }
SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); } SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }
SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); } SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); }
SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); } SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); }
SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); } SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); } SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }
SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); } SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }
SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); } SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); } SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); } SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
SYS_SETREGID = 127 // { int setregid(int rgid, int egid); } SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
SYS_RENAME = 128 // { int rename(char *from, char *to); } SYS_RENAME = 128 // { int rename(char *from, char *to); }
SYS_FLOCK = 131 // { int flock(int fd, int how); } SYS_FLOCK = 131 // { int flock(int fd, int how); }
SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); } SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); } SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }
SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); } SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }
SYS_MKDIR = 136 // { int mkdir(char *path, int mode); } SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
SYS_RMDIR = 137 // { int rmdir(char *path); } SYS_RMDIR = 137 // { int rmdir(char *path); }
SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); } SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); } SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }
SYS_SETSID = 147 // { int setsid(void); } SYS_SETSID = 147 // { int setsid(void); }
SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); } SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }
SYS_STATFS = 157 // { int statfs(char *path, struct statfs *buf); } SYS_STATFS = 157 // { int statfs(char *path, struct statfs *buf); }
SYS_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); } SYS_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); }
SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); } SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
SYS_GETDOMAINNAME = 162 // { int getdomainname(char *domainname, int len); } SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
SYS_SETDOMAINNAME = 163 // { int setdomainname(char *domainname, int len); } SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }
SYS_UNAME = 164 // { int uname(struct utsname *name); } SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, size_t nbyte, int flags, off_t offset); }
SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, size_t nbyte, int flags, off_t offset); }
SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); } SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, size_t nbyte, int flags, off_t offset); } SYS_SETGID = 181 // { int setgid(gid_t gid); }
SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, size_t nbyte, int flags, off_t offset); } SYS_SETEGID = 182 // { int setegid(gid_t egid); }
SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
SYS_SETGID = 181 // { int setgid(gid_t gid); } SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
SYS_SETEGID = 182 // { int setegid(gid_t egid); } SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
SYS_SETEUID = 183 // { int seteuid(uid_t euid); } SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
SYS_PATHCONF = 191 // { int pathconf(char *path, int name); } SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); } SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, int pad, off_t pos); }
SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, int pad, off_t pos); }
// SYS_NOSYS = 198; // { int nosys(void); } __syscall __syscall_args int
SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, int whence); } SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, int whence); }
SYS_TRUNCATE = 200 // { int truncate(char *path, int pad, off_t length); } SYS_TRUNCATE = 200 // { int truncate(char *path, int pad, off_t length); }
SYS_FTRUNCATE = 201 // { int ftruncate(int fd, int pad, off_t length); } SYS_FTRUNCATE = 201 // { int ftruncate(int fd, int pad, off_t length); }
@ -161,8 +157,8 @@ const (
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); } SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, struct iovec *iovp, u_int iovcnt, int flags, off_t offset); } SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, const struct iovec *iovp, int iovcnt, int flags, off_t offset); }
SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, struct iovec *iovp,u_int iovcnt, int flags, off_t offset); } SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, const struct iovec *iovp, int iovcnt, int flags, off_t offset); }
SYS_FHSTATFS = 297 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); } SYS_FHSTATFS = 297 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); } SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
SYS_MODNEXT = 300 // { int modnext(int modid); } SYS_MODNEXT = 300 // { int modnext(int modid); }
@ -225,7 +221,7 @@ const (
SYS_KQUEUE = 362 // { int kqueue(void); } SYS_KQUEUE = 362 // { int kqueue(void); }
SYS_KEVENT = 363 // { int kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } SYS_KEVENT = 363 // { int kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); } SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); }
SYS_LCHFLAGS = 391 // { int lchflags(char *path, int flags); } SYS_LCHFLAGS = 391 // { int lchflags(const char *path, u_long flags); }
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); } SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); } SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
SYS_VARSYM_SET = 450 // { int varsym_set(int level, const char *name, const char *data); } SYS_VARSYM_SET = 450 // { int varsym_set(int level, const char *name, const char *data); }
@ -302,7 +298,7 @@ const (
SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); } SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); } SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }
SYS_PROCCTL = 536 // { int procctl(idtype_t idtype, id_t id, int cmd, void *data); } SYS_PROCCTL = 536 // { int procctl(idtype_t idtype, id_t id, int cmd, void *data); }
SYS_CHFLAGSAT = 537 // { int chflagsat(int fd, const char *path, int flags, int atflags);} SYS_CHFLAGSAT = 537 // { int chflagsat(int fd, const char *path, u_long flags, int atflags);}
SYS_PIPE2 = 538 // { int pipe2(int *fildes, int flags); } SYS_PIPE2 = 538 // { int pipe2(int *fildes, int flags); }
SYS_UTIMENSAT = 539 // { int utimensat(int fd, const char *path, const struct timespec *ts, int flags); } SYS_UTIMENSAT = 539 // { int utimensat(int fd, const char *path, const struct timespec *ts, int flags); }
SYS_FUTIMENS = 540 // { int futimens(int fd, const struct timespec *ts); } SYS_FUTIMENS = 540 // { int futimens(int fd, const struct timespec *ts); }
@ -312,4 +308,9 @@ const (
SYS_LWP_SETAFFINITY = 544 // { int lwp_setaffinity(pid_t pid, lwpid_t tid, const cpumask_t *mask); } SYS_LWP_SETAFFINITY = 544 // { int lwp_setaffinity(pid_t pid, lwpid_t tid, const cpumask_t *mask); }
SYS_LWP_GETAFFINITY = 545 // { int lwp_getaffinity(pid_t pid, lwpid_t tid, cpumask_t *mask); } SYS_LWP_GETAFFINITY = 545 // { int lwp_getaffinity(pid_t pid, lwpid_t tid, cpumask_t *mask); }
SYS_LWP_CREATE2 = 546 // { int lwp_create2(struct lwp_params *params, const cpumask_t *mask); } SYS_LWP_CREATE2 = 546 // { int lwp_create2(struct lwp_params *params, const cpumask_t *mask); }
SYS_GETCPUCLOCKID = 547 // { int getcpuclockid(pid_t pid, lwpid_t lwp_id, clockid_t *clock_id); }
SYS_WAIT6 = 548 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); }
SYS_LWP_GETNAME = 549 // { int lwp_getname(lwpid_t tid, char *name, size_t len); }
SYS_GETRANDOM = 550 // { ssize_t getrandom(void *buf, size_t len, unsigned flags); }
SYS___REALPATH = 551 // { ssize_t __realpath(const char *path, char *buf, size_t len); }
) )

View File

@ -431,6 +431,7 @@ const (
SYS_FSPICK = 433 SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434 SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435 SYS_CLONE3 = 435
SYS_CLOSE_RANGE = 436
SYS_OPENAT2 = 437 SYS_OPENAT2 = 437
SYS_PIDFD_GETFD = 438 SYS_PIDFD_GETFD = 438
SYS_FACCESSAT2 = 439 SYS_FACCESSAT2 = 439

View File

@ -353,6 +353,7 @@ const (
SYS_FSPICK = 433 SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434 SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435 SYS_CLONE3 = 435
SYS_CLOSE_RANGE = 436
SYS_OPENAT2 = 437 SYS_OPENAT2 = 437
SYS_PIDFD_GETFD = 438 SYS_PIDFD_GETFD = 438
SYS_FACCESSAT2 = 439 SYS_FACCESSAT2 = 439

View File

@ -395,6 +395,7 @@ const (
SYS_FSPICK = 433 SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434 SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435 SYS_CLONE3 = 435
SYS_CLOSE_RANGE = 436
SYS_OPENAT2 = 437 SYS_OPENAT2 = 437
SYS_PIDFD_GETFD = 438 SYS_PIDFD_GETFD = 438
SYS_FACCESSAT2 = 439 SYS_FACCESSAT2 = 439

View File

@ -298,6 +298,7 @@ const (
SYS_FSPICK = 433 SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434 SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435 SYS_CLONE3 = 435
SYS_CLOSE_RANGE = 436
SYS_OPENAT2 = 437 SYS_OPENAT2 = 437
SYS_PIDFD_GETFD = 438 SYS_PIDFD_GETFD = 438
SYS_FACCESSAT2 = 439 SYS_FACCESSAT2 = 439

View File

@ -416,6 +416,7 @@ const (
SYS_FSPICK = 4433 SYS_FSPICK = 4433
SYS_PIDFD_OPEN = 4434 SYS_PIDFD_OPEN = 4434
SYS_CLONE3 = 4435 SYS_CLONE3 = 4435
SYS_CLOSE_RANGE = 4436
SYS_OPENAT2 = 4437 SYS_OPENAT2 = 4437
SYS_PIDFD_GETFD = 4438 SYS_PIDFD_GETFD = 4438
SYS_FACCESSAT2 = 4439 SYS_FACCESSAT2 = 4439

View File

@ -346,6 +346,7 @@ const (
SYS_FSPICK = 5433 SYS_FSPICK = 5433
SYS_PIDFD_OPEN = 5434 SYS_PIDFD_OPEN = 5434
SYS_CLONE3 = 5435 SYS_CLONE3 = 5435
SYS_CLOSE_RANGE = 5436
SYS_OPENAT2 = 5437 SYS_OPENAT2 = 5437
SYS_PIDFD_GETFD = 5438 SYS_PIDFD_GETFD = 5438
SYS_FACCESSAT2 = 5439 SYS_FACCESSAT2 = 5439

View File

@ -346,6 +346,7 @@ const (
SYS_FSPICK = 5433 SYS_FSPICK = 5433
SYS_PIDFD_OPEN = 5434 SYS_PIDFD_OPEN = 5434
SYS_CLONE3 = 5435 SYS_CLONE3 = 5435
SYS_CLOSE_RANGE = 5436
SYS_OPENAT2 = 5437 SYS_OPENAT2 = 5437
SYS_PIDFD_GETFD = 5438 SYS_PIDFD_GETFD = 5438
SYS_FACCESSAT2 = 5439 SYS_FACCESSAT2 = 5439

View File

@ -416,6 +416,7 @@ const (
SYS_FSPICK = 4433 SYS_FSPICK = 4433
SYS_PIDFD_OPEN = 4434 SYS_PIDFD_OPEN = 4434
SYS_CLONE3 = 4435 SYS_CLONE3 = 4435
SYS_CLOSE_RANGE = 4436
SYS_OPENAT2 = 4437 SYS_OPENAT2 = 4437
SYS_PIDFD_GETFD = 4438 SYS_PIDFD_GETFD = 4438
SYS_FACCESSAT2 = 4439 SYS_FACCESSAT2 = 4439

View File

@ -395,6 +395,7 @@ const (
SYS_FSPICK = 433 SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434 SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435 SYS_CLONE3 = 435
SYS_CLOSE_RANGE = 436
SYS_OPENAT2 = 437 SYS_OPENAT2 = 437
SYS_PIDFD_GETFD = 438 SYS_PIDFD_GETFD = 438
SYS_FACCESSAT2 = 439 SYS_FACCESSAT2 = 439

View File

@ -395,6 +395,7 @@ const (
SYS_FSPICK = 433 SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434 SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435 SYS_CLONE3 = 435
SYS_CLOSE_RANGE = 436
SYS_OPENAT2 = 437 SYS_OPENAT2 = 437
SYS_PIDFD_GETFD = 438 SYS_PIDFD_GETFD = 438
SYS_FACCESSAT2 = 439 SYS_FACCESSAT2 = 439

View File

@ -297,6 +297,7 @@ const (
SYS_FSPICK = 433 SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434 SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435 SYS_CLONE3 = 435
SYS_CLOSE_RANGE = 436
SYS_OPENAT2 = 437 SYS_OPENAT2 = 437
SYS_PIDFD_GETFD = 438 SYS_PIDFD_GETFD = 438
SYS_FACCESSAT2 = 439 SYS_FACCESSAT2 = 439

View File

@ -360,6 +360,7 @@ const (
SYS_FSPICK = 433 SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434 SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435 SYS_CLONE3 = 435
SYS_CLOSE_RANGE = 436
SYS_OPENAT2 = 437 SYS_OPENAT2 = 437
SYS_PIDFD_GETFD = 438 SYS_PIDFD_GETFD = 438
SYS_FACCESSAT2 = 439 SYS_FACCESSAT2 = 439

View File

@ -374,6 +374,7 @@ const (
SYS_FSMOUNT = 432 SYS_FSMOUNT = 432
SYS_FSPICK = 433 SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434 SYS_PIDFD_OPEN = 434
SYS_CLOSE_RANGE = 436
SYS_OPENAT2 = 437 SYS_OPENAT2 = 437
SYS_PIDFD_GETFD = 438 SYS_PIDFD_GETFD = 438
SYS_FACCESSAT2 = 439 SYS_FACCESSAT2 = 439

View File

@ -92,9 +92,9 @@ type Statfs_t struct {
Type uint32 Type uint32
Flags uint32 Flags uint32
Fssubtype uint32 Fssubtype uint32
Fstypename [16]int8 Fstypename [16]byte
Mntonname [1024]int8 Mntonname [1024]byte
Mntfromname [1024]int8 Mntfromname [1024]byte
Reserved [8]uint32 Reserved [8]uint32
} }
@ -145,6 +145,10 @@ type Dirent struct {
_ [3]byte _ [3]byte
} }
const (
PathMax = 0x400
)
type RawSockaddrInet4 struct { type RawSockaddrInet4 struct {
Len uint8 Len uint8
Family uint8 Family uint8
@ -301,7 +305,6 @@ type IfMsghdr struct {
Addrs int32 Addrs int32
Flags int32 Flags int32
Index uint16 Index uint16
_ [2]byte
Data IfData Data IfData
} }
@ -344,7 +347,6 @@ type IfaMsghdr struct {
Addrs int32 Addrs int32
Flags int32 Flags int32
Index uint16 Index uint16
_ [2]byte
Metric int32 Metric int32
} }
@ -365,7 +367,6 @@ type IfmaMsghdr2 struct {
Addrs int32 Addrs int32
Flags int32 Flags int32
Index uint16 Index uint16
_ [2]byte
Refcount int32 Refcount int32
} }
@ -374,7 +375,6 @@ type RtMsghdr struct {
Version uint8 Version uint8
Type uint8 Type uint8
Index uint16 Index uint16
_ [2]byte
Flags int32 Flags int32
Addrs int32 Addrs int32
Pid int32 Pid int32
@ -396,7 +396,8 @@ type RtMetrics struct {
Rtt uint32 Rtt uint32
Rttvar uint32 Rttvar uint32
Pksent uint32 Pksent uint32
Filler [4]uint32 State uint32
Filler [3]uint32
} }
const ( const (

View File

@ -70,7 +70,6 @@ type Stat_t struct {
Uid uint32 Uid uint32
Gid uint32 Gid uint32
Rdev int32 Rdev int32
_ [4]byte
Atim Timespec Atim Timespec
Mtim Timespec Mtim Timespec
Ctim Timespec Ctim Timespec
@ -97,10 +96,11 @@ type Statfs_t struct {
Type uint32 Type uint32
Flags uint32 Flags uint32
Fssubtype uint32 Fssubtype uint32
Fstypename [16]int8 Fstypename [16]byte
Mntonname [1024]int8 Mntonname [1024]byte
Mntfromname [1024]int8 Mntfromname [1024]byte
Reserved [8]uint32 Flags_ext uint32
Reserved [7]uint32
} }
type Flock_t struct { type Flock_t struct {
@ -133,8 +133,7 @@ type Fbootstraptransfer_t struct {
type Log2phys_t struct { type Log2phys_t struct {
Flags uint32 Flags uint32
_ [8]byte _ [16]byte
_ [8]byte
} }
type Fsid struct { type Fsid struct {
@ -151,6 +150,10 @@ type Dirent struct {
_ [3]byte _ [3]byte
} }
const (
PathMax = 0x400
)
type RawSockaddrInet4 struct { type RawSockaddrInet4 struct {
Len uint8 Len uint8
Family uint8 Family uint8
@ -221,10 +224,8 @@ type IPv6Mreq struct {
type Msghdr struct { type Msghdr struct {
Name *byte Name *byte
Namelen uint32 Namelen uint32
_ [4]byte
Iov *Iovec Iov *Iovec
Iovlen int32 Iovlen int32
_ [4]byte
Control *byte Control *byte
Controllen uint32 Controllen uint32
Flags int32 Flags int32
@ -309,7 +310,6 @@ type IfMsghdr struct {
Addrs int32 Addrs int32
Flags int32 Flags int32
Index uint16 Index uint16
_ [2]byte
Data IfData Data IfData
} }
@ -352,7 +352,6 @@ type IfaMsghdr struct {
Addrs int32 Addrs int32
Flags int32 Flags int32
Index uint16 Index uint16
_ [2]byte
Metric int32 Metric int32
} }
@ -373,7 +372,6 @@ type IfmaMsghdr2 struct {
Addrs int32 Addrs int32
Flags int32 Flags int32
Index uint16 Index uint16
_ [2]byte
Refcount int32 Refcount int32
} }
@ -382,7 +380,6 @@ type RtMsghdr struct {
Version uint8 Version uint8
Type uint8 Type uint8
Index uint16 Index uint16
_ [2]byte
Flags int32 Flags int32
Addrs int32 Addrs int32
Pid int32 Pid int32
@ -404,7 +401,8 @@ type RtMetrics struct {
Rtt uint32 Rtt uint32
Rttvar uint32 Rttvar uint32
Pksent uint32 Pksent uint32
Filler [4]uint32 State uint32
Filler [3]uint32
} }
const ( const (
@ -427,7 +425,6 @@ type BpfStat struct {
type BpfProgram struct { type BpfProgram struct {
Len uint32 Len uint32
_ [4]byte
Insns *BpfInsn Insns *BpfInsn
} }
@ -452,7 +449,6 @@ type Termios struct {
Cflag uint64 Cflag uint64
Lflag uint64 Lflag uint64
Cc [20]uint8 Cc [20]uint8
_ [4]byte
Ispeed uint64 Ispeed uint64
Ospeed uint64 Ospeed uint64
} }

View File

@ -1,6 +1,5 @@
// NOTE: cgo can't generate struct Stat_t and struct Statfs_t yet // cgo -godefs types_darwin.go | go run mkpost.go
// Created by cgo -godefs - DO NOT EDIT // Code generated by the command above; see README.md. DO NOT EDIT.
// cgo -godefs types_darwin.go
// +build arm,darwin // +build arm,darwin
@ -31,7 +30,7 @@ type Timeval struct {
Usec int32 Usec int32
} }
type Timeval32 [0]byte type Timeval32 struct{}
type Rusage struct { type Rusage struct {
Utime Timeval Utime Timeval
@ -93,9 +92,9 @@ type Statfs_t struct {
Type uint32 Type uint32
Flags uint32 Flags uint32
Fssubtype uint32 Fssubtype uint32
Fstypename [16]int8 Fstypename [16]byte
Mntonname [1024]int8 Mntonname [1024]byte
Mntfromname [1024]int8 Mntfromname [1024]byte
Reserved [8]uint32 Reserved [8]uint32
} }
@ -146,6 +145,10 @@ type Dirent struct {
_ [3]byte _ [3]byte
} }
const (
PathMax = 0x400
)
type RawSockaddrInet4 struct { type RawSockaddrInet4 struct {
Len uint8 Len uint8
Family uint8 Family uint8
@ -302,7 +305,6 @@ type IfMsghdr struct {
Addrs int32 Addrs int32
Flags int32 Flags int32
Index uint16 Index uint16
_ [2]byte
Data IfData Data IfData
} }
@ -345,7 +347,6 @@ type IfaMsghdr struct {
Addrs int32 Addrs int32
Flags int32 Flags int32
Index uint16 Index uint16
_ [2]byte
Metric int32 Metric int32
} }
@ -366,7 +367,6 @@ type IfmaMsghdr2 struct {
Addrs int32 Addrs int32
Flags int32 Flags int32
Index uint16 Index uint16
_ [2]byte
Refcount int32 Refcount int32
} }
@ -375,7 +375,6 @@ type RtMsghdr struct {
Version uint8 Version uint8
Type uint8 Type uint8
Index uint16 Index uint16
_ [2]byte
Flags int32 Flags int32
Addrs int32 Addrs int32
Pid int32 Pid int32
@ -397,7 +396,8 @@ type RtMetrics struct {
Rtt uint32 Rtt uint32
Rttvar uint32 Rttvar uint32
Pksent uint32 Pksent uint32
Filler [4]uint32 State uint32
Filler [3]uint32
} }
const ( const (

View File

@ -70,7 +70,6 @@ type Stat_t struct {
Uid uint32 Uid uint32
Gid uint32 Gid uint32
Rdev int32 Rdev int32
_ [4]byte
Atim Timespec Atim Timespec
Mtim Timespec Mtim Timespec
Ctim Timespec Ctim Timespec
@ -97,10 +96,11 @@ type Statfs_t struct {
Type uint32 Type uint32
Flags uint32 Flags uint32
Fssubtype uint32 Fssubtype uint32
Fstypename [16]int8 Fstypename [16]byte
Mntonname [1024]int8 Mntonname [1024]byte
Mntfromname [1024]int8 Mntfromname [1024]byte
Reserved [8]uint32 Flags_ext uint32
Reserved [7]uint32
} }
type Flock_t struct { type Flock_t struct {
@ -133,8 +133,7 @@ type Fbootstraptransfer_t struct {
type Log2phys_t struct { type Log2phys_t struct {
Flags uint32 Flags uint32
_ [8]byte _ [16]byte
_ [8]byte
} }
type Fsid struct { type Fsid struct {
@ -151,6 +150,10 @@ type Dirent struct {
_ [3]byte _ [3]byte
} }
const (
PathMax = 0x400
)
type RawSockaddrInet4 struct { type RawSockaddrInet4 struct {
Len uint8 Len uint8
Family uint8 Family uint8
@ -221,10 +224,8 @@ type IPv6Mreq struct {
type Msghdr struct { type Msghdr struct {
Name *byte Name *byte
Namelen uint32 Namelen uint32
_ [4]byte
Iov *Iovec Iov *Iovec
Iovlen int32 Iovlen int32
_ [4]byte
Control *byte Control *byte
Controllen uint32 Controllen uint32
Flags int32 Flags int32
@ -309,7 +310,6 @@ type IfMsghdr struct {
Addrs int32 Addrs int32
Flags int32 Flags int32
Index uint16 Index uint16
_ [2]byte
Data IfData Data IfData
} }
@ -352,7 +352,6 @@ type IfaMsghdr struct {
Addrs int32 Addrs int32
Flags int32 Flags int32
Index uint16 Index uint16
_ [2]byte
Metric int32 Metric int32
} }
@ -373,7 +372,6 @@ type IfmaMsghdr2 struct {
Addrs int32 Addrs int32
Flags int32 Flags int32
Index uint16 Index uint16
_ [2]byte
Refcount int32 Refcount int32
} }
@ -382,7 +380,6 @@ type RtMsghdr struct {
Version uint8 Version uint8
Type uint8 Type uint8
Index uint16 Index uint16
_ [2]byte
Flags int32 Flags int32
Addrs int32 Addrs int32
Pid int32 Pid int32
@ -404,7 +401,8 @@ type RtMetrics struct {
Rtt uint32 Rtt uint32
Rttvar uint32 Rttvar uint32
Pksent uint32 Pksent uint32
Filler [4]uint32 State uint32
Filler [3]uint32
} }
const ( const (
@ -427,7 +425,6 @@ type BpfStat struct {
type BpfProgram struct { type BpfProgram struct {
Len uint32 Len uint32
_ [4]byte
Insns *BpfInsn Insns *BpfInsn
} }
@ -452,7 +449,6 @@ type Termios struct {
Cflag uint64 Cflag uint64
Lflag uint64 Lflag uint64
Cc [20]uint8 Cc [20]uint8
_ [4]byte
Ispeed uint64 Ispeed uint64
Ospeed uint64 Ospeed uint64
} }

View File

@ -70,11 +70,11 @@ type Stat_t struct {
Ctim Timespec Ctim Timespec
Size int64 Size int64
Blocks int64 Blocks int64
Blksize uint32 _ uint32
Flags uint32 Flags uint32
Gen uint32 Gen uint32
Lspare int32 Lspare int32
Qspare1 int64 Blksize int64
Qspare2 int64 Qspare2 int64
} }
@ -91,17 +91,15 @@ type Statfs_t struct {
Owner uint32 Owner uint32
Type int32 Type int32
Flags int32 Flags int32
_ [4]byte
Syncwrites int64 Syncwrites int64
Asyncwrites int64 Asyncwrites int64
Fstypename [16]int8 Fstypename [16]byte
Mntonname [80]int8 Mntonname [80]byte
Syncreads int64 Syncreads int64
Asyncreads int64 Asyncreads int64
Spares1 int16 Spares1 int16
Mntfromname [80]int8 Mntfromname [80]byte
Spares2 int16 Spares2 int16
_ [4]byte
Spare [2]int64 Spare [2]int64
} }
@ -202,10 +200,8 @@ type IPv6Mreq struct {
type Msghdr struct { type Msghdr struct {
Name *byte Name *byte
Namelen uint32 Namelen uint32
_ [4]byte
Iov *Iovec Iov *Iovec
Iovlen int32 Iovlen int32
_ [4]byte
Control *byte Control *byte
Controllen uint32 Controllen uint32
Flags int32 Flags int32
@ -269,7 +265,7 @@ type FdSet struct {
const ( const (
SizeofIfMsghdr = 0xb0 SizeofIfMsghdr = 0xb0
SizeofIfData = 0xa0 SizeofIfData = 0xa0
SizeofIfaMsghdr = 0x14 SizeofIfaMsghdr = 0x18
SizeofIfmaMsghdr = 0x10 SizeofIfmaMsghdr = 0x10
SizeofIfAnnounceMsghdr = 0x18 SizeofIfAnnounceMsghdr = 0x18
SizeofRtMsghdr = 0x98 SizeofRtMsghdr = 0x98
@ -280,10 +276,9 @@ type IfMsghdr struct {
Msglen uint16 Msglen uint16
Version uint8 Version uint8
Type uint8 Type uint8
Addrs int32
Flags int32
Index uint16 Index uint16
_ [2]byte Flags int32
Addrs int32
Data IfData Data IfData
} }
@ -294,7 +289,6 @@ type IfData struct {
Hdrlen uint8 Hdrlen uint8
Recvquota uint8 Recvquota uint8
Xmitquota uint8 Xmitquota uint8
_ [2]byte
Mtu uint64 Mtu uint64
Metric uint64 Metric uint64
Link_state uint64 Link_state uint64
@ -316,24 +310,23 @@ type IfData struct {
} }
type IfaMsghdr struct { type IfaMsghdr struct {
Msglen uint16 Msglen uint16
Version uint8 Version uint8
Type uint8 Type uint8
Addrs int32 Index uint16
Flags int32 Flags int32
Index uint16 Addrs int32
_ [2]byte Addrflags int32
Metric int32 Metric int32
} }
type IfmaMsghdr struct { type IfmaMsghdr struct {
Msglen uint16 Msglen uint16
Version uint8 Version uint8
Type uint8 Type uint8
Addrs int32
Flags int32
Index uint16 Index uint16
_ [2]byte Flags int32
Addrs int32
} }
type IfAnnounceMsghdr struct { type IfAnnounceMsghdr struct {
@ -350,7 +343,6 @@ type RtMsghdr struct {
Version uint8 Version uint8
Type uint8 Type uint8
Index uint16 Index uint16
_ [2]byte
Flags int32 Flags int32
Addrs int32 Addrs int32
Pid int32 Pid int32
@ -374,7 +366,6 @@ type RtMetrics struct {
Hopcount uint64 Hopcount uint64
Mssopt uint16 Mssopt uint16
Pad uint16 Pad uint16
_ [4]byte
Msl uint64 Msl uint64
Iwmaxsegs uint64 Iwmaxsegs uint64
Iwcapsegs uint64 Iwcapsegs uint64
@ -400,7 +391,6 @@ type BpfStat struct {
type BpfProgram struct { type BpfProgram struct {
Len uint32 Len uint32
_ [4]byte
Insns *BpfInsn Insns *BpfInsn
} }

View File

@ -76,6 +76,21 @@ type Fsid struct {
Val [2]int32 Val [2]int32
} }
type FileCloneRange struct {
Src_fd int64
Src_offset uint64
Src_length uint64
Dest_offset uint64
}
type FileDedupeRange struct {
Src_offset uint64
Src_length uint64
Dest_count uint16
Reserved1 uint16
Reserved2 uint32
}
type FscryptPolicy struct { type FscryptPolicy struct {
Version uint8 Version uint8
Contents_encryption_mode uint8 Contents_encryption_mode uint8
@ -539,7 +554,11 @@ const (
IFLA_NEW_IFINDEX = 0x31 IFLA_NEW_IFINDEX = 0x31
IFLA_MIN_MTU = 0x32 IFLA_MIN_MTU = 0x32
IFLA_MAX_MTU = 0x33 IFLA_MAX_MTU = 0x33
IFLA_MAX = 0x36 IFLA_PROP_LIST = 0x34
IFLA_ALT_IFNAME = 0x35
IFLA_PERM_ADDRESS = 0x36
IFLA_PROTO_DOWN_REASON = 0x37
IFLA_MAX = 0x37
IFLA_INFO_KIND = 0x1 IFLA_INFO_KIND = 0x1
IFLA_INFO_DATA = 0x2 IFLA_INFO_DATA = 0x2
IFLA_INFO_XSTATS = 0x3 IFLA_INFO_XSTATS = 0x3
@ -808,8 +827,6 @@ type SignalfdSiginfo struct {
_ [28]uint8 _ [28]uint8
} }
const PERF_IOC_FLAG_GROUP = 0x1
type Winsize struct { type Winsize struct {
Row uint16 Row uint16
Col uint16 Col uint16
@ -933,7 +950,10 @@ type PerfEventMmapPage struct {
Time_offset uint64 Time_offset uint64
Time_zero uint64 Time_zero uint64
Size uint32 Size uint32
_ [948]uint8 _ uint32
Time_cycles uint64
Time_mask uint64
_ [928]uint8
Data_head uint64 Data_head uint64
Data_tail uint64 Data_tail uint64
Data_offset uint64 Data_offset uint64
@ -975,13 +995,13 @@ const (
) )
const ( const (
PERF_TYPE_HARDWARE = 0x0 PERF_TYPE_HARDWARE = 0x0
PERF_TYPE_SOFTWARE = 0x1 PERF_TYPE_SOFTWARE = 0x1
PERF_TYPE_TRACEPOINT = 0x2 PERF_TYPE_TRACEPOINT = 0x2
PERF_TYPE_HW_CACHE = 0x3 PERF_TYPE_HW_CACHE = 0x3
PERF_TYPE_RAW = 0x4 PERF_TYPE_RAW = 0x4
PERF_TYPE_BREAKPOINT = 0x5 PERF_TYPE_BREAKPOINT = 0x5
PERF_TYPE_MAX = 0x6
PERF_COUNT_HW_CPU_CYCLES = 0x0 PERF_COUNT_HW_CPU_CYCLES = 0x0
PERF_COUNT_HW_INSTRUCTIONS = 0x1 PERF_COUNT_HW_INSTRUCTIONS = 0x1
PERF_COUNT_HW_CACHE_REFERENCES = 0x2 PERF_COUNT_HW_CACHE_REFERENCES = 0x2
@ -992,106 +1012,163 @@ const (
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
PERF_COUNT_HW_MAX = 0xa
PERF_COUNT_HW_CACHE_L1D = 0x0 PERF_COUNT_HW_CACHE_L1D = 0x0
PERF_COUNT_HW_CACHE_L1I = 0x1 PERF_COUNT_HW_CACHE_L1I = 0x1
PERF_COUNT_HW_CACHE_LL = 0x2 PERF_COUNT_HW_CACHE_LL = 0x2
PERF_COUNT_HW_CACHE_DTLB = 0x3 PERF_COUNT_HW_CACHE_DTLB = 0x3
PERF_COUNT_HW_CACHE_ITLB = 0x4 PERF_COUNT_HW_CACHE_ITLB = 0x4
PERF_COUNT_HW_CACHE_BPU = 0x5 PERF_COUNT_HW_CACHE_BPU = 0x5
PERF_COUNT_HW_CACHE_NODE = 0x6 PERF_COUNT_HW_CACHE_NODE = 0x6
PERF_COUNT_HW_CACHE_MAX = 0x7
PERF_COUNT_HW_CACHE_OP_READ = 0x0 PERF_COUNT_HW_CACHE_OP_READ = 0x0
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
PERF_COUNT_HW_CACHE_OP_MAX = 0x3
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
PERF_COUNT_HW_CACHE_RESULT_MAX = 0x2
PERF_COUNT_SW_CPU_CLOCK = 0x0 PERF_COUNT_SW_CPU_CLOCK = 0x0
PERF_COUNT_SW_TASK_CLOCK = 0x1 PERF_COUNT_SW_TASK_CLOCK = 0x1
PERF_COUNT_SW_PAGE_FAULTS = 0x2 PERF_COUNT_SW_PAGE_FAULTS = 0x2
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9 PERF_COUNT_SW_DUMMY = 0x9
PERF_COUNT_SW_BPF_OUTPUT = 0xa PERF_COUNT_SW_BPF_OUTPUT = 0xa
PERF_COUNT_SW_MAX = 0xb
PERF_SAMPLE_IP = 0x1 PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2 PERF_SAMPLE_TID = 0x2
PERF_SAMPLE_TIME = 0x4 PERF_SAMPLE_TIME = 0x4
PERF_SAMPLE_ADDR = 0x8 PERF_SAMPLE_ADDR = 0x8
PERF_SAMPLE_READ = 0x10 PERF_SAMPLE_READ = 0x10
PERF_SAMPLE_CALLCHAIN = 0x20 PERF_SAMPLE_CALLCHAIN = 0x20
PERF_SAMPLE_ID = 0x40 PERF_SAMPLE_ID = 0x40
PERF_SAMPLE_CPU = 0x80 PERF_SAMPLE_CPU = 0x80
PERF_SAMPLE_PERIOD = 0x100 PERF_SAMPLE_PERIOD = 0x100
PERF_SAMPLE_STREAM_ID = 0x200 PERF_SAMPLE_STREAM_ID = 0x200
PERF_SAMPLE_RAW = 0x400 PERF_SAMPLE_RAW = 0x400
PERF_SAMPLE_BRANCH_STACK = 0x800 PERF_SAMPLE_BRANCH_STACK = 0x800
PERF_SAMPLE_REGS_USER = 0x1000 PERF_SAMPLE_REGS_USER = 0x1000
PERF_SAMPLE_STACK_USER = 0x2000 PERF_SAMPLE_STACK_USER = 0x2000
PERF_SAMPLE_WEIGHT = 0x4000 PERF_SAMPLE_WEIGHT = 0x4000
PERF_SAMPLE_DATA_SRC = 0x8000 PERF_SAMPLE_DATA_SRC = 0x8000
PERF_SAMPLE_IDENTIFIER = 0x10000 PERF_SAMPLE_IDENTIFIER = 0x10000
PERF_SAMPLE_TRANSACTION = 0x20000 PERF_SAMPLE_TRANSACTION = 0x20000
PERF_SAMPLE_REGS_INTR = 0x40000 PERF_SAMPLE_REGS_INTR = 0x40000
PERF_SAMPLE_PHYS_ADDR = 0x80000
PERF_SAMPLE_BRANCH_USER = 0x1 PERF_SAMPLE_AUX = 0x100000
PERF_SAMPLE_BRANCH_KERNEL = 0x2 PERF_SAMPLE_CGROUP = 0x200000
PERF_SAMPLE_BRANCH_HV = 0x4 PERF_SAMPLE_MAX = 0x400000
PERF_SAMPLE_BRANCH_ANY = 0x8 PERF_SAMPLE_BRANCH_USER_SHIFT = 0x0
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 PERF_SAMPLE_BRANCH_KERNEL_SHIFT = 0x1
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 PERF_SAMPLE_BRANCH_HV_SHIFT = 0x2
PERF_SAMPLE_BRANCH_IND_CALL = 0x40 PERF_SAMPLE_BRANCH_ANY_SHIFT = 0x3
PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT = 0x4
PERF_SAMPLE_BRANCH_IN_TX = 0x100 PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT = 0x5
PERF_SAMPLE_BRANCH_NO_TX = 0x200 PERF_SAMPLE_BRANCH_IND_CALL_SHIFT = 0x6
PERF_SAMPLE_BRANCH_COND = 0x400 PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT = 0x7
PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 PERF_SAMPLE_BRANCH_IN_TX_SHIFT = 0x8
PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 PERF_SAMPLE_BRANCH_NO_TX_SHIFT = 0x9
PERF_SAMPLE_BRANCH_CALL = 0x2000 PERF_SAMPLE_BRANCH_COND_SHIFT = 0xa
PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT = 0xb
PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT = 0xc
PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 PERF_SAMPLE_BRANCH_CALL_SHIFT = 0xd
PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT = 0xe
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT = 0xf
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT = 0x10
PERF_FORMAT_ID = 0x4 PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT = 0x11
PERF_FORMAT_GROUP = 0x8 PERF_SAMPLE_BRANCH_MAX_SHIFT = 0x12
PERF_SAMPLE_BRANCH_USER = 0x1
PERF_RECORD_MMAP = 0x1 PERF_SAMPLE_BRANCH_KERNEL = 0x2
PERF_RECORD_LOST = 0x2 PERF_SAMPLE_BRANCH_HV = 0x4
PERF_RECORD_COMM = 0x3 PERF_SAMPLE_BRANCH_ANY = 0x8
PERF_RECORD_EXIT = 0x4 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_RECORD_THROTTLE = 0x5 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_RECORD_UNTHROTTLE = 0x6 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_RECORD_FORK = 0x7 PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
PERF_RECORD_READ = 0x8 PERF_SAMPLE_BRANCH_IN_TX = 0x100
PERF_RECORD_SAMPLE = 0x9 PERF_SAMPLE_BRANCH_NO_TX = 0x200
PERF_RECORD_MMAP2 = 0xa PERF_SAMPLE_BRANCH_COND = 0x400
PERF_RECORD_AUX = 0xb PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
PERF_RECORD_ITRACE_START = 0xc PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
PERF_RECORD_LOST_SAMPLES = 0xd PERF_SAMPLE_BRANCH_CALL = 0x2000
PERF_RECORD_SWITCH = 0xe PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
PERF_RECORD_SWITCH_CPU_WIDE = 0xf PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
PERF_RECORD_NAMESPACES = 0x10 PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
PERF_SAMPLE_BRANCH_HW_INDEX = 0x20000
PERF_CONTEXT_HV = -0x20 PERF_SAMPLE_BRANCH_MAX = 0x40000
PERF_CONTEXT_KERNEL = -0x80 PERF_BR_UNKNOWN = 0x0
PERF_CONTEXT_USER = -0x200 PERF_BR_COND = 0x1
PERF_BR_UNCOND = 0x2
PERF_CONTEXT_GUEST = -0x800 PERF_BR_IND = 0x3
PERF_CONTEXT_GUEST_KERNEL = -0x880 PERF_BR_CALL = 0x4
PERF_CONTEXT_GUEST_USER = -0xa00 PERF_BR_IND_CALL = 0x5
PERF_BR_RET = 0x6
PERF_FLAG_FD_NO_GROUP = 0x1 PERF_BR_SYSCALL = 0x7
PERF_FLAG_FD_OUTPUT = 0x2 PERF_BR_SYSRET = 0x8
PERF_FLAG_PID_CGROUP = 0x4 PERF_BR_COND_CALL = 0x9
PERF_FLAG_FD_CLOEXEC = 0x8 PERF_BR_COND_RET = 0xa
PERF_BR_MAX = 0xb
PERF_SAMPLE_REGS_ABI_NONE = 0x0
PERF_SAMPLE_REGS_ABI_32 = 0x1
PERF_SAMPLE_REGS_ABI_64 = 0x2
PERF_TXN_ELISION = 0x1
PERF_TXN_TRANSACTION = 0x2
PERF_TXN_SYNC = 0x4
PERF_TXN_ASYNC = 0x8
PERF_TXN_RETRY = 0x10
PERF_TXN_CONFLICT = 0x20
PERF_TXN_CAPACITY_WRITE = 0x40
PERF_TXN_CAPACITY_READ = 0x80
PERF_TXN_MAX = 0x100
PERF_TXN_ABORT_MASK = -0x100000000
PERF_TXN_ABORT_SHIFT = 0x20
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8
PERF_FORMAT_MAX = 0x10
PERF_IOC_FLAG_GROUP = 0x1
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_RECORD_MMAP2 = 0xa
PERF_RECORD_AUX = 0xb
PERF_RECORD_ITRACE_START = 0xc
PERF_RECORD_LOST_SAMPLES = 0xd
PERF_RECORD_SWITCH = 0xe
PERF_RECORD_SWITCH_CPU_WIDE = 0xf
PERF_RECORD_NAMESPACES = 0x10
PERF_RECORD_KSYMBOL = 0x11
PERF_RECORD_BPF_EVENT = 0x12
PERF_RECORD_CGROUP = 0x13
PERF_RECORD_TEXT_POKE = 0x14
PERF_RECORD_MAX = 0x15
PERF_RECORD_KSYMBOL_TYPE_UNKNOWN = 0x0
PERF_RECORD_KSYMBOL_TYPE_BPF = 0x1
PERF_RECORD_KSYMBOL_TYPE_OOL = 0x2
PERF_RECORD_KSYMBOL_TYPE_MAX = 0x3
PERF_BPF_EVENT_UNKNOWN = 0x0
PERF_BPF_EVENT_PROG_LOAD = 0x1
PERF_BPF_EVENT_PROG_UNLOAD = 0x2
PERF_BPF_EVENT_MAX = 0x3
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_CONTEXT_MAX = -0xfff
) )
type TCPMD5Sig struct { type TCPMD5Sig struct {
@ -1397,7 +1474,7 @@ const (
NFT_MSG_DELOBJ = 0x14 NFT_MSG_DELOBJ = 0x14
NFT_MSG_GETOBJ_RESET = 0x15 NFT_MSG_GETOBJ_RESET = 0x15
NFT_MSG_MAX = 0x19 NFT_MSG_MAX = 0x19
NFTA_LIST_UNPEC = 0x0 NFTA_LIST_UNSPEC = 0x0
NFTA_LIST_ELEM = 0x1 NFTA_LIST_ELEM = 0x1
NFTA_HOOK_UNSPEC = 0x0 NFTA_HOOK_UNSPEC = 0x0
NFTA_HOOK_HOOKNUM = 0x1 NFTA_HOOK_HOOKNUM = 0x1
@ -1836,9 +1913,12 @@ type XDPMmapOffsets struct {
} }
type XDPStatistics struct { type XDPStatistics struct {
Rx_dropped uint64 Rx_dropped uint64
Rx_invalid_descs uint64 Rx_invalid_descs uint64
Tx_invalid_descs uint64 Tx_invalid_descs uint64
Rx_ring_full uint64
Rx_fill_ring_empty_descs uint64
Tx_ring_empty_descs uint64
} }
type XDPDesc struct { type XDPDesc struct {
@ -2485,7 +2565,7 @@ const (
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
DEVLINK_ATTR_PAD = 0x3d DEVLINK_ATTR_PAD = 0x3d
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
DEVLINK_ATTR_MAX = 0x90 DEVLINK_ATTR_MAX = 0x94
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0 DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
@ -2552,3 +2632,9 @@ const (
CAN_RAW_FD_FRAMES = 0x5 CAN_RAW_FD_FRAMES = 0x5
CAN_RAW_JOIN_FILTERS = 0x6 CAN_RAW_JOIN_FILTERS = 0x6
) )
type WatchdogInfo struct {
Options uint32
Version uint32
Identity [32]uint8
}

View File

@ -26,7 +26,7 @@ var (
func errnoErr(e syscall.Errno) error { func errnoErr(e syscall.Errno) error {
switch e { switch e {
case 0: case 0:
return nil return syscall.EINVAL
case errnoERROR_IO_PENDING: case errnoERROR_IO_PENDING:
return errERROR_IO_PENDING return errERROR_IO_PENDING
} }
@ -40,16 +40,24 @@ var (
modadvapi32 = windows.NewLazySystemDLL("advapi32.dll") modadvapi32 = windows.NewLazySystemDLL("advapi32.dll")
modkernel32 = windows.NewLazySystemDLL("kernel32.dll") modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
procRegConnectRegistryW = modadvapi32.NewProc("RegConnectRegistryW")
procRegCreateKeyExW = modadvapi32.NewProc("RegCreateKeyExW") procRegCreateKeyExW = modadvapi32.NewProc("RegCreateKeyExW")
procRegDeleteKeyW = modadvapi32.NewProc("RegDeleteKeyW") procRegDeleteKeyW = modadvapi32.NewProc("RegDeleteKeyW")
procRegSetValueExW = modadvapi32.NewProc("RegSetValueExW")
procRegEnumValueW = modadvapi32.NewProc("RegEnumValueW")
procRegDeleteValueW = modadvapi32.NewProc("RegDeleteValueW") procRegDeleteValueW = modadvapi32.NewProc("RegDeleteValueW")
procRegEnumValueW = modadvapi32.NewProc("RegEnumValueW")
procRegLoadMUIStringW = modadvapi32.NewProc("RegLoadMUIStringW") procRegLoadMUIStringW = modadvapi32.NewProc("RegLoadMUIStringW")
procRegConnectRegistryW = modadvapi32.NewProc("RegConnectRegistryW") procRegSetValueExW = modadvapi32.NewProc("RegSetValueExW")
procExpandEnvironmentStringsW = modkernel32.NewProc("ExpandEnvironmentStringsW") procExpandEnvironmentStringsW = modkernel32.NewProc("ExpandEnvironmentStringsW")
) )
func regConnectRegistry(machinename *uint16, key syscall.Handle, result *syscall.Handle) (regerrno error) {
r0, _, _ := syscall.Syscall(procRegConnectRegistryW.Addr(), 3, uintptr(unsafe.Pointer(machinename)), uintptr(key), uintptr(unsafe.Pointer(result)))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
return
}
func regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, options uint32, desired uint32, sa *syscall.SecurityAttributes, result *syscall.Handle, disposition *uint32) (regerrno error) { func regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, options uint32, desired uint32, sa *syscall.SecurityAttributes, result *syscall.Handle, disposition *uint32) (regerrno error) {
r0, _, _ := syscall.Syscall9(procRegCreateKeyExW.Addr(), 9, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(reserved), uintptr(unsafe.Pointer(class)), uintptr(options), uintptr(desired), uintptr(unsafe.Pointer(sa)), uintptr(unsafe.Pointer(result)), uintptr(unsafe.Pointer(disposition))) r0, _, _ := syscall.Syscall9(procRegCreateKeyExW.Addr(), 9, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(reserved), uintptr(unsafe.Pointer(class)), uintptr(options), uintptr(desired), uintptr(unsafe.Pointer(sa)), uintptr(unsafe.Pointer(result)), uintptr(unsafe.Pointer(disposition)))
if r0 != 0 { if r0 != 0 {
@ -66,8 +74,8 @@ func regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) {
return return
} }
func regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) { func regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) {
r0, _, _ := syscall.Syscall6(procRegSetValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(valueName)), uintptr(reserved), uintptr(vtype), uintptr(unsafe.Pointer(buf)), uintptr(bufsize)) r0, _, _ := syscall.Syscall(procRegDeleteValueW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(name)), 0)
if r0 != 0 { if r0 != 0 {
regerrno = syscall.Errno(r0) regerrno = syscall.Errno(r0)
} }
@ -82,14 +90,6 @@ func regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint3
return return
} }
func regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) {
r0, _, _ := syscall.Syscall(procRegDeleteValueW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(name)), 0)
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
return
}
func regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint32, buflenCopied *uint32, flags uint32, dir *uint16) (regerrno error) { func regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint32, buflenCopied *uint32, flags uint32, dir *uint16) (regerrno error) {
r0, _, _ := syscall.Syscall9(procRegLoadMUIStringW.Addr(), 7, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(unsafe.Pointer(buflenCopied)), uintptr(flags), uintptr(unsafe.Pointer(dir)), 0, 0) r0, _, _ := syscall.Syscall9(procRegLoadMUIStringW.Addr(), 7, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(unsafe.Pointer(buflenCopied)), uintptr(flags), uintptr(unsafe.Pointer(dir)), 0, 0)
if r0 != 0 { if r0 != 0 {
@ -98,8 +98,8 @@ func regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint
return return
} }
func regConnectRegistry(machinename *uint16, key syscall.Handle, result *syscall.Handle) (regerrno error) { func regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) {
r0, _, _ := syscall.Syscall(procRegConnectRegistryW.Addr(), 3, uintptr(unsafe.Pointer(machinename)), uintptr(key), uintptr(unsafe.Pointer(result))) r0, _, _ := syscall.Syscall6(procRegSetValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(valueName)), uintptr(reserved), uintptr(vtype), uintptr(unsafe.Pointer(buf)), uintptr(bufsize))
if r0 != 0 { if r0 != 0 {
regerrno = syscall.Errno(r0) regerrno = syscall.Errno(r0)
} }
@ -110,11 +110,7 @@ func expandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32,
r0, _, e1 := syscall.Syscall(procExpandEnvironmentStringsW.Addr(), 3, uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size)) r0, _, e1 := syscall.Syscall(procExpandEnvironmentStringsW.Addr(), 3, uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size))
n = uint32(r0) n = uint32(r0)
if n == 0 { if n == 0 {
if e1 != 0 { err = errnoErr(e1)
err = errnoErr(e1)
} else {
err = syscall.EINVAL
}
} }
return return
} }

View File

@ -7,6 +7,10 @@
package svc package svc
import ( import (
"errors"
"syscall"
"unsafe"
"golang.org/x/sys/windows" "golang.org/x/sys/windows"
) )
@ -23,6 +27,8 @@ func allocSid(subAuth0 uint32) (*windows.SID, error) {
// IsAnInteractiveSession determines if calling process is running interactively. // IsAnInteractiveSession determines if calling process is running interactively.
// It queries the process token for membership in the Interactive group. // It queries the process token for membership in the Interactive group.
// http://stackoverflow.com/questions/2668851/how-do-i-detect-that-my-application-is-running-as-service-or-in-an-interactive-s // http://stackoverflow.com/questions/2668851/how-do-i-detect-that-my-application-is-running-as-service-or-in-an-interactive-s
//
// Deprecated: Use IsWindowsService instead.
func IsAnInteractiveSession() (bool, error) { func IsAnInteractiveSession() (bool, error) {
interSid, err := allocSid(windows.SECURITY_INTERACTIVE_RID) interSid, err := allocSid(windows.SECURITY_INTERACTIVE_RID)
if err != nil { if err != nil {
@ -57,3 +63,95 @@ func IsAnInteractiveSession() (bool, error) {
} }
return false, nil return false, nil
} }
var (
ntdll = windows.NewLazySystemDLL("ntdll.dll")
_NtQueryInformationProcess = ntdll.NewProc("NtQueryInformationProcess")
kernel32 = windows.NewLazySystemDLL("kernel32.dll")
_QueryFullProcessImageNameA = kernel32.NewProc("QueryFullProcessImageNameA")
)
// IsWindowsService reports whether the process is currently executing
// as a Windows service.
func IsWindowsService() (bool, error) {
// This code was copied from runtime.isWindowsService function.
// The below technique looks a bit hairy, but it's actually
// exactly what the .NET framework does for the similarly named function:
// https://github.com/dotnet/extensions/blob/f4066026ca06984b07e90e61a6390ac38152ba93/src/Hosting/WindowsServices/src/WindowsServiceHelpers.cs#L26-L31
// Specifically, it looks up whether the parent process has session ID zero
// and is called "services".
const _CURRENT_PROCESS = ^uintptr(0)
// pbi is a PROCESS_BASIC_INFORMATION struct, where we just care about
// the 6th pointer inside of it, which contains the pid of the process
// parent:
// https://github.com/wine-mirror/wine/blob/42cb7d2ad1caba08de235e6319b9967296b5d554/include/winternl.h#L1294
var pbi [6]uintptr
var pbiLen uint32
r0, _, _ := syscall.Syscall6(_NtQueryInformationProcess.Addr(), 5, _CURRENT_PROCESS, 0, uintptr(unsafe.Pointer(&pbi[0])), uintptr(unsafe.Sizeof(pbi)), uintptr(unsafe.Pointer(&pbiLen)), 0)
if r0 != 0 {
return false, errors.New("NtQueryInformationProcess failed: error=" + itoa(int(r0)))
}
var psid uint32
err := windows.ProcessIdToSessionId(uint32(pbi[5]), &psid)
if err != nil {
return false, err
}
if psid != 0 {
// parent session id should be 0 for service process
return false, nil
}
pproc, err := windows.OpenProcess(windows.PROCESS_QUERY_LIMITED_INFORMATION, false, uint32(pbi[5]))
if err != nil {
return false, err
}
defer windows.CloseHandle(pproc)
// exeName gets the path to the executable image of the parent process
var exeName [261]byte
exeNameLen := uint32(len(exeName) - 1)
r0, _, e0 := syscall.Syscall6(_QueryFullProcessImageNameA.Addr(), 4, uintptr(pproc), 0, uintptr(unsafe.Pointer(&exeName[0])), uintptr(unsafe.Pointer(&exeNameLen)), 0, 0)
if r0 == 0 {
if e0 != 0 {
return false, e0
} else {
return false, syscall.EINVAL
}
}
const (
servicesLower = "services.exe"
servicesUpper = "SERVICES.EXE"
)
i := int(exeNameLen) - 1
j := len(servicesLower) - 1
if i < j {
return false, nil
}
for {
if j == -1 {
return i == -1 || exeName[i] == '\\', nil
}
if exeName[i] != servicesLower[j] && exeName[i] != servicesUpper[j] {
return false, nil
}
i--
j--
}
}
func itoa(val int) string { // do it here rather than with fmt to avoid dependency
if val < 0 {
return "-" + itoa(-val)
}
var buf [32]byte // big enough for int64
i := len(buf) - 1
for val >= 10 {
buf[i] = byte(val%10 + '0')
i--
val /= 10
}
buf[i] = byte(val + '0')
return string(buf[i:])
}

View File

@ -270,9 +270,11 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegEnumKeyExW //sys RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegEnumKeyExW
//sys RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegQueryValueExW //sys RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegQueryValueExW
//sys GetCurrentProcessId() (pid uint32) = kernel32.GetCurrentProcessId //sys GetCurrentProcessId() (pid uint32) = kernel32.GetCurrentProcessId
//sys ProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) = kernel32.ProcessIdToSessionId
//sys GetConsoleMode(console Handle, mode *uint32) (err error) = kernel32.GetConsoleMode //sys GetConsoleMode(console Handle, mode *uint32) (err error) = kernel32.GetConsoleMode
//sys SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode //sys SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode
//sys GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo //sys GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo
//sys SetConsoleCursorPosition(console Handle, position Coord) (err error) = kernel32.SetConsoleCursorPosition
//sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW //sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW
//sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW //sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW
//sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot //sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot
@ -388,11 +390,7 @@ func GetProcAddressByOrdinal(module Handle, ordinal uintptr) (proc uintptr, err
r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), ordinal, 0) r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), ordinal, 0)
proc = uintptr(r0) proc = uintptr(r0)
if proc == 0 { if proc == 0 {
if e1 != 0 { err = errnoErr(e1)
err = errnoErr(e1)
} else {
err = syscall.EINVAL
}
} }
return return
} }
@ -1089,11 +1087,7 @@ func WSASendMsg(fd Handle, msg *WSAMsg, flags uint32, bytesSent *uint32, overlap
} }
r1, _, e1 := syscall.Syscall6(sendRecvMsgFunc.sendAddr, 6, uintptr(fd), uintptr(unsafe.Pointer(msg)), uintptr(flags), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine))) r1, _, e1 := syscall.Syscall6(sendRecvMsgFunc.sendAddr, 6, uintptr(fd), uintptr(unsafe.Pointer(msg)), uintptr(flags), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
if r1 == socket_error { if r1 == socket_error {
if e1 != 0 { err = errnoErr(e1)
err = errnoErr(e1)
} else {
err = syscall.EINVAL
}
} }
return err return err
} }
@ -1105,11 +1099,7 @@ func WSARecvMsg(fd Handle, msg *WSAMsg, bytesReceived *uint32, overlapped *Overl
} }
r1, _, e1 := syscall.Syscall6(sendRecvMsgFunc.recvAddr, 5, uintptr(fd), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(bytesReceived)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0) r1, _, e1 := syscall.Syscall6(sendRecvMsgFunc.recvAddr, 5, uintptr(fd), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(bytesReceived)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0)
if r1 == socket_error { if r1 == socket_error {
if e1 != 0 { err = errnoErr(e1)
err = errnoErr(e1)
} else {
err = syscall.EINVAL
}
} }
return err return err
} }

File diff suppressed because it is too large Load Diff